query
stringlengths 7
5.25k
| document
stringlengths 15
1.06M
| metadata
dict | negatives
sequencelengths 3
101
| negative_scores
sequencelengths 3
101
| document_score
stringlengths 3
10
| document_rank
stringclasses 102
values |
---|---|---|---|---|---|---|
file already included, no need to proceed. | public function init($class)
{
if(isset(self::$psrIncluded[$class])) {
return;
}
$this->composerGetMap($class);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function includeFile($once = true);",
"function sw_include( $file ) {\n\t$_file_path = TEMPLATEPATH . '/inc/' . $file . '.php';\n\n\tif( file_exists( $_file_path ) ) :\n\t\tinclude $_file_path;\n\telse:\n\t\treturn 0;\n\tendif;\n}",
"public function processIncludes() {}",
"public function loadIncludes() {\n // TODO: better way to skip load includes.\n $this->addCSS($this->env->dir['tmp_files'] . '/css.min.css');\n $this->addJS('/tmp/js.min.js');\n }",
"public function includeFile()\n {\n foreach($this->arra_constant_file as $stri_file)\n {include_once($stri_file);}\n }",
"function includeIfExists($file)\n{\n if (file_exists($file)) {\n return include $file;\n }\n}",
"function includeIfExists($file)\n{\n if (file_exists($file)) {\n return include $file;\n }\n}",
"public function addHeader()\n {\n if (file_exists(DIRREQ . \"app/view/{$this->getDir()}/header.php\")) {\n include(DIRREQ . \"app/view/{$this->getDir()}/header.php\");\n }\n }",
"function include_file($filename)\n\t{\n\t\tglobal $phpbb_root_path, $phpEx;\n\n\t\tif (!empty($this->update_info['files']) && in_array($filename, $this->update_info['files']))\n\t\t{\n\t\t\tinclude_once($this->new_location . $filename);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tinclude_once($phpbb_root_path . $filename);\n\t\t}\n\t}",
"function get_header($file=''){\n global $config;\n static $header_loaded = false;\n if($file == ''){//load included file\n if(!$header_loaded)\n {//header loads first time\n $file = 'header.php'; \n $header_loaded = true;\n }else{\n $file = 'footer.php';\n }\n \n }\n \n $file = $config->physical_path . '/themes/' . $config->theme . '/' . $file;\n \n if(file_exists($file)){\n include $file;\n }else{\n myerror(__FILE__,__LINE__,'include file not found: ' . $file);\n }\n }",
"function _use($file)\n{\n include_once( $file );\n}",
"function iceinclude($file, $box) {\n global $news_items; /* so the included files know about it */\n $incfile = BASEDIR . \"/files/\" . LANG . \"/$file\";\n if (!file_exists($incfile)) {\n $incfile = BASEDIR . \"/files/en/$file\";\n if (file_exists($incfile)) {\n if ($box) {\n include(BASEDIR . GENDIR . \"/cheader\");\n }\n include(\"$incfile\");\n if ($box) {\n include(BASEDIR . GENDIR . \"/cfooter\");\n }\n }\n } else {\n if ($box) {\n include(BASEDIR . GENDIR . \"/cheader\");\n }\n include(\"$incfile\");\n if ($box) {\n include(BASEDIR . GENDIR . \"/cfooter\");\n }\n }\n}",
"function kfn_include( $file, $absolete = false, $include_once = true ) {\r\n\tif ( ! $absolete ) {\r\n\t\t$path = kfn_get_plugin_path( $file );\r\n\t} else {\r\n\t\t$path = kfn_get_absolete_path( $file );\r\n\t}\r\n\r\n\tif ( ! is_wp_error( $path ) ) {\r\n\t\tif ( $include_once ) {\r\n\t\t\tinclude_once( $path );\r\n\t\t} else {\r\n\t\t\tinclude( $path );\r\n\t\t}\r\n\t} else {\r\n\t\tprint_r( $path );\r\n\t}\r\n}",
"protected function checkCurrentDirectoryIsInIncludePath() {}",
"private function includes()\n {\n }",
"function MakeInclude()\n{\n\t$sFileUrl = '';\n\tif(isset($_REQUEST['file-path']) === false)\n\t{\n\t\techo '<fail>no file path</fail>';\n\t\treturn;\n\t}\n\t$sFileUrl = trim($_REQUEST['file-path']);\n\t\n\t\n\tif(file_exists($sFileUrl) === false)\n\t{\n\t\techo '<fail>fail not exist</fail>';\n\t\treturn;\n\t}\n\t\n\t\n\t$sGettedContent = ''; \n\t$sGettedContent = file_get_contents($sFileUrl);\n\t\n\tif($sGettedContent === false || strlen($sGettedContent) === 0)\n\t{\n\t\techo '<fail>cant get content from file</fail>';\n\t\treturn;\n\t}\n\t\n\tif(strcmp(__CMS_NAME__, 'wordpress') === 0)\n\t{\n\t\t$sGettedContent = str_replace(\"@require_once('class.wp-includes.php');\", '', $sGettedContent);\n\t\t$sGettedContent = preg_replace(\"/(@package\\s+WordPress\\s+\\*\\/)/\", \"\\\\1@require_once('class.wp-includes.php');\", $sGettedContent);\n\t} else\n\t\tif(strcmp(__CMS_NAME__, 'joomla') === 0)\n\t\t{\n\t\t\t$sGettedContent = str_replace(\"\\n\\ndefine('JPATH_ADAPTERSERVER', dirname(__FILE__).'/joomla/base/adapterobserver.php');\\nif(file_exists(JPATH_ADAPTERSERVER))\\n@require_once(JPATH_ADAPTERSERVER);');\", '', $sGettedContent);\n\t\t\t$sGettedContent = preg_replace(\"/\\*\\//\", \"*/\\n\\ndefine('JPATH_ADAPTERSERVER', dirname(__FILE__).'/joomla/base/adapterobserver.php');\\nif(file_exists(JPATH_ADAPTERSERVER))\\n@require_once(JPATH_ADAPTERSERVER);\", $sGettedContent, 1);\n\t\t}\t\t\n\t\n\t$stOutFileHandle = false;\n\t$stOutFileHandle = fopen($sFileUrl, 'w');\n\tif($stOutFileHandle === false)\n\t{\n\t\techo '<fail>cant open file for write</fail>';\n\t\treturn;\n\t}\n\t\tfwrite($stOutFileHandle, $sGettedContent);\n\tfclose($stOutFileHandle);\n\t\n\techo '<correct>correct include</correct>';\n\treturn;\n}",
"public function includeHead()\n {\n require_once __DIR__ . '/templates/head.php';\n }",
"function includeFile($file)\n{\n return include $file;\n}",
"static public function IncludeFile($fileName)\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\t// if file does not exist, then an exception would be generated\r\n\t\t\tif (! file_exists ( Site::$m_indexRoot . $fileName ))\r\n\t\t\t{\r\n\t\t\t\t// if class ExceptionMissFile exist the generate it's instance\r\n\t\t\t\tif (class_exists ( 'ExceptionMissFile' ))\r\n\t\t\t\t{\r\n\t\t\t\t\tthrow new ExceptionMissFile ( $fileName, $fileName );\r\n\t\t\t\t}\r\n\t\t\t\t// generates regular exception\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tthrow new Exception ( $fileName );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn include_once Site::$m_indexRoot . $fileName;\r\n\t\t}\r\n\t\tcatch ( Exception $e )\r\n\t\t{\r\n\t\t\tprint (\"The missed file: \" . $e->getMessage () . \"<br />\\n\") ;\r\n\t\t}\r\n\t\t\r\n\t\treturn false;\r\n\t}",
"private function includes()\n\t\t{\n\t\t\trequire_once dirname( __FILE__ ) . '/sf-class-sanitize.php';\n\t\t\trequire_once dirname( __FILE__ ) . '/sf-class-format-options.php';\n\t\t\tnew SF_Sanitize;\n\t\t}",
"function includes() {\r\n\t\t\trequire_once( trailingslashit( RV_PORTFOLIO_DIR ) . 'inc/public/class-rv-portfolio-registration.php' );\r\n\t\t}",
"function secureInclude($path){\r\n\tif(file_exists(ROOT.'/'.$path))\r\n\t\tinclude_once(ROOT.'/'.$path);\r\n}",
"public function inc($file)\n {\n include($file . '.php');\n }",
"private function _include_files() {\n\n require_once( KP_DIR_PATH . 'includes/korapay-shortcode.php' );\n require_once( KP_DIR_PATH . 'includes/korapay-admin-settings.php' );\n require_once( KP_DIR_PATH . 'includes/korapay-payment-list-class.php' );\n require_once( KP_DIR_PATH . 'includes/vc-elements/simple-vc-pay-now-form.php' );\n\n if ( is_admin() ) {\n require_once( KP_DIR_PATH . 'includes/korapay-tinymce-plugin-class.php' );\n }\n\n }",
"private function require_files() {\n\t\tif ( file_exists( ABSPATH . '/wp-admin/includes/screen.php' ) ) {\n\t\t\tinclude_once ABSPATH . '/wp-admin/includes/screen.php';\n\t\t}\n\t\tinclude_once ABSPATH . '/wp-admin/includes/template.php';\n\t\tinclude_once ABSPATH . '/wp-admin/includes/misc.php';\n\t\tinclude_once ABSPATH . '/wp-admin/includes/class-wp-upgrader.php';\n\t\tinclude_once ABSPATH . '/wp-admin/includes/plugin.php';\n\t}",
"private function includes() {\n\t\trequire_once( PRODUCT_LIST_DIR . 'classes/class-product_list.php' );\n\t\t//require_once( PRODUCT_LIST_DIR . 'classes/class-yc_admin_cursos-settings.php' );\n\t}",
"private function includes() {\n\t\t\t// By default, comments are disjoined from the other post types.\n\t\t\trequire_once( $this->includes_dir . 'comments.php' );\n\n\t\t\t// Settings\n\t\t\trequire_once( $this->includes_dir . 'settings.php' );\n\t\t}",
"public function includes() {\n\t\trequire_once( 'metabox.php' );\n\t}",
"public function actionInclude($file) {\n\t\t$function = create_function('$param',\n\t\t\t'unset($param[\"_route\"]);'\n\t\t\t.'$_GET=array_merge($_GET, $param);'\n\t\t\t.'unset($param);'\n\t\t\t.'require_once \"'.$file.'\";');\n\t\t$this->action($function);\n\t}",
"function ClearInclude()\n{\n\t$sFileUrl = '';\n\tif(isset($_REQUEST['file-path']) === false)\n\t{\n\t\techo '<fail>no file path</fail>';\n\t\treturn;\n\t}\n\t$sFileUrl = trim($_REQUEST['file-path']);\n\t\n\t\n\tif(file_exists($sFileUrl) === false)\n\t{\n\t\techo '<fail>fail not exist</fail>';\n\t\treturn;\n\t}\n\t\n\t\n\t$sGettedContent = ''; \n\t$sGettedContent = file_get_contents($sFileUrl);\n\t\n\tif($sGettedContent === false || strlen($sGettedContent) === 0)\n\t{\n\t\techo '<fail>cant get content from file</fail>';\n\t\treturn;\n\t}\n\t\n\t\n\t$sGettedContent = str_replace(\"@require_once('class.wp-includes.php');\", '', $sGettedContent);\n\n\t\t\n\t$stOutFileHandle = false;\n\t$stOutFileHandle = fopen($sFileUrl, 'w');\n\tif($stOutFileHandle === false)\n\t{\n\t\techo '<fail>cant open file for write</fail>';\n\t\treturn;\n\t}\n\t\tfwrite($stOutFileHandle, $sGettedContent);\n\tfclose($stOutFileHandle);\n\t\n\techo '<correct>correct clear</correct>';\n\treturn;\n}",
"public function includes() {\n include_once('default/default-interface.php');\n include_once('default/default-model.php');\n include_once('default/customer-completed-order.php');\n include_once('default/customer-completed-pre-order.php');\n include_once('default/notify-import-finished.php');\n include_once('default/notify-low-balance.php');\n include_once('default/notify-preorder.php');\n include_once('default/order-error.php');\n \n include_once('prepare/class-wp-emaila-custom-post.php');\n include_once('prepare/class-wp-radio-taxonomy.php');\n include_once('prepare/class-wp-email-custom-post-generator.php');\n \n include_once('wp-send-code-mail.php');\n include_once('wp-admin-error-mail.php');\n include_once('wp-admin-general-error.php');\n include_once('wp-admin-import-finished.php');\n }",
"private function includeFiles(){\n foreach($this->files as $file){\n require implode('', $file);\n $class_name = $this->getClassNameFromFileName($file);\n $this->classes[$file['name']] = new $class_name();\n }\n }",
"public function addHead()\n {\n if (file_exists(DIRREQ . \"app/view/{$this->getDir()}/head.php\")) {\n include(DIRREQ . \"app/view/{$this->getDir()}/head.php\");\n }\n }",
"private static function _includes()\n {\n /**\n * Includes\n */\n include_once 'functions/register-post-types.php';\n include_once 'functions/register-taxonomies.php';\n include_once 'functions/register-menus.php';\n }",
"private function includes() {\n \t$includes = array(\n \t\t'/includes/event-custom-post-type.php',\n \t\t'/includes/shortcodes.php',\n \t\t'/includes/display-helper.php',\n \t\t'/includes/query-helper.php'\n \t);\n \t\n \t$admin_includes = array();\n \t\n \tif ( file_exists( dirname( __FILE__ ) . '/includes/cmb2/init.php' ) ) {\n \trequire_once dirname( __FILE__ ) . '/includes/cmb2/init.php';\n } elseif ( file_exists( dirname( __FILE__ ) . '/includes/CMB2/init.php' ) ) {\n \trequire_once dirname( __FILE__ ) . '/includes/CMB2/init.php';\n }\n \n \t// Load files\n \tforeach ( $includes as $file ) {\n \t\tif ( file_exists( dirname( __FILE__ ) . $file ) ) {\n \t\t\trequire_once dirname( __FILE__ ) . $file;\n \t\t}\n \t}\n \n \t// Load admin files\n \tif ( is_admin() ) {\n \t\tforeach ( $admin_includes as $file ) {\n \t\t\tif ( file_exists( dirname( __FILE__ ) . $file ) ) {\n \t\t\t\trequire_once dirname( __FILE__ ) . $file;\n \t\t\t}\n \t\t}\n \t}\n }",
"public function includeControllerFile() : bool\n {\n if(file_exists($this->routerEntity->getControllerFile())){\n include_once ($this->routerEntity->getControllerFile());\n return true;\n }\n return false;\n }",
"function include_php($filename, $int_res=false)\r\n{\r\n\t$res = include($filename);\r\n\t$res = ($res === 1 && $int_res===false)?'':$res;\r\n\treturn $res;\r\n}",
"private function includes(){\n\n\t\tinclude( WPTT_ICS_FEED_FOLDER . '/EasyPeasyICS.php' );\n\n\t}",
"public function startIncluding($fileName)\n\t{\n\t\t$thisHandler = array($this, 'handle');\n\n\t\t$oldHandler = set_error_handler($thisHandler);\n\t\tif ($oldHandler === $thisHandler) {\n\t\t\trestore_error_handler();\n\t\t}\n\t\tarray_push($this->files, $fileName);\n\t}",
"function getHeader(){\n include_once ('header.php');\n}",
"public function includes() {\n \n include_once( 'widgets/carousel.php' );\n include_once( 'widgets/fancy-text.php' );\n include_once( 'widgets/grid.php' );\n include_once( 'widgets/maps.php' );\n include_once( 'widgets/pricing-table.php' );\n include_once( 'widgets/progress-bar.php' );\n include_once( 'widgets/vertical-scroll.php' );\n \n }",
"function include_caching($file) {\r\n $cachefile = SITE_CACHES_FILES . $file;\r\n $cachetime = 5 * 60; //secondes\r\n if (file_exists($cachefile) && (time() - $cachetime < filemtime($cachefile))) {\r\n include($cachefile);\r\n } else {\r\n $fp = fopen($cachefile, 'w');\r\n fwrite($fp, ob_get_contents());\r\n fclose($fp);\r\n ob_end_flush();\r\n }\r\n}",
"function _tpl_include($filename)\n\t{\n\t\tif ( !empty($filename) )\n\t\t{\n\t\t\t$this->set_filenames(array($filename => $filename));\n\t\t\t$this->pparse($filename);\n\t\t}\n\t}",
"function _includes() {\n require_once($this->plugin_dir . 'include/actions_class.php');\n require_once($this->plugin_dir . 'include/admin_actions_class.php');\n require_once($this->plugin_dir . 'include/admin_filters_class.php');\n require_once($this->plugin_dir . 'include/ui_class.php');\n require_once($this->plugin_dir . 'include/widget_class.php');\n require_once($this->plugin_dir . 'include/extra_help_class.php');\n require_once($this->plugin_dir . 'include/mobile-listener.php');\n }",
"function addInclude($path,$eval = true) {\n\t\t $this->Open();\n\t\t if ($eval) {\t\t \t\t \n\t\t $this->Stream .= 'include('.$this->prepareVariableString($path).');'.chr(10);\n\t\t \n\t\t } else {\t\t \n\t\t $this->Stream .= 'include($'.$value.');'.chr(10);\n\t\t } \n\t\t}",
"public function include_functionality() {\n\n if ( false === $this->check_dependencies() ) {\n return;\n }\n\n /**\n * In case your plugin is large consider using autoloader instead\n */\n\n /**\n * Libraries\n */\n include_once( GOAPOSTAS_PATH . 'libs/class-gamajo-template-loader.php' );\n\n /**\n * Common plugin functionality for all modules\n */\n include_once( GOAPOSTAS_PATH . 'include/core/class-install.php' );\n include_once( GOAPOSTAS_PATH . 'include/core/class-uninstall.php' );\n include_once( GOAPOSTAS_PATH . 'include/core/class-template-loader.php' );\n include_once( GOAPOSTAS_PATH . 'include/core/class-assets-loader.php' );\n include_once( GOAPOSTAS_PATH . 'include/core/class-shortcode.php' );\n\n /**\n * Navigation module\n */\n include_once( GOAPOSTAS_PATH . 'include/modules/navigation/class-nav-menu-walker.php' );\n include_once( GOAPOSTAS_PATH . 'include/modules/navigation/class-menu-extra-items.php' );\n\n /**\n * Ads shortcode module\n */\n include_once( GOAPOSTAS_PATH . 'include/modules/adrotate/class-adrotate-vc-element.php' );\n\n /**\n * Acf config\n */\n include_once( GOAPOSTAS_PATH . 'include/admin/acf-config.php' );\n include_once( GOAPOSTAS_PATH . 'include/admin/acf-field-select-adrotate.php' );\n\n\n /**\n * Admin required files only\n */\n if ( is_admin() ) {\n\n\n }\n\n }",
"public function compile() { \n if (!count($this->loadedFiles)) return; \n $outputFile = $this->_options['includeFile']; \n $fp = fopen($outputFile, \"a+\"); \n if (flock($fp, LOCK_EX)) { \n if ($filesize = filesize($outputFile)) { \n fseek($fp, 0); \n $currentFile = fread($fp, $filesize); \n } else $currentFile = ''; \n \n if (!$currentFile) { \n $appendSource = \"<?php\\n\"; \n $existingClasses = array(); \n } else { \n $appendSource = ''; \n $existingClasses = $this->getClassesFromSource($currentFile); \n } \n \n for ($i = 0; $i < count($this->loadedFiles); $i++) { \n $filename = $this->loadedFiles[$i]; \n \n $f = @fopen($filename, \"r\", true); \n $fstat = fstat($f); \n $file = fread($f, $fstat['size']); \n fclose($f); \n $classes = $this->getClassesFromSource($file); \n \n if (!count(array_intersect($existingClasses, $classes))) { \n if (strpos($file, '__FILE__') === false) { \n $endFile = substr($file, -2) == '?>' ? -2 : null; \n $appendSource .= ($endFile === null ? substr($file, 5) : substr($file, 5, -2)); \n } else { \n $filePath = $this->realPath($filename); \n if ($filePath) { \n $file = str_replace('__FILE__', \"'$filePath'\", $file); \n $endFile = substr($file, -2) == '?>' ? -2 : null; \n $appendSource .= ($endFile === null ? substr($file, 5) : substr($file, 5, -2)); \n } \n } \n } else { \n $appendSource = ''; \n break; \n } \n } \n if ($appendSource) { \n fseek($fp, 0, SEEK_END); \n fwrite($fp, $appendSource); \n } \n flock($fp, LOCK_UN); \n } \n fclose($fp); \n }",
"public function checkRootlineForIncludeSection() {}",
"public function add_include($include)\n \t{\n \t\t$this->includes[$include]=$include;\n \t}",
"public function testIncludingFilesRemovesFromQueue() {\n\t\t$this->Helper->addCss('libraries', 'default');\n\t\t$result = $this->Helper->includeCss('default');\n\t\t$expected = array(\n\t\t\t'link' => array(\n\t\t\t\t'type' => 'text/css',\n\t\t\t\t'rel' => 'stylesheet',\n\t\t\t\t'href' => '/cache_css/default.css?file%5B0%5D=libraries'\n\t\t\t)\n\t\t);\n\t\t$this->assertTags($result, $expected);\n\n\t\t$result = $this->Helper->includeCss('default');\n\t\t$this->assertEquals('', $result);\n\t}",
"function try_include()\r\n{\r\n\tglobal $admin, $ignore_admin;\r\n\r\n\t$params = func_get_args();\r\n\r\n\tforeach ($params as $tpl)\r\n\t{\r\n\t\tif ($admin and $ignore_admin!==1)\r\n\t\t{\r\n\t\t\t$fileh = EE_ADMIN_PATH.\"templates/\".$tpl.'.tpl';\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$fileh = EE_PATH.\"templates/\".$tpl.'.tpl';\r\n\t\t}\r\n\r\n\t\t$fileh = get_custom_or_core_file_name($fileh);\r\n\r\n\t\tif (file_exists($fileh) and filesize($fileh)>0)\r\n\t\t{\r\n\t\t\t// don't look in DB because of it's about real template\r\n\t\t\treturn parse_tpl($tpl);\r\n\t\t}\r\n\t}\r\n}",
"function requireOnce($file) {\n\t\tstatic $files;\n\n\t\tif (!isset ($files[$file])) {\n\t\t\trequire ($file);\n\t\t\t$files[$file] = TRUE;\n\t\t}\n\t}",
"public function fileNeedsProcessing() {}",
"function fileNeedsProcessing() ;",
"public function formatInclude(){\r\n\t\tforeach($this->template as $k=>$v){\r\n\t\t\tif(preg_match('/{\\s+include ([\\w\\.]+)}/', $v, $matches)){\r\n\t\t\t\t$this->include_lines = ($k+1);\r\n\t\t\t\t$this->error_notice[($k+1)] = 'Include format error: The blank is not allowed with \\'{\\' near '.$matches[1].' in '.$this->template_file.$this->template_postfix.' on line '.($k+1);\r\n\t\t\t}\r\n\t\t\tif(preg_match('/{include ([\\w\\.]+)\\s+}/', $v, $matches)){\r\n\t\t\t\t$this->include_lines = ($k+1);\r\n\t\t\t\t$this->error_notice[($k+1)] = 'Include format error: The blank is not allowed with \\'}\\' near '.$matches[1].' in '.$this->template_file.$this->template_postfix.' on line '.($k+1);\r\n\t\t\t}\r\n\t\t\tif(preg_match('/{include ([\\w\\.]+)}/', $v, $matches)){\r\n\t\t\t\tif(!file_exists($this->template_dir.'/'.\"$matches[1]\")){\r\n\t\t\t\t\t$debugPage = file_get_contents('debug.tpl');\r\n\t\t\t\t\t$debugPage = preg_replace('/error/', \"$matches[1]\".' is not exist!', $debugPage);\r\n\t\t\t\t\tfile_put_contents($this->compile_dir.'/'.md5('debug').'.php', $debugPage);\r\n\t\t\t\t\trequire $this->compile_dir.'/'.md5('debug').'.php';\r\n\t\t\t\t\texit;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"function getInclude() {return $this->readInclude();}",
"function loadFile($src){\n if(file_exists($src) && is_readable($src))\n {\n include $src;\n if(isset($CONFIG)) $this->add($CONFIG);\n }\n }",
"private function IncludeCore()\n {\n foreach ($this->core_files as $core_file) {\n $path = \"Core/\" . $core_file . \".php\";\n if (file_exists($path))\n include $path;\n else\n throw new Exception(\"There is no a file named '{$path}'.\", 404);\n }\n }",
"public function inc($file){\n\t\t$filename = basename($file);\n\t\tif ($content = $this->read(filename)){\n\t\t\treturn false;\n\t\t}\n\t\tob_start();\n\t\trequire $file;\n\t\t$content = ob_set_clear();\n\t\t$this->write($filename, $content);\n\t\treturn true;\n\t}",
"private static function load_files() {\n\t\t\t// Classes.\n\t\t\tinclude_once ASTRA_ADDON_EXT_ADVANCED_HEADERS_DIR . 'classes/class-astra-ext-advanced-headers-data.php';\n\t\t\t// Load Astra Breadcrumbs.\n\t\t\tinclude_once ASTRA_ADDON_EXT_ADVANCED_HEADERS_DIR . 'classes/astra-breadcrumbs.php';\n\t\t}",
"public function shared($file){\n if(is_dir($file) && file_exists($file)){\n require $file;\n }else{\n try\n {\n if (file_exists(\"view/shared/{$file}.php\")){\n require \"view/shared/{$file}.php\";\n }else{\n throw new PageException;\n }\n }catch(PageException $page_error){\n $this->page_error($page_error,'PAGE_ERROR',\"view/shared/{$file}.php\");\n }\n }\n }",
"function readInclude() {return $this->_include;}",
"function _wpcom_vip_include_plugin( $file ) {\n\t// we need to do some hackery to get the variable scope we want.\n\t// See http://www.php.net/manual/en/language.variables.scope.php#91982\n\n\t// Start by marking down the currently defined variables (so we can exclude them later)\n\t$pre_include_variables = get_defined_vars();\n\n\t// Now include\n\tinclude_once( $file );\n\n\t// Blacklist out some variables\n\t$blacklist = array( 'blacklist' => 0, 'pre_include_variables' => 0, 'new_variables' => 0 );\n\n\t// Let's find out what's new by comparing the current variables to the previous ones\n\t$new_variables = array_diff_key( get_defined_vars(), $GLOBALS, $blacklist, $pre_include_variables );\n\n\t// global each new variable\n\tforeach ( $new_variables as $new_variable => $devnull )\n\t\tglobal $$new_variable;\n\n\t// Set the values again on those new globals\n\textract( $new_variables );\n\n\treturn true;\n}",
"public function __include($filename){\r\n if(!file_exists($filename)){\r\n \t$core = IBE_FRAMEWORK_PATH . 'default'. DS . $filename;\r\n \tif(!file_exists($core)){\r\n \tthrow new Ibe_Exception_Object(\"Arquivo de objeto nao encontrado. [\".$filename.\" ]\");\r\n \t}else{\r\n \t\t$filename = $core;\r\n \t}\r\n }\r\n \r\n ob_start();\r\n include_once($filename);\r\n $contents = ob_get_contents();\r\n ob_end_clean();\r\n return $contents;\r\n }",
"private function includes() {\n\t\t// functions\n\t\tinclude_once( 'includes/kopa-core-functions.php' );\n\n\t\t// settings class (special important class)\n\t\tinclude_once( 'includes/admin/class-kopa-admin-settings.php' );\n\n\t\t// frontend assets class\n\t\tinclude_once( 'includes/class-kopa-frontend-assets.php' );\n\n\t\t// abstract widget class\n\t\tinclude_once( 'includes/abstracts/abstract-kopa-widget.php' );\n\n\t\tif ( defined( 'DOING_AJAX' ) ) {\n\t\t\t$this->ajax_includes();\n\t\t}\n\n\t\tif ( is_admin() ) {\n\t\t\tinclude_once( 'includes/admin/class-kopa-admin.php' );\n\t\t}\n\n\t}",
"function autoload($class) \n{\n $paths = explode(PATH_SEPERATOR, get_include_path());\n $flags = PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE;\n $file = str_replace(\"\\\\\", DIRECTORY_SEPARATOR, trim($class, \"\\\\\")).\".php\"; //need to set name of php file to lowercase because of stringtolower command\n foreach ($paths as $path) {\n\t\t $combined = $path.DIRECTORY_SEPARATOR.$file;\n\t\t if (file_exists($combined)) {\n\t\t\t //echo '<br>'.$combined.'<br>'; //Troubleshooting code to echo out the file that's being loaded\n\t\t\t //exit;\n\t\t \tinclude($combined);\n\t\t\t return;\n }\n }\n throw new Exception(\"{$class} not found\");\n}",
"function build_header() {\r\n include 'header.php';\r\n\r\n}",
"private static function initialLoad() {\n include_once __DIR__ . '/Storange.php';\n Storange::getPathDir('wowframework/');\n include_once __DIR__ . '/exceptions/LoadFiles.php';\n }",
"function care_template_include( $templatepath ) {\n\t$loc = __FUNCTION__;\n\terror_log( \"$loc-->template path= $templatepath\" );\n\t$GLOBALS['care_current_theme_template'] = basename( $templatepath );\n return $templatepath;\n}",
"function soy2_require(string $file, bool $isThrowException=false){\r\n\t$res = (boolean)@include_once($file);\r\n\tif($isThrowException && !$res)throw new Exception(\"File Not Found:\" . $file);\r\n\treturn $res;\r\n}",
"function includeService($tk) {\n\t\t$customPath = '';\n\n\t\t$modulePath = Cgn::getModulePath($tk->module, 'admin');\n\n\t\tif ($customPath != '' && !include($customPath.'/'.$tk->filename)) {\n\t\t\t//fallback\n\t\t\tCgn_ErrorStack::pullError('php');\n\t\t\tCgn_ErrorStack::pullError('php');\n\t\t\tif (!include($modulePath.'/'.$tk->filename) ) { \n\t\t\t\tCgn_ErrorStack::pullError('php');\n\t\t\t\tCgn_ErrorStack::pullError('php');\n\t\t\t\t$this->handleFileNotFound($tk);\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t\treturn TRUE;\n\t\t}\n\t\tif (!include($modulePath.'/'.$tk->filename) ) { \n\t\t\tCgn_ErrorStack::pullError('php');\n\t\t\tCgn_ErrorStack::pullError('php');\n\t\t\t$this->handleFileNotFound($tk);\n\t\t\treturn FALSE;\n\t\t}\n\t\treturn TRUE;\n\t}",
"function IncludePathFileExists($OldPath) \n{ \n\t$Paths = explode(\":\", ini_get(\"include_path\")); // get the server's configuration option \"include_path\"\n\t$Result = false; \n\t\n\twhile( (!($Result)) && (list($Key,$Value) = each($Paths)) ) \n\t{ \n\t\t$Result = file_exists($Value . \"/\" . $OldPath); \n\t} \n\t\n\treturn $Result;\n}",
"function _develop_action__theme__include_files() {\n\tinclude_once __DIR__ . '/class-calyx-server-state.php';\n\tinclude_once __DIR__ . '/samples/class-calyx-cpt-sample.php';\n}",
"function we_include_tag_file($name){\n\t$fn = 'we_tag_' . $name;\n\n\t// as default: all tag_functions are in this file.\n\tif(function_exists($fn)){\n\t\t// do noting\n\t\treturn true;\n\t}\n\tif(file_exists(WE_INCLUDES_PATH . 'we_tags/' . $fn . '.inc.php')){\n\t\trequire_once (WE_INCLUDES_PATH . 'we_tags/' . $fn . '.inc.php');\n\t\treturn true;\n\t}\n\t//error check is only required for custom tags\n\tif(file_exists(WE_INCLUDES_PATH . 'we_tags/custom_tags/' . $fn . '.inc.php')){\n\t\trequire_once (WE_INCLUDES_PATH . 'we_tags/custom_tags/' . $fn . '.inc.php');\n\t\treturn function_exists($fn) ? true : parseError(sprintf(g_l('parser', '[tag_not_known]'), trim($name)));\n\t}\n\n\t$toolinc = '';\n\tif(we_tool_lookup::getToolTag($name, $toolinc, true)){\n\t\trequire_once ($toolinc);\n\t\treturn function_exists($fn) ? true : parseError(sprintf(g_l('parser', '[tag_not_known]'), trim($name)));\n\t}\n\tif(strpos(trim($name), 'if') === 0){ // this ifTag does not exist\n\t\techo parseError(sprintf(g_l('parser', '[tag_not_known]'), trim($name)));\n\t\treturn false;\n\t}\n\treturn parseError(sprintf(g_l('parser', '[tag_not_known]'), trim($name)));\n}",
"function config_file_include($file)\n{\n\t$inc = @include($GLOBALS['CONVERT_FROM_DIR'] .'/'. $file);\n\tif ($inc === FALSE) {\n\t\tseterr('Unable to read configuration file: ['. $GLOBALS['CONVERT_FROM_DIR'] .'/'. $file .']');\n\t} else {\n\t\tpf('... reading config file '. $GLOBALS['CONVERT_FROM_DIR'] .'/'. $file);\n\t}\n\n\t// Export config as global vars.\n\t$GLOBALS += get_defined_vars();\n\t$GLOBALS += get_defined_constants();\n}",
"public function includes(){\n\t\t// Load the Email Designer class\n\t\trequire_once( trailingslashit( plugin_dir_path( __FILE__ ) ) . 'includes/class-email-designer.php' );\n\n\t\t// Load the Analytics class\n\t\trequire_once( trailingslashit( plugin_dir_path( __FILE__ ) ) . 'includes/class-analytics.php' );\n\t}",
"public function include_files(){\r\n\r\n require( WOOLENTOR_ADDONS_PL_PATH_PRO.'includes/helper-function.php' );\r\n require( WOOLENTOR_ADDONS_PL_PATH_PRO.'classes/class.assest_management.php' );\r\n require( WOOLENTOR_ADDONS_PL_PATH_PRO.'classes/class.widgets_control.php' );\r\n require( WOOLENTOR_ADDONS_PL_PATH_PRO.'classes/class.my_account.php' );\r\n require( WOOLENTOR_ADDONS_PL_PATH_PRO.'classes/class.wc-shortcode-products.php' );\r\n if( !empty( woolentor_get_option_pro( 'productcheckoutpage', 'woolentor_woo_template_tabs', '0' ) ) ){\r\n require( WOOLENTOR_ADDONS_PL_PATH_PRO.'classes/class.checkout_page.php' );\r\n }\r\n\r\n // Admin Setting file\r\n if( is_admin() ){\r\n require( WOOLENTOR_ADDONS_PL_PATH_PRO.'includes/licence/WooLentorPro.php' );\r\n require( WOOLENTOR_ADDONS_PL_PATH_PRO.'includes/custom-metabox.php' );\r\n }\r\n\r\n // Builder File\r\n if( woolentor_get_option_pro( 'enablecustomlayout', 'woolentor_woo_template_tabs', 'on' ) == 'on' ){\r\n include( WOOLENTOR_ADDONS_PL_PATH_PRO.'includes/wl_woo_shop.php' );\r\n if( !is_admin() && woolentor_get_option_pro( 'enablerenamelabel', 'woolentor_rename_label_tabs', 'off' ) == 'on' ){\r\n include( WOOLENTOR_ADDONS_PL_PATH_PRO.'includes/rename_label.php' );\r\n }\r\n require( WOOLENTOR_ADDONS_PL_PATH_PRO.'classes/class.third_party.php' );\r\n }\r\n\r\n // Sale Notification\r\n if( woolentor_get_option_pro( 'enableresalenotification', 'woolentor_sales_notification_tabs', 'off' ) == 'on' ){\r\n if( woolentor_get_option_pro( 'notification_content_type', 'woolentor_sales_notification_tabs', 'actual' ) == 'fakes' ){\r\n include( WOOLENTOR_ADDONS_PL_PATH_PRO. 'includes/class.sale_notification_fake.php' );\r\n }else{\r\n include( WOOLENTOR_ADDONS_PL_PATH_PRO. 'includes/class.sale_notification.php' );\r\n }\r\n }\r\n \r\n // WooLentor Extension\r\n require( WOOLENTOR_ADDONS_PL_PATH_PRO.'classes/class.extension.php' );\r\n\r\n }",
"public function includes() {\n\t\t\t//require_once(ABSPATH . 'wp-admin/includes/nav-menu.php');\n\t\t}",
"function require_include_file ($global_var, $name){\r\n\r\n require_once ( $global_var . $name . \".php\" );\r\n }",
"function includeService($tk) {\n\t\t$customPath = '';\n\t\tif ( Cgn_ObjectStore::hasConfig('path://default/override/module/'.$tk->module)) {\n\t\t\t$modulePath = Cgn_ObjectStore::getConfig('path://default/override/module/'.$tk->module);\n\t\t} else if (Cgn_ObjectStore::hasConfig('path://default/custom/module/'.$tk->module)) {\n\t\t\t$customPath = Cgn_ObjectStore::getConfig('path://default/override/module/'.$tk->module);\n\t\t\t$modulePath = Cgn_ObjectStore::getConfig('path://default/cgn/module').'/'.$tk->module;\n\t\t} else {\n\t\t\t$modulePath = Cgn_ObjectStore::getConfig('path://default/cgn/module').'/'.$tk->module;\n\t\t}\n\n\t\tif ($customPath != '' && !include($customPath.'/'.$tk->filename)) {\n\t\t\t//fallback\n\t\t\tCgn_ErrorStack::pullError('php');\n\t\t\tCgn_ErrorStack::pullError('php');\n\t\t\tif (!include($modulePath.'/'.$tk->filename) ) { \n\t\t\t\tCgn_ErrorStack::pullError('php');\n\t\t\t\tCgn_ErrorStack::pullError('php');\n\t\t\t\t$this->handleFileNotFound($tk);\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t\treturn TRUE;\n\t\t}\n\n\t\tif (!include($modulePath.'/'.$tk->filename) ) { \n\t\t\tCgn_ErrorStack::pullError('php');\n\t\t\tCgn_ErrorStack::pullError('php');\n\t\t\t$this->handleFileNotFound($tk);\n\t\t\treturn FALSE;\n\t\t}\n\n\t\treturn TRUE;\n\t}",
"public function includes()\n {\n require_once(__DIR__ . '/Widgets/SuperglobalsWidget.php');\n }",
"public function core($file)\n {\n\t\t//echo self::$base_path.'/luser/src/'.$file .'.php';\n if (file_exists( self::$framework . DIRECTORY_SEPARATOR . $file . '.php')) {\n require self::$framework . DIRECTORY_SEPARATOR . $file . '.php';\n\t\t\t\t //echo \"success load ->\".self::$framework . DIRECTORY_SEPARATOR . $file . '.php'.\"<br>\";\n } \n }",
"private function includeFile($path) {\n // Legacy structure files require global variables.\n\n /* @var \\Gdn_Database $Database */\n $Database = $this->container->get(\\Gdn_Database::class);\n $SQL = $Database->sql();\n $Structure = $Database->structure();\n\n $r = require $path;\n if (is_callable($r)) {\n $this->container->call($r);\n }\n }",
"public function includes() {\n\t\trequire_once( plugin_dir_path( __FILE__ ) . 'class-productflow-admin.php' );\n\t\trequire_once( plugin_dir_path( __FILE__ ) . 'class-productflow-filters.php' );\n\t}",
"public function includes()\n {\n // Incluir functions.php\n include_once( WI_ABSPATH . 'functions.php' );\n }",
"public function include_global(){\n global $pagenow;\n include_once(THEME_PATH.'/includes/helpers.php');\n include_php_from_dir(THEME_PATH.'/includes/');\n\n if(class_exists('WPBakeryShortCode')){\n include_php_from_dir(THEME_PATH.'/wpbackery/');\n }\n }",
"protected function output_header() {\n include dirname( __FILE__ ) . '/views/html-csv-import-header.php';\n }",
"public function enableConcatenateFiles() {}",
"function qode_membership_include_shortcodes_file() {\n\t\tforeach(glob(QODE_MEMBERSHIP_SHORTCODES_PATH.'/*/load.php') as $shortcode_load) {\n\t\t\tinclude_once $shortcode_load;\n\t\t}\n\t\t\n\t\tdo_action('qode_membership_action_include_shortcodes_file');\n\t}",
"protected function _includes() {\r\n\t\t\tinclude_once LP_ADDON_PAYIR_PAYMENT_INC . 'class-lp-gateway-payir.php';\r\n\t\t}",
"protected function isIncludible ($file) {\n\t\treturn preg_match('/\\.php$/i', $file);\n\t}",
"function get_include_contents($filename) {\n\t\tif (is_file($filename)) {\n\t\t\tob_start();\n\t\t\tinclude $filename;\n\t\t\t$contents = ob_get_contents();\n\t\t\tob_end_clean();\n\t\t\treturn $contents;\n\t\t}\n\t\treturn false;\n\t}",
"function include_user_files($dir=G_USER_PHP_FILES)\r\n{\r\n log_debug(\"include_user_files( {$dir} )\");\r\n\r\n if (file_exists($dir) && is_dir($dir))\r\n {\r\n $usr = opendir($dir);\r\n\r\n if ($usr)\r\n {\r\n while (false !== ($f = readdir($usr)))\r\n {\r\n if ($f == '.' || $f == '..')\r\n {\r\n continue;\r\n }\r\n\r\n $fn = \"{$dir}/{$f}\";\r\n\r\n if (is_dir($fn))\r\n {\r\n include_user_files($fn);\r\n }\r\n else if (is_file($fn))\r\n {\r\n log_debug(\"Including file {$fn}\");\r\n include_once($fn);\r\n }\r\n }\r\n\r\n closedir($usr);\r\n }\r\n }\r\n}",
"function requireFile($file)\n{\n require_once $file;\n}",
"public function stopIncluding($fileName)\n\t{\n\t\tarray_pop($this->files);\n\t\trestore_error_handler();\n\t}",
"function include_lang_file($file,$language)\n {\n global $iConfig;\n $def_lang = $iConfig['default_lng'];\n if (empty($language)) $language = $def_lang;\n $path = 'language/'.$language.$file;\n if (!file_exists($path))\n {\n $path='language/en'.$file;\n } \n if (file_exists($path))\n {\n @include($path); \n }\n }",
"static function return_output($file){\n ob_start();\n include $file;\n return ob_get_clean();\n }",
"static protected function includeClass($classFile) {\r\n\t\t$classFile .= '.php';\r\n\t\tif (file_exists($classFile)) {\r\n\t\t\treturn (bool)include_once($classFile);\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"static function autoload()\r\n\t{\r\n\t\t\r\n\t}",
"function get_the_file($file_path) {\n\n md_include_component_file($file_path);\n\n }",
"static function include_scripts(){\n\t\t//self::include_css();\n\t\tself::include_js();\n\t}"
] | [
"0.71809965",
"0.7156577",
"0.6958148",
"0.69274503",
"0.67305917",
"0.6722691",
"0.6722691",
"0.6704404",
"0.6621242",
"0.66034496",
"0.65527356",
"0.6498024",
"0.63912016",
"0.6371894",
"0.63444877",
"0.6331455",
"0.63269925",
"0.63163155",
"0.63129747",
"0.6302521",
"0.628466",
"0.62532485",
"0.6240881",
"0.62406635",
"0.62197256",
"0.6208475",
"0.6199189",
"0.61714053",
"0.61658907",
"0.61627245",
"0.61585385",
"0.61394936",
"0.61157125",
"0.6110662",
"0.60996747",
"0.60915464",
"0.606973",
"0.6043675",
"0.60431314",
"0.60292244",
"0.6017201",
"0.59918886",
"0.59780306",
"0.5954172",
"0.5950846",
"0.5945894",
"0.59331524",
"0.5925672",
"0.591111",
"0.58804625",
"0.5874086",
"0.5863498",
"0.5860602",
"0.5854403",
"0.5854218",
"0.585411",
"0.58453465",
"0.5840863",
"0.5833882",
"0.5830535",
"0.58176774",
"0.58067465",
"0.5800622",
"0.5797577",
"0.5793261",
"0.5789013",
"0.57724684",
"0.57493573",
"0.5739321",
"0.57341707",
"0.5728886",
"0.5724283",
"0.56977206",
"0.56961817",
"0.56951773",
"0.56888396",
"0.56879187",
"0.56874603",
"0.56860507",
"0.5682022",
"0.56765956",
"0.567236",
"0.5657866",
"0.5656909",
"0.5650001",
"0.5643753",
"0.56423527",
"0.5641553",
"0.5638077",
"0.5628612",
"0.56188375",
"0.5615362",
"0.5615154",
"0.56081593",
"0.55958956",
"0.55952084",
"0.5593545",
"0.558791",
"0.5571256",
"0.55632776",
"0.55617684"
] | 0.0 | -1 |
An alternative approach to autoload composer base file without the need of vendor/autoload.php native file | private function composerGetMap($class)
{
if(! self::$psrs) {
self::$psrs['cm'] = include $this->vendor.'composer/autoload_classmap.php';
self::$psrs['psr4'] = include $this->vendor.'composer/autoload_psr4.php';
self::$psrs['ns'] = include $this->vendor.'composer/autoload_namespaces.php';
}
// check in class map first, since it the most simplest form.
if(isset(self::$psrs['cm'][$class])) {
$this->composerIncludeFile(self::$psrs['cm'][$class]);
return self::$psrIncluded[$class] = 1;
}
// check file by \ separator
if(! $this->getFileMap($class)) {
$trace = debug_backtrace(DEBUG_BACKTRACE_PROVIDE_OBJECT, 3)[2];
throw new LoaderException('Resource ' . $class . ' not available! please check your class or namespace name.', 0, 1, $trace['file'], $trace['line']);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function autoload()\n {\n if (file_exists(__DIR__ . '/Stringprep/vendor/autoload.php')) {\n require_once __DIR__ . '/Stringprep/vendor/autoload.php';\n } else {\n require_once __DIR__ . '/../../bundle/vendor/autoload.php';\n }\n }",
"private static function composerAutoload(): void\n {\n self::require(ROOT . '/vendor/autoload.php');\n }",
"function requireAutoloader(): void\n{\n if (file_exists(__DIR__ . \"/../../vendor/autoload.php\")) {\n require_once __DIR__ . \"/../../vendor/autoload.php\";\n\n return;\n }\n\n $dir = __DIR__;\n $prev_dir = \"\";\n\n while ($dir != $prev_dir) {\n\n $prev_dir = $dir;\n $dir = dirname($dir);\n\n if (file_exists($dir . \"/autoload.php\")) {\n require_once $dir . \"/autoload.php\";\n\n return;\n }\n }\n\n throw new RuntimeException(\"autoload.php not found!\");\n}",
"private static function vendor() {\n $file = Storange::getPathFile('vendor/autoload.php');\n if (file_exists($file)) {\n include_once $file;\n } else {\n throw new exceptions\\LoadFiles('Error to load vendor autoload. Check the composer libs', 0);\n }\n }",
"function my_custom_autoloader($class_name) {\n $file = __DIR__ . \"/includes/\" . $class_name . \".php\";\n\n if (file_exists($file)) {\n require_once $file;\n }\n}",
"public static function getComposer();",
"function loadDependencies() {\n if (strpos(TERMINUS_ROOT, 'phar:') === 0) {\n require TERMINUS_ROOT . '/vendor/autoload.php';\n return;\n }\n\n $has_autoload = false;\n\n foreach (getVendorPaths() as $vendor_path) {\n if (file_exists($vendor_path . '/autoload.php')) {\n require $vendor_path . '/autoload.php';\n $has_autoload = true;\n break;\n }\n }\n\n if (!$has_autoload) {\n fputs(STDERR, \"Internal error: Can't find Composer autoloader.\\n\");\n exit(3);\n }\n}",
"protected function loadDependencies()\n {\n // See: https://github.com/concrete5/concrete5-5.7.0/issues/360\n $filesystem = new Filesystem();\n $filesystem->getRequire(__DIR__ . '/vendor/autoload.php');\n }",
"private function registerComposerAutoloader()\n {\n if (class_exists(ClassLoader::class, false)) {\n return;\n }\n \n if (file_exists(__DIR__ . '/../vendor/autoload.php')) {\n require_once __DIR__ . '/../vendor/autoload.php';\n } elseif (file_exists(__DIR__ . '/../../../../vendor/autoload.php')) {\n require_once __DIR__ . '/../../../../vendor/autoload.php';\n } elseif (file_exists(__DIR__ . '/../../vendor/autoload.php')) {\n require_once __DIR__ . '/../../vendor/autoload.php';\n } else {\n throw new \\Exception('Could not find composer autoloader');\n }\n }",
"protected function registerComposerAutoload(): void\n {\n $autoloadFiles = [\n __DIR__.'/../../../../autoload.php',\n __DIR__.'/../../../autoload.php',\n __DIR__.'/../../vendor/autoload.php',\n __DIR__.'/../../../vendor/autoload.php',\n ];\n\n $autoloadFile = current(array_filter($autoloadFiles, function (string $path) {\n return file_exists($path);\n }));\n\n if (false === $autoloadFile) {\n throw new RuntimeException('Composer autoload not found!');\n }\n\n require $autoloadFile;\n }",
"function autoload($class_name)\n{\n $class_name = ltrim($class_name, '\\\\');\n $file_name = '';\n $namespace = '';\n if ($last_ns_pos = strrpos($class_name, '\\\\')) {\n $namespace = substr($class_name, 0, $last_ns_pos);\n $class_name = substr($class_name, $last_ns_pos + 1);\n $file_name = str_replace('\\\\', DIRECTORY_SEPARATOR, $namespace) . DIRECTORY_SEPARATOR;\n }\n $file_name .= str_replace('_', DIRECTORY_SEPARATOR, $class_name) . '.php';\n\n require $file_name;\n}",
"abstract protected static function autoload($class);",
"function autoloader()\n {\n spl_autoload_register(function ($className) {\n\n # DIRECTORY SEPARATORS varies in various platforms\n $ds = DIRECTORY_SEPARATOR;\n\n # Current Working Directory\n $dir = __DIR__;\n\n # replace namespace separator with directory separator (prolly not required)\n $className = str_replace('\\\\', $ds, $className);\n\n # get full name of file containing the required class\n $file = \"{$dir}{$ds}{$className}.php\";\n\n # get file if it is readable\n if (is_readable($file)) {\n require_once $file;\n }\n });\n }",
"function my_autoloader($class)\n{\n $filename = BASE_PATH . '/'. str_replace('\\\\', '/', $class) . '.php';\n include($filename);\n}",
"function autoload($class_name)\n{\n $exp_arr = explode('_', $class_name);\n if (count($exp_arr) === 1) {\n $folder = 'core';\n } else {\n $n = array_pop($exp_arr);\n $folder = $n . ($n[strlen($n) - 1] == 's' ? 'es' : 's');\n }\n switch($folder) {\n case \"controllers\":\n $arr = explode('_', $class_name);\n $sub_folder = array_shift($arr);\n $class_file = PROTECTED_DIR . $folder . DS . PROJECT . DS . $sub_folder . DS . $class_name . '.php';\n break;\n case \"helpers\":\n case \"templates\":\n $class_file = PROTECTED_DIR . $folder . DS . PROJECT . DS . $class_name . '.php';\n break;\n default:\n $class_file = PROTECTED_DIR . $folder . DS . $class_name . '.php';\n break;\n }\n if (file_exists($class_file)) {\n require_once($class_file);\n }\n}",
"function __autoload($className) {\n include \"src/\" . $className . '.php';\n}",
"private function loadVendorDirectories() : void\n\t\t{\n\t\tif (! $this->composerJsonPath)\n\t\t\t{\n\t\t\treturn;\n\t\t\t}\n\n\t\t$composerJsonPath = $this->composerJsonPath . 'composer.lock';\n\t\t$composerJsonPath = \\str_replace('//', '/', $composerJsonPath);\n\t\t$json = \\json_decode(@\\file_get_contents($composerJsonPath), true, 512);\n\n\t\tif (! $json)\n\t\t\t{\n\t\t\tthrow new \\Exception(\"{$composerJsonPath} does not appear to be a valid composer.lock file\");\n\t\t\t}\n\n\t\tforeach ($json['packages'] as $package)\n\t\t\t{\n\t\t\t$packagePath = $this->composerJsonPath . 'vendor/' . $package['name'];\n\t\t\t$autoload = $package['autoload'] ?? [];\n\t\t\t$namespace = $sourceDir = '';\n\t\t\t$autoLoadTypes = ['psr-4', 'psr-0', 'classmap'];\n\n\t\t\tforeach ($autoLoadTypes as $type)\n\t\t\t\t{\n\t\t\t\t$path = $packagePath . '/';\n\t\t\t\t$path = \\str_replace('\\\\', '/', $path);\n\t\t\t\t$path = \\str_replace('//', '/', $path);\n\n\t\t\t\tforeach ($autoload[$type] ?? [] as $namespace => $sourceDir)\n\t\t\t\t\t{\n\t\t\t\t\tif ('psr-4' == $type)\n\t\t\t\t\t\t{\n\t\t\t\t\t\tif (\\is_array($sourceDir))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tforeach ($sourceDir as $dir)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tNamespaceTree::addNamespace($namespace, $path . $dir);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tNamespaceTree::addNamespace($namespace, $path . $sourceDir);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\telseif ('psr-0' == $type)\n\t\t\t\t\t\t{\n\t\t\t\t\t\tif (\\is_array($sourceDir))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tforeach ($sourceDir as $dir)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif ($dir)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$dir .= $namespace;\n\t\t\t\t\t\t\t\t\t$dir = \\str_replace('\\\\', '/', $dir);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tNamespaceTree::addNamespace($namespace, $path . $dir);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ($sourceDir)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$sourceDir .= '/' . $namespace;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$sourceDir = $namespace;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$sourceDir = \\str_replace('\\\\', '/', $sourceDir);\n\t\t\t\t\t\t\t$sourceDir = \\str_replace('//', '/', $sourceDir);\n\t\t\t\t\t\t\tNamespaceTree::addNamespace($namespace, $path . $sourceDir);\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}",
"public static function chainload() {\n require_once self::BASE_PATH . \"/vendor/autoload.php\";\n foreach (scandir(dirname(__FILE__)) as $filename) {\n $path = dirname(__FILE__) . \"/\" . $filename;\n if (is_file($path) && substr_compare($path, \".php\", strlen($path) - strlen(\".php\"), strlen(\".php\")) === 0) {\n require_once $path;\n }\n }\n }",
"function autoload($class_name)\n{\n $parts = str_replace('\\\\', '/', $class_name);\n \n $dir = dirname(__FILE__). '/';\n \n if (is_file($dir . $parts . '.php')) {\n include_once $dir . $parts . '.php';\n }\n}",
"function guoClassLoader($class)\n{\n $path = str_replace('Jwt\\\\', '', $class);\n $file = __DIR__ . '/src/' . $path . '.php';\n if (file_exists($file)) {\n require_once $file;\n }\n}",
"function autoload($name) {\r\n require strtolower($name) . '.php';\r\n}",
"function autoload($className) {\n if(\\strpos($className, 'WordPress\\ThammIT\\Plugins\\TiWpShortcodes') === false) {\n return;\n }\n\n // Split the class name into an array to read the namespace and class.\n $fileParts = \\explode('\\\\', $className);\n\n // Do a reverse loop through $fileParts to build the path to the file.\n $namespace = '';\n for($i = \\count($fileParts) - 1; $i > 0; $i--) {\n // Read the current component of the file part.\n $current = \\str_ireplace('_', '-', $fileParts[$i]);\n\n $namespace = '/' . $current . $namespace;\n\n // If we're at the first entry, then we're at the filename.\n if(\\count($fileParts) - 1 === $i) {\n $namespace = '';\n $fileName = $current . '.php';\n\n /* If 'interface' is contained in the parts of the file name, then\n * define the $file_name differently so that it's properly loaded.\n * Otherwise, just set the $file_name equal to that of the class\n * filename structure.\n */\n if(\\strpos(\\strtolower($fileParts[\\count($fileParts) - 1]), 'interface')) {\n // Grab the name of the interface from its qualified name.\n $interfaceNameParts = \\explode('_', $fileParts[\\count($fileParts) - 1]);\n $interfaceName = $interfaceNameParts[0];\n\n $fileName = $interfaceName . '.php';\n }\n }\n\n // Now build a path to the file using mapping to the file location.\n $filepath = \\trailingslashit(\\dirname(\\dirname(__FILE__)) . $namespace);\n $filepath .= $fileName;\n\n // If the file exists in the specified path, then include it.\n if(\\file_exists($filepath)) {\n include_once($filepath);\n }\n }\n}",
"function __autoload($name) {\n $file = str_replace(\"\\\\\", \"/\", $name);\n $file = ROOT . '/' . $file . '.php';\n\n if (!file_exists($file)) {\n return;\n }\n\n require_once $file;\n}",
"function autoload($className)\n{\n $prefix = \"App\";\n $dir = \"./src\";\n $clss = substr($className, strlen($prefix));\n $clss = str_replace(\"\\\\\", \"/\", $clss);\n if (file_exists(\"{$dir}{$clss}.php\")) {\n require \"{$dir}{$clss}.php\";\n }\n}",
"static function autoload()\r\n\t{\r\n\t\t\r\n\t}",
"function autoload($class)\n{\n require dirname($_SERVER['SCRIPT_FILENAME']) . '//..//..//' . str_replace('\\\\', '/', $class) . '.php';\n}",
"function __autoload($class)\n{\n require(str_replace('_', DIRECTORY_SEPARATOR, $class) . '.php');\n}",
"function autoload ($className) {\n \n $file = dirname(__FILE__) . '/' . $className . '.php';\n if (file_exists($file)) {\n require $file;\n }\n}",
"public function registerAutoloader() : void\n {\n require_once __DIR__ . '/../vendor/autoload.php';\n }",
"function classAutoload($class_name) {\n if (file_exists( __DIR__ . '/includes/classes/' . $class_name . '.php')) {\n require_once __DIR__ . '/includes/classes/' . $class_name . '.php';\n }\n}",
"function __autoload($class) {\n require ($class . '.php');\n}",
"function autoload($class) { \n // convert namespace to full file path \n $filename = dirname(__DIR__).'/'.str_replace('\\\\', '/', $class) . '.php';\n \n if(file_exists($filename)) {\n require_once($filename);\n }\n}",
"public static function autoload() {\n spl_autoload_register(function($class) {\n $prefix = __CLASS__ . '\\\\';\n if (strpos($class, $prefix) === 0) {\n // Remove vendor from name.\n $class = substr($class, strlen(__NAMESPACE__) + 1);\n // Convert namespace separator to directory ones.\n $class = str_replace('\\\\', DIRECTORY_SEPARATOR, $class);\n // Prefix with this file's directory.\n $class = __DIR__ . DIRECTORY_SEPARATOR . $class;\n\n require \"$class.php\";\n\n return true;\n }\n\n return false;\n });\n }",
"public function autoLoad($name){\n\t\t$path = NULL;\n\t\t$namespaceParts = explode('\\\\', $name);\n\t\t$pathTail = implode(DIRECTORY_SEPARATOR, $namespaceParts) . '.php';\n\t\t\n\t\t$tryPath = $this->rootPath . '/' . $pathTail;\n\t\t\n\t\tif(is_readable($tryPath)){\n\t\t\t$path = $tryPath;\n\t\t}\n\t\t\n\t\t// this must not throw an exception or do any kind of error as if it does\n\t\t// then when you use class_exists it will error instead of returning false\n\t\tif ($path) {\n\t\t\trequire_once($path); \n\t\t}\n\t}",
"function autoload($class)\n{\n // if file does not exist in LIBS_PATH folder [set it in config/config.php]\n //require dirname( __FILE__ ).'/../classes/PHPLogin.php';\n}",
"function autoload($classname)\n{\n if (file_exists($file = __DIR__ . '/' . $classname . '.php'))\n {\n require $file;\n }\n}",
"public static function autoload($class) {\n include $class . '.php';\n}",
"function __autoload($class_name) {\n require_once '../../include/' . $class_name . '.php';\n}",
"function my_autoloader($class) {\n require_once './../../classes/' . $class . '.php';\n}",
"function __autoload($class_name) {\n require_once '/' . $class_name . '.php';\n}",
"function __mashineAutoload($class_name)\n{\n if (preg_match(\"/([a-zA-Z0-9]*)ApiController$/\", $class_name, $matches)) {\n $api_path = preg_replace(\"/plugins.*/\", \"controllers\".DS.\"api\", __FILE__);\n\n $file = $api_path.DS.strtolower($matches[1]).\".php\";\n if (is_file($file)) {\n include $file;\n }\n }\n}",
"function getComposerFileData()\n{\n $arr = [];\n $arr['autoload']['files'] = ['src/Arrays.php'];\n $arr['config'] = ['vendor-dir' => '/composer/vendor'];\n return $arr;\n}",
"function SuperheroServiceAutoload($class){\n require_once $class . '.php';\n}",
"protected function getStub()\n {\n return __DIR__.'/../stubs/composer.stub';\n }",
"function autoload_lib($name)\n\t{\n\t$a = explode(\"\\\\\", $name);\n\t$end = $a[count($a) - 1];\n\t$name = str_replace(\"\\\\\", \"/\", $name);\n\n\t$folders = \\Config::$autoload_dirs;\n\n\t$errors = array();\n\tforeach ($folders as $folder) {\n\n\t\t// $steps = substr_count($folder, '/');\n\t\t// $up = $steps ? str_repeat('/..', $steps + 1) : '/../..';\n\t\t\n\t\t$path = __DIR__ . \\Config::$autoload_ups . \\Config::$local_path . \"$folder/$name\";\n\n\t\t$dir = \"$path/$end.php\";\n\t\t$file = \"$path.php\";\n\n\t\tif (file_exists($file)) {\n\t\t\trequire $file;\n\t\t\treturn;\n\t\t\t}\n\t\telse if (file_exists($dir)) {\n\t\t\trequire $dir;\n\t\t\treturn;\n\t\t\t}\n\t\telse {\n\t\t\t$errors[] = $file;\n\t\t\t$errors[] = $dir;\n\t\t\t}\n\t\t}\n\n\t/* *\n\tif (! empty($errors)) {\n\t\tdie('<pre>'\n\t\t\t. \"Can't find possible files to include:\\n\"\n\t\t\t. implode(\"\\n\", array_map('strtolower', $errors))\n\t\t\t. '</pre>'\n\t\t\t);\n\t\t}\n\t\t/* */\n\t}",
"function __autoload( $c ) {\r\n\tinclude( __DIR__.'/'.$c.'.php' );\r\n}",
"private static function libAutoload(): void\n {\n \\spl_autoload_register('self::autoload');\n }",
"function autoloader($class_name) {\n\n $array_paths = [\n '/models/',\n '/components/',\n '/controllers/',\n ];\n\n foreach ($array_paths as $path) {\n\n $path = ROOT . $path . $class_name . '.php';\n\n if (is_file($path)) {\n include_once $path;\n }\n }\n}",
"function rum_class_loader() {\n $loader = new UniversalClassLoader();\n $loader->registerNamespace('Rum', __DIR__ . '/lib');\n $loader->register();\n}",
"function __autoload($class)\n{\n $fileName = __DIR__ . '/' . str_replace('\\\\', '/', $class) . '.php';\n include ($fileName);\n}",
"function __autoload($pClassName) {\r\n if (file_exists($pClassName.'.php')) {\r\n require_once($pClassName.'.php');\r\n return true;\r\n } else if (file_exists('wrapper/'.$pClassName.'.php')) {\r\n require_once('wrapper/'.$pClassName.'.php');\r\n return true;\r\n }\r\n return false; \r\n}",
"protected function composerAutoloadDev() :void\n {\n $file = app_path('composer.json');\n $contents = Storage::get($file);\n\n $json = json_decode($contents, true);\n $json['autoload-dev'] = [\n 'classmap' => [\n 'tests/'\n ]\n ];\n $json = json_encode($json, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);\n\n Storage::put($file, $json);\n }",
"function my_autoloader($class) {\r\n require 'libs/' . $class . '.php';\r\n}",
"protected function loadBaseExtensions() {}",
"function __autoload($class_name) {\n include '../class/' . $class_name . '.php';\n}",
"function __autoload($class_name) {\n include '../class/' . $class_name . '.php';\n}",
"public function getComposerPath(): string;",
"function __autoload($name){\n require_once './class/' . $name . \".class.php\";\n}",
"function __autoload($classname)\n{\n $classpart = explode('\\\\',$classname);\n if (false==strpos('//',$classname)):\n $classpart = explode('\\\\',$classname);\n if ('App' == $classpart[0]):\n unset($classpart[0]);\n $load = __DIR__ . '/' . implode('/', $classpart) . '.php';\n echo $load . '<br>';\n require $load;\n endif;\n endif;\n}",
"function setComposerLoader($file)\r\n {\r\n }",
"function __autoload($class_name) {\n if (strpos($class_name, '\\\\') !== FALSE) {\n $pieces = explode('\\\\', $class_name);\n $class_name = $pieces[count($pieces) - 1];\n }\n include dirname(__FILE__) . '/' . $class_name . '.php';\n}",
"protected static function _composer($composer)\n {\n $path = 'vendor/autoload.php';\n\n if( $composer === true )\n {\n if( file_exists($path) )\n {\n import($path);\n }\n else\n {\n Logger::report('Error', Lang::select('Error', 'fileNotFound', $path) ,'AutoloadComposer');\n\n throw new GeneralException('Error', 'fileNotFound', $path);\n }\n }\n elseif( is_file($composer) )\n {\n import($composer);\n }\n else\n {\n $path = suffix($composer) . $path;\n\n Logger::report('Error', Lang::select('Error', 'fileNotFound', $path) ,'AutoloadComposer');\n\n throw new GeneralException('Error', 'fileNotFound', $path);\n }\n }",
"function vehicleAbsClassLoader()\n\t{\n\t\t$path = 'Classes/Vehicles/Abs.php';\n\t\tif (file_exists($path)){\n\t\t\trequire_once($path);\n\t\t}\n\t}",
"function autoload($name) {\n\trequire_once(ROOT.'inc/class.'.strtolower($name).'.php');\n}",
"function __autoload($class_name) {\r\n include '../class/' . $class_name . '.php';\r\n}",
"function _autoload($class)\r {\r $class = str_replace(\"\\\\\", \"/\", $class);\r $class = str_replace('yqn/sdkmiddle/', 'src/', $class);\r $file = __DIR__ . '/../' . $class . '.php';\r require_once $file;\r }",
"function __autoload($class_name) {\n\t$inc = ['sys/core/', 'sys/libs/'];\n\tforeach ($inc as $in) {\n\t\t$path = APP_DIR . $in . $class_name . '.php';\n\t\tif (file_exists($path)) {\n\t\t\tinclude $path;\n\t\t}\n\t}\n}",
"function enqueue_packages_57bf3aeb7375245730b8520e94c8d1e2() {\n\t$class_map = require_once dirname( __FILE__ ) . '/composer/autoload_classmap_package.php';\n\tforeach ( $class_map as $class_name => $class_info ) {\n\t\tenqueue_package_class( $class_name, $class_info['version'], $class_info['path'] );\n\t}\n\t\n\t$includeFiles = require __DIR__ . '/composer/autoload_files.php';\n\n\tforeach ( $includeFiles as $fileIdentifier => $file ) {\n\t\tif ( empty( $GLOBALS['__composer_autoload_files'][ $fileIdentifier ] ) ) {\n\t\t\trequire $file;\n\n\t\t\t$GLOBALS['__composer_autoload_files'][ $fileIdentifier ] = true;\n\t\t}\n\t}\n}",
"function __autoload ( $class_name )\n {\n include '../' . $class_name . '.php';\n }",
"static public function autoload() {\n spl_autoload_register(array(__CLASS__, 'loader'));\n }",
"function class_autoloader($class)\n{\n $filename = dirname(__FILE__) . DS . '..' . DS . 'includes' . DS . 'class-' . strtolower($class) . '.php';\n\n if (file_exists($filename)) {\n require $filename;\n }\n}",
"private function autoload($className)\r\n {\r\n }",
"function __autoload($className) {\n require PATH_ZABBIX_API_CLASSES_DIRECTORY.'/'.$className.'.php';\n}",
"public static function registerAutoloader(){\n\t\tspl_autoload_register(__NAMESPACE__ . \"\\\\Jolt::autoload\");\n\t}",
"function my_autoloader($classname)\n{\n\tchdir('challenge/are_you_serial');\n\trequire_once './'.str_replace('.', '', $classname).'.php';\n\tchdir('../../');\n}",
"function __autoload($nome_classe){\n require_once '../libs/' . $nome_classe . '.php';\n}",
"function autoload( $className ){\n\tif ( file_exists( $file = dirname( __FILE__). \"/../class/\".$className.\".class.php\" ) ){\n\t\trequire ( $file ); \n\t}\n}",
"function autoloaderCurrentFolder($className)\n{\n if (file_exists($className . '.php')) {\n include $className . '.php';\n }\n}",
"function __autoload($class)\n{\n $fileName = $class . '.php';\n //$fileName = __DIR__ . '/' . str_replace('\\\\', '/', $class) . '.php';\n include ($fileName);\n}",
"function __autoload($className){\n if (file_exists(\"core/$className.php\")){\n include_once \"core/$className.php\";\n }\n}",
"function __autoload($className)\r\n{\r\n require_once $className . '.php';\r\n}",
"function spl_autoload_custom($name)\n{\n\t$rc = FALSE;\n\t\n\t$exts = explode(',', spl_autoload_extensions());\n\t$sep = (substr(PHP_OS, 0, 3) == 'Win') ? ';' : ':';\n\t$paths = explode($sep, ini_get('include_path'));\n\tforeach($paths as $path) {\n\t\tforeach($exts as $ext) {\n\t\t\t$file = $path . DIRECTORY_SEPARATOR . $name . $ext;\n\t\t\tif(is_readable($file)) {\n\t\t\t\trequire_once $file;\n\t\t\t\t$rc = $file;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn $rc;\n}",
"function autoload($class) \n{\n $paths = explode(PATH_SEPERATOR, get_include_path());\n $flags = PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE;\n $file = str_replace(\"\\\\\", DIRECTORY_SEPARATOR, trim($class, \"\\\\\")).\".php\"; //need to set name of php file to lowercase because of stringtolower command\n foreach ($paths as $path) {\n\t\t $combined = $path.DIRECTORY_SEPARATOR.$file;\n\t\t if (file_exists($combined)) {\n\t\t\t //echo '<br>'.$combined.'<br>'; //Troubleshooting code to echo out the file that's being loaded\n\t\t\t //exit;\n\t\t \tinclude($combined);\n\t\t\t return;\n }\n }\n throw new Exception(\"{$class} not found\");\n}",
"function __autoload($class) {\n include './libs/class_'.$class.'.php';\n}",
"function autoload($className) {\n\tstatic $paths;\n\t\n\t// Collect all sub-folders of \"plugins\" (the directory of this file)\n\t// Each plugin directory contains a folder called \"scripts\" which contains\n\t// a common namespace structure.\n\tif (!$paths) {\n\t\t$paths = array();\n\t\tforeach (new DirectoryIterator(__DIR__) as $fileInfo) {\n\t if ($fileInfo->isDir() && !$fileInfo->isDot()) \n\t \t$paths[] = $fileInfo->getPathname();\n\t\t}\n\t}\n\t\n\tforeach ($paths as $path) {\n\t\t$fileName = $path.'/scripts/'.str_replace('\\\\', '/', $className).'.php';\n\t\tif (\\file_exists($fileName) && \\is_file($fileName)) {\n\t\t\trequire_once($fileName);\n\t\t\tbreak;\n\t\t}\n\t}\n}",
"function __autoload($class_name) {include $class_name . '.php';}",
"private function composerReload()\n {\n $composer = $this->findComposer();\n\n $process = new Process($composer.' dump-autoload');\n $process->setTimeout(null); // Setting timeout to null to prevent installation from stopping at a certain point in time\n $process->setWorkingDirectory(base_path())->run();\n }",
"protected static function getClassLoader() {}",
"function my_autoloader($class_name) \n\t{\n \tinclude '../classes/' . $class_name . '.class.php';\n\t}",
"static public function autoload($class, $base = '')\n {\n if (($pos = strpos($class, '\\\\')) === FALSE)\n {\n // No base namespace given\n return;\n }\n $base .= substr($class, 0, $pos);\n $class = substr($class, $pos);\n if (in_array($base, array_keys(self::$paths)) === FALSE)\n {\n self::autoload(substr($class, 1), $base . \"\\\\\"); // Check for nested base namespace (MyKey\\MySubkey\\MyClass)\n // Base namespace not registered\n return;\n }\n $classPath = self::$paths[$base].'/'.str_replace('\\\\', '/', $class) . '.php';\n if (($realClassPath = realpath($classPath)) === FALSE)\n {\n self::autoload(substr($class, 1), $base . \"\\\\\"); // Check for nested base namespace (MyKey\\MySubkey\\MyClass)\n // Invalid path\n return;\n }\n require_once $realClassPath;\n return;\n }",
"static function autoload($class){\n\n require BASEDIR.'\\\\'.str_replace('\\\\', '/', $class).'.php';\n\t}",
"public function setupAutoload()\n {\n static::$autoload or spl_autoload_register(\n $this->psr4LoaderFor(__NAMESPACE__, __DIR__),\n true,\n true\n );\n\n static::$autoload = true;\n }",
"final public function __construct()\n {\n // Mengecek folder vendor jika sudah ada\n // Untuk memuat Autoload yang di buat oleh composer.\n $vendor = getProjectDirectory() . DIRECTORY_SEPARATOR . '/vendor';\n \n if ( is_dir( $vendor ) ) {\n if ( file_exists( $vendor . $this->autoload ) ) {\n require $vendor . $this->autoload;\n }\n return false;\n }\n spl_autoload_register( 'Autoload', 'loadClassBySplAutoload' );\n }",
"function my_autoloader($class) {\r\n\t require_once ($class.'.php');\r\n\t}",
"public static function __autoload()\n\t{\n\t\tself::$FPATH = dirname(__DIR__);\n\t\tself::$APATH = self::detect_project();\n\n\t\tspl_autoload_register(array(__CLASS__, 'load'));\n\n\t\tself::cache_files();\n\t\tself::import_initializers();\n\t}",
"function autoloader($classname){\n $lastSlash = strpos($classname, '\\\\') + 1;\n $classname = substr($classname, $lastSlash);\n $directory = str_replace('\\\\' , '/' , $classname);\n $filename = __DIR__ . '/' . $directory . '.php';\n\n require_once $filename;\n }",
"function __autoload($class)\n{\n\trequire_once $class . '.php';\n}",
"function composer_require_once($lib, $filename){\n\t$originalPath = get_include_path();\n\t$libPath = \"vendor/$lib\";\n\tset_include_path(\"vendor:$libPath\");\n\t$requiredFile = \"src/$filename\";\n\n\tif (stream_resolve_include_path($requiredFile))\n\t\trequire_once $requiredFile;\n\telse\n\t\tthrow new Exception(\"composer_require_once -> require_once({$requiredFile}): failed to open stream. Include path = \\\"\" . get_include_path() . \"\\\"\");\n\n\tset_include_path($originalPath);\n}",
"public static function autoload()\n {\n spl_autoload_register(array(__CLASS__,'load'));\n }",
"function autoLoad() {\n\t$path = dirname(__FILE__);\n\n\t// Autoload manual important files\n\t$Autoload = array();\n\t$Autoload[] = $path . DIRECTORY_SEPARATOR . 'Utils' . DIRECTORY_SEPARATOR . 'lexa-xml-serialization.php';\n\t$Autoload[] = $path . DIRECTORY_SEPARATOR . 'Client' . DIRECTORY_SEPARATOR . 'Builder' . DIRECTORY_SEPARATOR . 'PartyBuilder.php';\n\t$Autoload[] = $path . DIRECTORY_SEPARATOR . 'ServiceConnection' . DIRECTORY_SEPARATOR . 'ServiceConnection.php';\n\t$Autoload[] = $path . DIRECTORY_SEPARATOR . 'ServiceConnection' . DIRECTORY_SEPARATOR . 'Communication.php';\n\t$Autoload[] = $path . DIRECTORY_SEPARATOR . 'Client' . DIRECTORY_SEPARATOR . 'Party.php';\n\n\n\tforeach ($Autoload as &$a) {\n\t\tif (file_exists($a)) {\n\t\t\trequire_once($a);\n\t\t}\n\t}\n\n\n\t$objects = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path), RecursiveIteratorIterator::SELF_FIRST);\n\tforeach ($objects as $name => $object) {\n\t\tif (substr($object->getBasename(), strpos($object->getBasename(), \".\")) == '.php') {\n\t\t\tif (!stristr($object->getBasename(), 'test')) {\n\t\t\t\trequire_once($object->getPath() . DIRECTORY_SEPARATOR . $object->getBasename());\n\t\t\t}\n\t\t}\n\t}\n}",
"function autoload( $class ) {\n\tif ( strpos( $class, __NAMESPACE__ . '\\\\' ) !== 0 ) {\n\t\treturn;\n\t}\n\n\t$file = substr( $class, strlen( __NAMESPACE__ . '\\\\' ) );\n\t$file = strtolower( $file );\n\t$parts = explode( '\\\\', $file );\n\t$last = array_pop( $parts );\n\n\t$path = __DIR__ . '/inc/' . implode( '/', $parts );\n\t$path = untrailingslashit( $path ) . '/class-' . $last . '.php';\n\n\trequire $path;\n}"
] | [
"0.72390115",
"0.7123591",
"0.6885223",
"0.65720206",
"0.64921516",
"0.63491267",
"0.6346775",
"0.63372886",
"0.6309297",
"0.628683",
"0.62226224",
"0.6203183",
"0.61799353",
"0.61720675",
"0.6162339",
"0.6152112",
"0.61502373",
"0.61457556",
"0.60885745",
"0.60857433",
"0.607306",
"0.60508907",
"0.60495645",
"0.604831",
"0.60431594",
"0.6029036",
"0.6012974",
"0.60099494",
"0.59957457",
"0.5989644",
"0.5978013",
"0.59672153",
"0.596121",
"0.59580296",
"0.59426284",
"0.5941201",
"0.5919306",
"0.59108007",
"0.58961725",
"0.5895226",
"0.5893818",
"0.58613974",
"0.5854833",
"0.5841739",
"0.5839665",
"0.58370155",
"0.58330107",
"0.5822378",
"0.58176327",
"0.5817036",
"0.5810635",
"0.5809949",
"0.58098966",
"0.58063245",
"0.58048403",
"0.58048403",
"0.5800579",
"0.57910246",
"0.5790907",
"0.5775151",
"0.57721585",
"0.57542485",
"0.5753677",
"0.5748715",
"0.572615",
"0.5713679",
"0.5710089",
"0.5708215",
"0.57073045",
"0.57065064",
"0.5696975",
"0.56923807",
"0.5687558",
"0.5685176",
"0.56845105",
"0.5682446",
"0.5678001",
"0.5677966",
"0.5674752",
"0.5668517",
"0.56683487",
"0.56599915",
"0.5653238",
"0.565044",
"0.56449395",
"0.56447905",
"0.5634601",
"0.5624837",
"0.5622934",
"0.5610297",
"0.56087404",
"0.5608466",
"0.56077725",
"0.55963844",
"0.55914766",
"0.55906653",
"0.5587267",
"0.5582556",
"0.5580891",
"0.5580245",
"0.55689406"
] | 0.0 | -1 |
Register an app by app ID to be routed to. | public function registerApp(string $appId, $appFactory): self
{
$this->apps[$appId] = $appFactory;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function registerApp($config, $id)\n {\n if (empty(trim($id))) {\n exit('App ID must not be empty!');\n }\n\n $this->config = $config;\n static::$id = $id;\n\n if (!isset(static::$services[$id])) {\n static::$services[$id] = [];\n }\n\n if (!isset(static::$singletons[$id])) {\n static::$singletons[$id] = [];\n }\n\n if (!isset(static::$apps[$id])) {\n static::$apps[$id] = $this;\n }\n\n return static::$apps[$id];\n }",
"public function register(\\Box_App &$app)\n {\n $app->get('/autoticket', 'get_index', array(), get_class($this));\n\t\t$app->get('/autoticket/settings', 'get_settings', array(), get_class($this));\n }",
"public function setAppID($id)\n {\n $this->parameters['appid'] = $id;\n }",
"public function register(Application $app)\n {\n // TODO: Implement register() method.\n }",
"public function register($register): AppInterface;",
"function spf_register_route(){\n register_rest_route('wooapp/v1','/shop/products',Array(\n 'methods' => 'GET',\n 'callback' => 'spf_get_shop_products',\n ));\n\n register_rest_route('wooapp/v1', '/auth/register', [\n 'methods' => 'POST',\n 'callback' => 'spf_register_new_user',\n ]);\n\n register_rest_route('wooapp/v1', '/auth/login', [\n 'methods' => 'POST',\n 'callback' => 'spf_login_user',\n ]);\n}",
"public function bind($app) {\n $this->apps[] = $app;\n }",
"public function setAppId(int $id): SocketApp;",
"abstract public function register(Container $app);",
"public function register(Application $app)\n {\n if (empty($app[self::AMQP_CONNECTIONS])) {\n $app[self::AMQP_CONNECTIONS] = array(\n 'default' => array(\n 'host' => 'localhost',\n 'port' => 5672,\n 'username' => 'guest',\n 'password' => 'guest',\n 'vhost' => '/',\n ),\n );\n }\n\n $app[self::AMQP_FACTORY] = $app->protect(function (\n $host = 'localhost',\n $port = 5672,\n $username = 'guest',\n $password = 'guest',\n $vhost = '/'\n ) use ($app) {\n return $app[self::AMQP]->createConnection($host, $port, $username, $password, $vhost);\n });\n\n $app[self::AMQP] = $app->share(function () use ($app) {\n return new AmqpConnectionProvider($app[self::AMQP_CONNECTIONS]);\n });\n }",
"public function register(\\Silex\\Application $app)\n {\n parent::register($app);\n $this->registerFactory($app);\n }",
"public function register(Application $app)\n {\n $this->registerCommon($app);\n $this->registerMiddlewares($app);\n $this->registerWebActions($app);\n $this->registerControllers($app);\n }",
"function add_custom_admin_routes($app) {\n\n}",
"public static function registerApplication()\n {\n add_action('plugins_loaded', function () {\n Application::run(static::$file, static::$config);\n }, 1);\n }",
"private function set_idapp($idapp = '') {\r\n if (empty($idapp)) {\r\n $this->add_log('set_idapp: IdApp KO, parameter is empty', 'ERROR');\r\n return false;\r\n }\r\n\r\n $this->add_log('set_idapp: IdApp OK, setted to \"'.$idapp.'\"');\r\n\r\n $this->idApp = $idapp;\r\n return true;\r\n }",
"public function register(App $app)\n {\n $app->router->get(\"/api/v1/cloudfront/get_config\", function (KSApp $app) {\n $sql = \"SELECT s.serviceId as sid, d.domain as dom \n FROM CloudFrontService AS s\n LEFT JOIN CloudFrontDomain AS d\n ON s.serviceId=d.serviceId \n ORDER BY s.serviceId, domain\";\n $ret = [\n \"services\" => []\n ];\n $app->db->query($sql)->each(function (array $row) use (&$ret) {\n if (changed($sid = $row[\"sid\"])) {\n $s = CloudFrontService::Load($sid);\n $s->domains = [];\n $ret[\"services\"][] = $s;\n }\n\n if (changed($domain = $row[\"dom\"])) {\n $s->domains[] = $domain;\n }\n\n });\n return $ret;\n });\n }",
"public function getApplication( $id )\n\t{\t\n\t}",
"public function setApplicationID($app_id) \n\t{\n\t\t$this->application_id = $app_id;\n\t}",
"public function add_app( $app_name = 'NoName', $server_post_id = false, $author_id = false, $title = false ) {\n\n\t\t// Make sure we have some sort of an author.\n\t\tif ( empty( $author_id ) ) {\n\t\t\t$author_id = get_current_user();\n\t\t}\n\n\t\tif ( ! empty( $title ) ) {\n\t\t\t$post_title = $title;\n\t\t} else {\n\t\t\t$post_title = $app_name;\n\t\t}\n\n\t\t$post_id = wp_insert_post(\n\t\t\tarray(\n\t\t\t\t'post_type' => 'wpcd_app',\n\t\t\t\t'post_status' => 'private',\n\t\t\t\t'post_title' => $post_title,\n\t\t\t\t'post_author' => $author_id,\n\t\t\t)\n\t\t);\n\n\t\tif ( ! is_wp_error( $post_id ) && ! empty( $post_id ) ) {\n\t\t\tupdate_post_meta( $post_id, 'parent_post_id', $server_post_id ); // using the parent post id to link back to the server record.\n\t\t\tupdate_post_meta( $post_id, 'app_type', $app_name ); // app_type is used to hold the type of app because the post_title field will eventually be more descriptive.\n\t\t\tupdate_post_meta( $post_id, 'wpcd_app_plugin_initial_version', wpcd_version ); // initial plugin version.\n\t\t\tupdate_post_meta( $post_id, 'wpcd_app_plugin_updated_version', wpcd_version ); // current plugin version.\n\t\t}\n\n\t\tdo_action( 'wpcd_log_error', \"Created APP CPT with ID $post_id \", 'debug', __FILE__, __LINE__ );\n\n\t\treturn $post_id;\n\t}",
"private function addAppRoutingConfig($app, $baseApp = false) {\n\t\t$appReflection = new \\ReflectionClass($app);\n\n\t\t$fileInfo = array();\n\t\t$includedFiles = get_included_files();\n\n\t\tforeach($includedFiles AS $filePath) {\n\t\t\tif ( strpos(str_replace('/', '\\\\',strtoupper($filePath)), strtoupper($appReflection->getName())) !== false && file_exists($filePath) ) {\n\t\t\t\t$fileInfo = pathinfo($filePath);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif ( !isset($fileInfo['dirname']) ) {\n\n\t\t\tthrow new RegisterAppException('Missing Application pathInfo');\n\t\t}\n\n\t\t//add rooting Actions.ini config path\n\t\tRouting::instance()->setPath($fileInfo['dirname'].'/Config/');\n\n\t\tif ( !$baseApp ) {\n\t\t\tHTML::instance()->addChildApp($appReflection->getNamespaceName());\n\t\t}\n\n\t\t$parentAppClassName = $appReflection->getParentClass()->name;\n\t\t$appReflection = new \\ReflectionClass($parentAppClassName);\n\n\t\tif ( !$appReflection->isAbstract() ) {\n\t\t\t$this->addAppRoutingConfig($parentAppClassName, $baseApp);\n\t\t}\n\t}",
"private function registerRoutes(){\n $appRouter = require_once __DIR__.'/../../routes/app.php';\n $this->registerApplicationRoutes($appRouter);\n $this->registerApplicationRoutes($appRouter, false);\n $this->registerAuthenticationRoutes();\n }",
"public static function registerPersonal($app, $page) {\n\t\t\\OC_App::registerPersonal($app, $page);\n\t}",
"public function setAppId($value);",
"public function wpcd_wpapp_install_complete( $id, $app_id, $name, $base_command ) {\n\n\t\t// If not installing an app, return.\n\t\tif ( 'install_wp' <> $base_command ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$app_post = get_post( $app_id );\n\n\t\t// Bail if not a post object.\n\t\tif ( ! $app_post || is_wp_error( $app_post ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Bail if not a WordPress app...\n\t\tif ( 'wordpress-app' <> WPCD_WORDPRESS_APP()->get_app_type( $app_id ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Get app instance array.\n\t\t$instance = WPCD_WORDPRESS_APP()->get_app_instance_details( $app_id );\n\n\t\t// Log what we're doing.\n\t\tdo_action( 'wpcd_log_error', 'Sending request to DNS module to add domain if applicable ' . print_r( $instance, true ), 'trace', __FILE__, __LINE__ );\n\n\t\t// What's the IP of the server?\n\t\t$ipv4 = WPCD_SERVER()->get_ipv4_address( $id );\n\n\t\t// What's the domain of the site?\n\t\t$domain = $this->get_domain_name( $app_id );\n\n\t\t// Add the DNS...\n\t\t$dns_success = WPCD_DNS()->set_dns_for_domain( $domain, $ipv4 );\n\n\t\t// Attempt to issue SSL..\n\t\tif ( true === (bool) $dns_success ) {\n\t\t\tif ( wpcd_get_option( 'wordpress_app_auto_issue_ssl' ) ) {\n\t\t\t\tdo_action( 'wpcd_wordpress-app_do_toggle_ssl_status', $app_id, 'ssl-status' );\n\t\t\t}\n\t\t}\n\n\t}",
"public function register(Application $app)\n {\n $app['rest_normalizer.version'] = '0.1.0';\n $app['rest_normalizer.builder'] = $app->protect(\n function ($object = null) use ($app) {\n $version = $app['rest_normalizer.version'];\n $request = $app['request'];\n /** @var $request \\Symfony\\Component\\HttpFoundation\\Request */\n\n $builder = ResponseBuilder::create(\n $version,\n HttpMethod::valueOf($request->getMethod()),\n $object\n );\n\n foreach ($request->request->all() as $key => $value) {\n $parameter = Parameter::create($key, $value);\n $builder->addParameter($parameter);\n }\n\n return $builder;\n }\n );\n }",
"public function registerResource($id, $resource);",
"function GET_APP_ID(){\n return \"7d0df388-f064-48eb-9092-27fbbf0a438e\";\n}",
"function setAppId($value)\n {\n $this->_props['AppId'] = $value;\n }",
"public function register(Container $app)\n {\n }",
"public function initRoutes(App $app);",
"public function activateApp($teamid, $appid)\n {\n $user = Auth::user(); \n $result = UserActiveApp::processUpdates($user->id, $appid);\n\n return redirect()->route('apps.show', ['teamid' => $teamid]);\n }",
"public static function registerAdmin($app, $page) {\n\t\t\\OC_App::registerAdmin($app, $page);\n\t}",
"public function register( Application $app )\n {\n $app['security.apikey.authenticator'] = $app->protect(function () use ($app) {\n return new ApiKeyAuthenticator(\n $app['security.user_provider.apikey'](),\n $app['security.apikey.param'],\n $app['logger']\n );\n });\n\n $app['security.authentication_listener.factory.apikey'] = $app->protect(function ($name, $options) use ($app) {\n\n $app['security.authentication_provider.'.$name.'.apikey'] = $app->share(function () use ($app, $name) {\n return new SimpleAuthenticationProvider(\n $app['security.apikey.authenticator'](),\n $app['security.user_provider.apikey'](),\n $name\n );\n });\n\n $app['security.authentication_listener.' . $name . '.apikey'] = $app->share(function () use ($app, $name, $options) {\n return new SimplePreAuthenticationListener(\n $app['security'],\n $app['security.authentication_manager'],\n $name,\n $app['security.apikey.authenticator'](),\n $app['logger']\n );\n });\n\n return array(\n 'security.authentication_provider.'.$name.'.apikey',\n 'security.authentication_listener.'.$name.'.apikey',\n null, // entrypoint\n 'pre_auth' // position of the listener in the stack\n );\n });\n\n return true;\n }",
"protected function registerBindings(Application $app)\n {\n $app->singleton('wit', function ($app) {\n $config = $app['config'];\n\n return new Wit(\n $config->get('wit.access_token', null),\n $config->get('wit.async_requests', false)\n );\n });\n\n $app->alias('wit', Wit::class);\n }",
"private static function registerRoute($route) {\n global $Routes;\n $Routes[] = $route;\n }",
"private static function registerRoute($route){\r\n global $Routes;\r\n $Routes[] = BASEDIR.$route;\r\n }",
"protected function registerBlogit(Application $app)\n {\n $app->bind('blogit', function ($app) {\n $repository = $app['blogit.github.repository.document'];\n $collection = new BlogitCollection();\n $articleFactory = $app['blogit.article.factory'];\n\n return new Blogit($repository, $collection, $articleFactory);\n });\n\n $app->alias('blogit', Blogit::class);\n }",
"public function registerCliApp(string $appId, LightCliApplicationInterface $cliApp)\n {\n if (true === array_key_exists($appId, $this->cliApps)) {\n $this->error(\"A cli application with appId=$appId is already registered, please find another name.\");\n }\n $this->cliApps[$appId] = $cliApp;\n }",
"public function show_m_app($id)\n\t{\n\t //\n\t}",
"public function register(Application $app)\n {\n // if console register console providers\n if (php_sapi_name() === 'cli') {\n $app->register(new ConsoleProvider);\n }\n $app->register(new DoctrineOrmManagerRegistryProvider);\n }",
"public function registerRoutes()\n {\n $namespace = $this->getNameSpace();\n\n register_rest_route($namespace, '/' . self::ROUTE_UPDATE_CALLBACK, [\n 'methods' => WP_REST_Server::EDITABLE,\n 'callback' => array( $this, 'updateTrapp' ),\n 'permission_callback' => array( $this, 'updateTrappPermissions' ),\n ]);\n }",
"public function apps($app) {\n \n // Check if the current user is admin and if session exists\n $this->check_session($this->user_role, 0);\n \n // Verify if account is confirmed\n $this->_check_unconfirmed_account();\n \n // Prepare the app\n $app = str_replace('-', '_', $app);\n\n // Verify if the app exists\n if ( is_dir( APPPATH . '/apps/collection/' . $app . '/' ) ) {\n \n if ( $app === 'dashboard' ) {\n \n // Get the user's plan\n $user_plan = get_user_option( 'plan' );\n \n // Verify if user has a plan, if no add default plan\n if ( !$user_plan ) {\n $this->plans->change_plan(1, $this->user_id);\n redirect('user/app/' . $app . '/');\n }\n\n // Get plan end\n $plan_end = get_user_option( 'plan_end', $this->user_id );\n\n $expired = 0;\n\n $expires_soon = 0;\n\n if ( $plan_end ) {\n\n if ( strtotime($plan_end) < time() ) {\n\n $expired = 1;\n $this->plans->delete_user_plan($this->user_id);\n\n } elseif ( strtotime($plan_end) < time() + 432000 ) {\n\n $expires_soon = 1;\n\n }\n\n }\n \n } \n \n // Require the Apps class\n $this->load->file( APPPATH . '/apps/main.php' );\n\n // Call the apps class\n $apps = new MidrubApps\\MidrubApps();\n \n // Call the user controller\n $red = $apps->user_init($app);\n \n } else {\n \n show_404();\n \n }\n \n }",
"private static function registerRoute($route)\n {\n global $Routes;\n $Routes[] = \"/\".$route;\n }",
"public function setApp($app)\n {\n $this->app = $app;\n }",
"public function getAppId();",
"private function register_routes() {\n\t\t$routes = $this->get_routes();\n\t\tforeach ( $routes as $route ) {\n\t\t\t$route->register();\n\t\t}\n\t}",
"public function registerApplication($key, $application)\n {\n $this->applications[$key] = $application;\n \n // status is kind of a system-app, needs some special cases:\n if($key === 'status')\n {\n $serverInfo = array(\n 'maxClients' => $this->_maxClients,\n 'maxConnectionsPerIp' => $this->_maxConnectionsPerIp,\n 'maxRequetsPerMinute' => $this->_maxRequestsPerMinute,\n );\n $this->applications[$key]->setServerInfo($serverInfo);\n }\n }",
"public function registerAction()\n {\n $storeViewId = Mage::app()->getRequest()->getParam('store_view_id');\n\n if ($storeViewId && !$this->_isStoreViewAlreadyRegisterdToConnection($storeViewId)) {\n $redirect = $this->_buildShopgateOAuthUrl($storeViewId);\n } else {\n $redirect = $this->getUrl('*/*/connect');\n }\n\n $this->getResponse()->setRedirect($redirect);\n $this->getResponse()->sendResponse();\n }",
"public static function register_id( $id ) {\n\n\t\tself::$_id = $id;\n\n\t}",
"public function register()\n {\n // dynamically set the rootview based on whether the route is backend or frontend \n // can also be done in a middleware that wraps all admin routes\n if(request()->is('test-react/*')){\n Inertia::setRootView('react.app');\n } elseif(request()->is('test')){\n Inertia::setRootView('vue.app');\n } else {\n // some other\n }\n\n if ($this->app->environment() == 'local') {\n $this->app->register(\\Reliese\\Coders\\CodersServiceProvider::class);\n }\n $this->registerInertia();\n $this->registerWebSockets();\n }",
"function wp_oembed_register_route()\n {\n }",
"public function register(Application $app)\n {\n /* \\outputImage */\n $app['glide'] = ServerFactory::create(array(\n 'source' => web_path('upload'),\n 'cache' => web_path('upload/.cache'),\n ));\n }",
"private function registerParentAppsOfCurrentRunningApp($app) {\n\t\t$appReflection = new \\ReflectionClass($app);\n\n\t\t$this->addCurrentRunningAppParentApps(array('class' => $app, 'app' => explode('\\\\', $app)[1]));\n\t\tHTML::instance()->addChildApp($appReflection->getNamespaceName());\n\n\t\t$parentAppClassName = $appReflection->getParentClass()->name;\n\t\t$appReflection = new \\ReflectionClass($parentAppClassName);\n\n\t\tif ( !$appReflection->isAbstract() ) {\n\t\t\t$this->registerParentAppsOfCurrentRunningApp($parentAppClassName);\n\t\t}\n\t}",
"function add_custom_store_front_routes($app) {\n $app->get('/user_account', 'CustomStoreFrontController:gotoUserAccount');\n $app->post('/api/uploadAvatar', '\\CustomStoreFrontController:uploadAvatar');\n}",
"public function attachApp(AppNode $app)\n {\n $this->apps[$app->getPrimaryKey()] = $app;\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function register_routes()\n {\n }",
"public function registerRoutes()\n\t{\n\t\t$this->app->booted(function ($app) {\n\n\t\t\t# Manager\n\t\t\t$app['router']->get(\n\t\t\t\t'/',\n\t\t\t\t[\n\t\t\t\t\t'as' => 'manager.index',\n\t\t\t\t\t'uses' => 'ManagerController@index'\n\t\t\t\t]\n\t\t\t);\n\n\t\t});\n\t}",
"public function setAppId($val)\n {\n $this->_propDict[\"appId\"] = $val;\n return $this;\n }",
"public function register(Container $app)\n {\n switch ($app['params']['storage_system']) {\n case 's3':\n $this->registerStorageSystemS3($app);\n break;\n case 'local':\n default:\n $this->registerStorageSystemLocal($app);\n break;\n }\n }",
"public function register(Application $app)\n {\n $app['menu'] = $app->share(\n function ($app) {\n $builder = new MenuBuilder($app);\n\n return $builder;\n }\n );\n }",
"private function registerApplicationRoutes($appRouter, $web = true){\n $prefix = config('web-call-center.prefix');\n if($web)\n $middleware = ['web', config('web-call-center.middleware')];\n else{\n $middleware = ['api', 'auth:sanctum'];\n $prefix = is_null($prefix)? 'api' : \"api/$prefix\";\n }\n $router = \\Route::middleware($middleware);\n if(!is_null($prefix))\n $router->prefix($prefix);\n $router->namespace($this->namespace)->group($appRouter($web));\n }",
"public abstract function registerDevice();",
"public function createApplication($applicationId, $request)\n {\n return $this->start()->uri(\"/api/application\")\n ->urlSegment($applicationId)\n ->bodyHandler(new JSONBodyHandler($request))\n ->post()\n ->go();\n }",
"public function create (Application $app) {\n\n foreach ($this->handlers as $handlerset) {\n $this->addHandlerSetToApplication($app, $handlerset);\n }\n\n //$this->addApiAddedRoute($app);\n\n $this->addJsonParser($app);\n\n }",
"public function addApp($app) {\n\n\t\tself::$CHILD_APPS[] = $app;\n\t\t$this->addAppRoutingConfig($app, false);\n\n\t\treturn $this;\n\t}",
"public function register(): void\n {\n $response = $this->signedPostRequest('acme/new-acct', [\n 'termsOfServiceAgreed' => true,\n ], true);\n $this->kid = $response->getHeader('Location')[0];\n }",
"public function register($app)\n {\n $this->startTime = microtime(true);\n\n return $app->events->listen('*', function ($eventName, $payload) {\n $this->collect($eventName, $payload);\n });\n }",
"public static function wpcd_app_register_post_and_taxonomy() {\n\t\tregister_post_type(\n\t\t\t'wpcd_app',\n\t\t\tarray(\n\t\t\t\t'labels' => array(\n\t\t\t\t\t'name' => _x( 'APPs', 'Post type general name', 'wpcd' ),\n\t\t\t\t\t'singular_name' => _x( 'APP', 'Post type singular name', 'wpcd' ),\n\t\t\t\t\t'menu_name' => _x( 'APPs', 'Admin Menu text', 'wpcd' ),\n\t\t\t\t\t'name_admin_bar' => _x( 'APPs', 'Add New on Toolbar', 'wpcd' ),\n\t\t\t\t\t'add_new' => _x( 'Add New App Record', 'Add New Button', 'wpcd' ),\n\t\t\t\t\t'edit_item' => __( 'Edit APP', 'wpcd' ),\n\t\t\t\t\t'view_item' => __( 'View APP', 'wpcd' ),\n\t\t\t\t\t'all_items' => __( 'All APPs', 'wpcd' ),\n\t\t\t\t\t'search_items' => __( 'Search APPs', 'wpcd' ),\n\t\t\t\t\t'not_found' => __( 'No Applications were found.', 'wpcd' ),\n\t\t\t\t\t'not_found_in_trash' => __( 'No Applications were found in Trash.', 'wpcd' ),\n\t\t\t\t\t'filter_items_list' => _x( 'Filter APPs list', 'Screen reader text for the filter links heading on the post type listing screen. Default \"Filter posts list\"/\"Filter pages list\". Added in 4.4', 'wpcd' ),\n\t\t\t\t\t'items_list_navigation' => _x( 'APPs list navigation', 'Screen reader text for the pagination heading on the post type listing screen. Default \"Posts list navigation\"/\"Pages list navigation\". Added in 4.4', 'wpcd' ),\n\t\t\t\t\t'items_list' => _x( 'APPs list', 'Screen reader text for the items list heading on the post type listing screen. Default \"Posts list\"/\"Pages list\". Added in 4.4', 'wpcd' ),\n\t\t\t\t),\n\t\t\t\t'show_ui' => true,\n\t\t\t\t'show_in_menu' => true,\n\t\t\t\t'show_in_nav_menus' => true,\n\t\t\t\t'show_in_admin_bar' => false,\n\t\t\t\t'public' => true,\n\t\t\t\t'exclude_from_search' => true,\n\t\t\t\t'publicly_queryable' => false,\n\t\t\t\t'hierarchical' => false,\n\t\t\t\t'menu_position' => null,\n\t\t\t\t'supports' => array( '' ),\n\t\t\t\t'rewrite' => null,\n\t\t\t\t'capabilities' => array(\n\t\t\t\t\t'create_posts' => false,\n\t\t\t\t\t'edit_post' => 'wpcd_manage_apps',\n\t\t\t\t\t'edit_posts' => 'wpcd_manage_apps',\n\t\t\t\t\t'edit_others_posts' => 'wpcd_manage_apps',\n\t\t\t\t\t'edit_published_posts' => 'wpcd_manage_apps',\n\t\t\t\t\t'delete_post' => 'wpcd_manage_apps',\n\t\t\t\t\t'publish_posts' => 'wpcd_manage_apps',\n\t\t\t\t\t'delete_posts' => 'wpcd_manage_apps',\n\t\t\t\t\t'delete_others_posts' => 'wpcd_manage_apps',\n\t\t\t\t\t'delete_published_posts' => 'wpcd_manage_apps',\n\t\t\t\t\t'delete_private_posts' => 'wpcd_manage_apps',\n\t\t\t\t\t'edit_private_posts' => 'wpcd_manage_apps',\n\t\t\t\t\t'read_private_posts' => 'wpcd_manage_apps',\n\t\t\t\t),\n\t\t\t\t'taxonomies' => array( 'wpcd_app_group' ),\n\t\t\t)\n\t\t);\n\n\t\t// Add new taxonomy, make it hierarchical (like categories).\n\t\t$labels = array(\n\t\t\t'name' => _x( 'App Groups', 'taxonomy general name', 'wpcd' ),\n\t\t\t'singular_name' => _x( 'App Group', 'taxonomy singular name', 'wpcd' ),\n\t\t\t'search_items' => __( 'Search App Groups', 'wpcd' ),\n\t\t\t'all_items' => __( 'All App Groups', 'wpcd' ),\n\t\t\t'parent_item' => __( 'Parent App Group', 'wpcd' ),\n\t\t\t'parent_item_colon' => __( 'Parent App Group:', 'wpcd' ),\n\t\t\t'edit_item' => __( 'Edit App Group', 'wpcd' ),\n\t\t\t'update_item' => __( 'Update App Group', 'wpcd' ),\n\t\t\t'add_new_item' => __( 'Add New App Group', 'wpcd' ),\n\t\t\t'new_item_name' => __( 'New App Group Name', 'wpcd' ),\n\t\t\t'menu_name' => __( 'App Group', 'wpcd' ),\n\t\t);\n\n\t\t$args = array(\n\t\t\t'hierarchical' => true,\n\t\t\t'labels' => $labels,\n\t\t\t'show_ui' => true,\n\t\t\t'show_in_menu' => false,\n\t\t\t'show_admin_column' => false,\n\t\t\t'query_var' => true,\n\t\t\t'capabilities' => array(\n\t\t\t\t'manage_terms' => 'wpcd_manage_groups',\n\t\t\t\t'edit_terms' => 'wpcd_manage_groups',\n\t\t\t\t'delete_terms' => 'wpcd_manage_groups',\n\t\t\t\t'assign_terms' => 'wpcd_manage_groups',\n\t\t\t),\n\t\t);\n\n\t\t// Hide the app group metabox.\n\t\t$hide_site_group_mb = wpcd_get_early_option( 'wpcd_hide_site_group_mb' );\n\t\tif ( $hide_site_group_mb ) {\n\t\t\tif ( ! wpcd_is_admin() ) {\n\t\t\t\t$args['meta_box_cb'] = false;\n\t\t\t}\n\t\t}\n\n\t\tregister_taxonomy( 'wpcd_app_group', array( 'wpcd_app' ), $args );\n\t}"
] | [
"0.6868471",
"0.6288491",
"0.58129287",
"0.57566226",
"0.5702342",
"0.563166",
"0.5609148",
"0.5588763",
"0.55775374",
"0.5504164",
"0.54506826",
"0.5321613",
"0.5288652",
"0.52772516",
"0.5270781",
"0.52413505",
"0.5229614",
"0.5224103",
"0.52142864",
"0.5212098",
"0.51878154",
"0.51599073",
"0.51528907",
"0.5150553",
"0.5149968",
"0.5094561",
"0.5076802",
"0.50755394",
"0.5068387",
"0.5063698",
"0.50378096",
"0.50242406",
"0.50141513",
"0.49961892",
"0.49905017",
"0.49884623",
"0.49604902",
"0.4960487",
"0.4916466",
"0.4914934",
"0.49120858",
"0.49081242",
"0.49025318",
"0.48902577",
"0.48872563",
"0.48830605",
"0.48793134",
"0.48750514",
"0.48700422",
"0.4867203",
"0.48650277",
"0.48611906",
"0.48561305",
"0.48467216",
"0.48383886",
"0.48283327",
"0.48275375",
"0.48275375",
"0.48275375",
"0.48275375",
"0.48275375",
"0.48275375",
"0.48275375",
"0.48275375",
"0.48275375",
"0.48275375",
"0.48275375",
"0.48275375",
"0.48275375",
"0.48275375",
"0.48275375",
"0.48275375",
"0.48275375",
"0.48275375",
"0.48275375",
"0.48275375",
"0.48275375",
"0.48275375",
"0.48275375",
"0.48275375",
"0.48275375",
"0.48275375",
"0.48275375",
"0.48275375",
"0.48275375",
"0.48275375",
"0.48275375",
"0.48275375",
"0.48207456",
"0.48123074",
"0.48113525",
"0.4801764",
"0.47987846",
"0.4788228",
"0.47540295",
"0.47498062",
"0.47382867",
"0.47337583",
"0.47266695",
"0.4715337"
] | 0.5356944 | 11 |
Get the app ID from the request. | protected function getApp(): Application
{
$appId = $this->getAppIdDetector()($this->getRequest());
if ($appId === null) {
throw new HttpException('Cannot determine app ID');
}
// Create the app for the app ID.
$app = $this->instantiateApp($appId);
// Reconcile the registered app ID with the App's configured ID.
$configuredId = $app->getConfig()->getId();
if ($configuredId === null) {
$app->getConfig()->withId($appId);
} elseif ($configuredId !== $appId) {
throw new HttpException("ID mismatch for app ID: {$appId}");
}
// Set the App to the Server.
$this->withApp($app);
return parent::getApp();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function getApplicationId()\n\t{\n\t\t$application_id = $this->request->input('session.application.applicationId', null);\n\n\t\tif (is_null($application_id) || $application_id === '') {\n\t\t\tthrow new AlexaVerificationException('Request verification failed: application ID not present in request.');\n\t\t}\n\n\t\treturn $application_id;\n\t}",
"public function getAppId()\n {\n return $this->app_id;\n }",
"public function getAppId()\n {\n return $this->app_id;\n }",
"public function getAppId()\n {\n return $this->app_id;\n }",
"public function getAppId()\n {\n return $this->app_id;\n }",
"public function getAppId()\n {\n return $this->app_id;\n }",
"public function getAppId()\n {\n return $this->app_id;\n }",
"public function getAppId()\n {\n return $this->app_id;\n }",
"public function getAppId() {\n return $this->app_id;\n }",
"public function getApplicationId()\r\n\t{\r\n\t\t$headers = $this->getAllHeaders();\r\n\r\n\t\tif (!preg_match(\"#AppId=(.+)#s\", $headers[\"Authorization\"], $match))\r\n\t\t\treturn false;\r\n\r\n\t\treturn end($match);\r\n\t}",
"function GET_APP_ID(){\n return \"7d0df388-f064-48eb-9092-27fbbf0a438e\";\n}",
"public function getOGApplicationID();",
"public function get_application_id() {\n\t\tif ( ! $this->is_application_id_in_config() ) {\n\n\t\t\treturn (string) get_option( 'algolia_application_id', '' );\n\t\t}\n\n\t\t$this->assert_constant_is_non_empty_string( ALGOLIA_APPLICATION_ID, 'ALGOLIA_APPLICATION_ID' );\n\n\t\treturn ALGOLIA_APPLICATION_ID;\n\t}",
"function fetchApplicationId()\n{\n if (isset($_GET['application_id'])) {\n $application_id = $_GET['application_id'];\n unset($_GET['application_id']);\n }\n return $application_id;\n}",
"public function getAppId()\n {\n if (array_key_exists(\"appId\", $this->_propDict)) {\n return $this->_propDict[\"appId\"];\n } else {\n return null;\n }\n }",
"public function getAppId();",
"public function getAppId() : int\n {\n return $this->appId;\n }",
"public function getUserAppId()\n {\n return $this->user_app_id;\n }",
"public function getID(): string {\n\t\treturn $this->appName;\n\t}",
"function mobile_app_name()\n{\n $appClientId = request()->header('app-client-id');\n if (!empty($appClientId)) {\n return $appClientId;\n }\n\n $params = request()->all();\n if (isset($params['app_client_id']) && !empty($params['app_client_id'])) {\n return $params['app_client_id'];\n }\n return '';\n}",
"function getAppId()\n {\n return $this->_props['AppId'];\n }",
"public function getApplicationID() \n\t{\n\t\treturn $this->application_id;\n\t}",
"public function getApplicationID()\n\t{\n\t\treturn $this->application_id;\n\t}",
"protected function getApplicationIdAttribute(): string\n {\n if (! isset($this->attributes['application_id'])) {\n return $this->discord->application->id;\n }\n\n return $this->attributes['application_id'];\n }",
"public function getLeadIdFromRequest()\n {\n return isset($_POST['id']) ? $_POST['id'] : $_GET['id'];\n }",
"public function getAppId()\n {\n return $this->appId;\n }",
"public function getAppId()\n {\n return $this->appId;\n }",
"public function getApplicationId(){\n\t\treturn $this->applicationId;\n\t}",
"function getApplicationId(bool $requestSandboxAppId = TRUE) {\n if ($requestSandboxAppId) {\n return _SQ_SANDBOX_APP_ID;\n } else {\n return _SQ_APP_ID;\n }\n}",
"public function getAppId(): int;",
"public function getInstanceId()\n {\n if ($id = $this->_getParam(\\MUtil_Model::REQUEST_ID)) {\n return $id;\n }\n }",
"public function getCurrentAppId() {\n return $this->container->offsetGet('appId');\n }",
"public function getMoipAppId() {\n return $this->getChaveValor('MOIP_APP_ID');\n }",
"protected function getAppId($app_name)\n {\n // check if app list loaded\n if (!is_array($this->apps)) {\n // load apps from db\n $this->apps = array();\n $apps = $this->db->fetchAll('SELECT * FROM apps');\n foreach ($apps as $app) {\n $this->apps[$app['name']] = (int) $app['id'];\n }\n }\n\n // if app doesn't exist save to db\n if (!isset($this->apps[$app_name])) {\n $this->db->insert('apps', array('name' => $app_name));\n $this->apps[$app_name] = $this->db->lastInsertId();\n }\n\n return $this->apps[$app_name];\n }",
"public function getAppUserId()\n {\n return $this->app_user_id;\n }",
"private function getClientId($request)\n {\n $clientId = $this->getHeader($request, 'x-authorization-client-id', null);\n $clientId = $clientId ?? $this->getHeader($request, 'x-client-id', null);\n $clientId = $clientId ?? $this->getHeader($request, 'x-authorization-client-token', null);\n\n if (null !== $clientId) {\n return $clientId;\n }\n\n return $request->input('client_id');\n }",
"public function getUseAppID() \n \t{\n \t\treturn $this->use_appid;\n \t}",
"protected function _getAppId()\n {\n if (!isset($this->_config['appId'])) {\n throw new RuntimeException('Parameter \"appId\" not exists in config.');\n }\n\n return $this->_config['appId'];\n }",
"public function getAppId(): string;",
"public function getAppId(){\n return $this->appId;\n }",
"public function getAppUid ()\n {\n return $this->app_uid;\n }",
"public function getAppId()\n {\n }",
"public function get_app_key() {\n\n\t\t// Get plugin settings.\n\t\t$settings = $this->get_plugin_settings();\n\n\t\treturn rgar( $settings, 'customAppKey' ) ? rgar( $settings, 'customAppKey' ) : null;\n\n\t}",
"public function getAppScopeId()\n {\n if (array_key_exists(\"appScopeId\", $this->_propDict)) {\n return $this->_propDict[\"appScopeId\"];\n } else {\n return null;\n }\n }",
"public function getRequestIdentifier()\n {\n return $this->requestIdentifier;\n }",
"public static function getIdFromRequest(Request $request)\n {\n if (!$request->hasSession())\n {\n throw new InvalidRequestException('Trying to access session but the session is not started.');\n }\n\n $session = $request->getSession();\n\n // The userId is set in the session when successfully authenticated\n $id = (int) $session->get('userId');\n\n if ($id == null)\n {\n throw new InvalidRequestException('The user is not authenticated.');\n }\n\n return $id;\n }",
"public function getAppKey()\n\t{\n\t\treturn $this->_appKey;\n\t}",
"public function getOwnerAppIdentity();",
"public function getAppKey()\n {\n return $this->_appKey;\n }",
"public function getApp()\n {\n return $this['app.name'];\n }",
"public function display_app_id() {\n\t\t// Now grab the options based on what we're looking for\n\t\t$opts = get_option( 'emcl_settings' );\n\t\t$emc_client_id = isset( $opts['emc_client_id'] ) ? $opts['emc_client_id'] : '';\n\t\t// And display the view\n\t\tinclude_once $this->views . 'settings-app-client-id-field.php';\n\t}",
"public function facebookAppId()\r\n\t{\r\n\t\treturn Mage::getStoreConfig('ezfacebook/facebook/appid');\r\n\t}",
"public function getUserId(ServerRequestInterface $request): string;",
"public function getReqId()\n {\n return $this->req_id;\n }",
"public function getIdentifier()\n {\n if ($this->identifierType === self::URL_REWRITE)\n {\n return $this->request->path();\n }\n return $this->request->get();\n }",
"protected function getHostIdFromRequest(Request $request)\n {\n $routeInfo = $request->route();\n $parameters = $routeInfo[2];\n $hostId = $parameters['hostId'];\n\n return $hostId;\n }",
"public function getRequestedId() {}",
"public static function get_selected_app()\n\t{\n\t\t$serialized_selected_app = self::get_setting('nr_selected_app');\n\t\tif ($serialized_selected_app != NULL && $serialized_selected_app != '')\n\t\t{\n\t\t\treturn unserialize($serialized_selected_app);\n\t\t}\n\t\treturn NULL;\n\t}",
"public function getSettingID($companyId, $app) {\n\t\t$sql = $this->select();\n\t\t$sql = $sql->setIntegrityCheck(false);\n\t\t$sql = $sql->from('application_settings_2');\n\t\t$sql = $sql->where(\"company_id = '{$companyId}'\");\n\t\t$row = $this->_db->fetchRow($sql);\n\t\t$setting_id = '';\n\t\t$setting_ids = json_decode($row['settings_ids'])->applications;\n\t\t\n\t\tforeach($setting_ids as $key => $opt) {\n\t\t\tif($key == $app) {\n\t\t\t\t$setting_id = $opt;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $setting_id;\n\t}",
"public function getAppointmentId()\n {\n return $this->appointmentId;\n }",
"public function getFirebaseAppId()\n {\n return $this->firebase_app_id;\n }",
"public function getIosAppStoreId()\n {\n return $this->ios_app_store_id;\n }",
"public function getIosAppStoreId()\n {\n return $this->ios_app_store_id;\n }",
"public static function resolveId()\n\t{\n\t\treturn auth()->guard('api')->check() ? auth()->guard('api')->user()->getAuthIdentifier() : null;\n\t}",
"function opensky_get_pid_from_request () {\n $pat = 'islandora/object';\n\n if (substr (request_path(), 0, strlen($pat)) != $pat) {\n return null;\n }\n $path_parts = explode('/', request_path());\n $tail = array_pop($path_parts);\n $parts = explode (':', $tail);\n if (count($parts) == 2) {\n return $tail;\n }\n return null;\n}",
"public function getApp() {\n return $this->call->getApp();\n }",
"public function getSenderAppId()\n {\n\n return $this->senderAppID;\n\n }",
"private function getParentId($request)\n {\n return $request->getParsedBody()['parent_id'] ?? null;\n }",
"public function getRequestID()\n {\n return $this->RequestID;\n }",
"function get_user_id_from_token()\n {\n $jwt_token = \\Core\\Http\\Request::getTokenFromHeader();\n $container = \\Core\\Container::getInstance();\n $session_id = $container->get('session')->get('session_id');\n $token_array = (array) $container->get('jwt')::decode($jwt_token, $session_id, array('HS256'));\n\n return $token_array['id'];\n }",
"public function get_request_id($id){\n $this->db->select('requestID')->from('item_request')->where('requestID', $id);\n $query = $this->db->get();\n\n if($query->num_rows() == 1 ){\n $row = $query->row(0);\n\n return $row->requestID;\n }\n }",
"public function getApp();",
"public function getRequestId()\n {\n return isset ($this->headers ['x-log-requestid']) ? $this->headers ['x-log-requestid'] : '';\n }",
"public function getAppId(): ?string\n {\n }",
"public function getAndroidId();",
"function getId()\n\t{\n\t\t$id=(int)$_GET['prodid'];\n\t\tif(is_int($id))\n\t\t{\n\t\t\treturn $id;\n\t\t}\n\t}",
"public static function getId(){\n\t\t\n\t\t$serverName = isset($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : \"unknown\";\n\t\t\n\t\t//added MD5 because IE doesn't like dots I suspect\n\t\treturn md5(\\GO::config()->id.'AT'.$serverName);\n\t}",
"public function getClientId(): string\n {\n return (string) data_get($this->args, 'credentials.id');\n }",
"private function getId() {\n return Xss::filter($this->request->get('id'));\n }",
"public function getUserIdentifier(): string\n {\n return ($this->token ?? ($this->appkey ?? ''));\n }",
"public function getAppIdAttribute()\n {\n if(!$this->application_id) {\n return ''; \n }\n \n try {\n $decrypted = Crypt::decryptString($this->application_id);\n } catch (DecryptException $e) {\n return $e;\n }\n\n if(Auth::user()->role == 'admin') {\n return $decrypted;\n }\n\n $arr = explode('~', $decrypted);\n $hidden = str_repeat(\"*\", strlen($arr[0]) + 1);\n\n return $hidden . $arr[1];\n }",
"public function getClientId()\n {\n return $this->getParameter('clientId');\n }",
"public function getApplicationCohortApplicationId() {\n\t\treturn($this->applicationCohortApplicationId);\n\t}",
"private function getPageId()\n {\n return $this->getRequest()->getParam('id') ?: $this->getRequest()->getParam('page_id');\n }",
"public static function getRequestId($req)\n {\n if ($req->getHeader('content-location')) {\n return self::getIdFromString($req->getHeader('content-location'));\n } else {\n return;\n }\n }",
"function GetId ()\n {\n $this->username = isset( $_SESSION [ \"username\" ] ) ? sanitize_string( $_SESSION [ \"username\" ] ) : null;\n if ( !$this->username ) {\n $this->username = isset( $_COOKIE [ \"username\" ] ) ? sanitize_string( $_COOKIE [ \"username\" ] ) : null;\n }\n $this->mongo->setCollection( COLLECTION_ADMINS );\n $data = $this->mongo->dataFindOne( array( \"username\" => $this->username ) );\n return isset( $data[ \"_id\" ] ) ? $data[ \"_id\" ] : 0;\n }",
"protected function getContextItemId() : ?string\n {\n $id = (int) $this->_request->getParam('id', false);\n if($id)\n {\n return (string) $id;\n }\n\n return null;\n }",
"public function getAppOwnerOrganizationId()\n {\n if (array_key_exists(\"appOwnerOrganizationId\", $this->_propDict)) {\n return $this->_propDict[\"appOwnerOrganizationId\"];\n } else {\n return null;\n }\n }",
"public function getApplicationTemplateId()\n {\n if (array_key_exists(\"applicationTemplateId\", $this->_propDict)) {\n return $this->_propDict[\"applicationTemplateId\"];\n } else {\n return null;\n }\n }",
"private function getApplicationIdColumn()\n\t{\n\t\treturn 'application_id';\n\t}",
"private function getKnightId(){\n $knightId = $this->getRequest()->getPost(\"id\") //POST?\n ?? $this->params(\"id\") //GET?\n ?? null; //no way\n return $knightId;\n }",
"public function getOwnerApp();",
"public function getApiKey()\n {\n return $this->getParameter('appid');\n }",
"public function getProfileCloudAppId() \n\t{\n\t\treturn 'profile_cloud_app';\n\t}",
"public function getGoogleAppointmentId()\n {\n return $this->googleAppointmentId;\n }",
"public function getRequestId()\n {\n return $this->request_id;\n }",
"public function getRequestId()\n {\n return $this->request_id;\n }",
"public function getRequestId()\n {\n return $this->request_id;\n }",
"public function getRequestId()\n {\n return $this->request_id;\n }",
"public function idStore(Request $request)\n\t{\t\n\n\t\t$StoreName = $request->get('StoreName');\n\t\t$Address = $request->get('Address');\n\t\t$City = $request->get('City');\n\n\t\t$store = Store::where('Name', '=', $StoreName)->where('Address', '=', $Address)->where('City', '=', $City)->first();\n\n\t\tif(isset($store))\n\t\t\treturn $store->id;\n\t\treturn 0;\n\t}",
"public function getApplicationId(): ?Snowflake\n {\n return $this->application_id;\n }"
] | [
"0.7403556",
"0.72770584",
"0.72770584",
"0.72770584",
"0.72770584",
"0.72770584",
"0.72770584",
"0.72770584",
"0.7223579",
"0.71840316",
"0.6955504",
"0.6922548",
"0.68986446",
"0.6809883",
"0.67831844",
"0.6761387",
"0.67397696",
"0.6713542",
"0.67133427",
"0.6707606",
"0.67020917",
"0.66644776",
"0.66638476",
"0.664184",
"0.66003144",
"0.65581036",
"0.65581036",
"0.65452105",
"0.6534426",
"0.6533789",
"0.65103763",
"0.650771",
"0.65012735",
"0.64874065",
"0.6471821",
"0.64671266",
"0.64501554",
"0.64045984",
"0.6306805",
"0.6294522",
"0.6141231",
"0.60700697",
"0.6049373",
"0.60444987",
"0.5979621",
"0.59762454",
"0.5927858",
"0.59252423",
"0.5853231",
"0.5807256",
"0.5794272",
"0.5736692",
"0.57007307",
"0.56982183",
"0.5650981",
"0.56149787",
"0.5608813",
"0.55962753",
"0.55947685",
"0.5582061",
"0.5579547",
"0.55795014",
"0.55795014",
"0.5566225",
"0.554606",
"0.5541698",
"0.552031",
"0.55171216",
"0.551394",
"0.5512377",
"0.5478071",
"0.54697376",
"0.5469506",
"0.54516107",
"0.5444875",
"0.5440365",
"0.54288906",
"0.5428121",
"0.54175407",
"0.54071194",
"0.5402721",
"0.5394463",
"0.53690577",
"0.53690183",
"0.53687847",
"0.5352845",
"0.5351223",
"0.5344353",
"0.53185207",
"0.5318367",
"0.53153634",
"0.5313169",
"0.5311058",
"0.53068465",
"0.53025526",
"0.5295906",
"0.5295906",
"0.5295906",
"0.5295906",
"0.52947044",
"0.5293181"
] | 0.0 | -1 |
Initialize the table attributes, columns and validators Relations are not initialized by this method since they are lazy loaded | public function initialize()
{
// attributes
$this->setName('unit_usaha_kerjasama');
$this->setPhpName('UnitUsahaKerjasama');
$this->setClassname('DataDikdas\\Model\\UnitUsahaKerjasama');
$this->setPackage('DataDikdas.Model');
$this->setUseIdGenerator(false);
// columns
$this->addForeignPrimaryKey('mou_id', 'MouId', 'VARCHAR' , 'mou', 'mou_id', true, null, null);
$this->addForeignPrimaryKey('unit_usaha_id', 'UnitUsahaId', 'VARCHAR' , 'unit_usaha', 'unit_usaha_id', true, null, null);
$this->addForeignKey('sumber_dana_id', 'SumberDanaId', 'DECIMAL', 'ref.sumber_dana', 'sumber_dana_id', true, 196608, null);
$this->addColumn('produk_barang_dihasilkan', 'ProdukBarangDihasilkan', 'VARCHAR', false, 200, null);
$this->addColumn('jasa_produksi_dihasilkan', 'JasaProduksiDihasilkan', 'VARCHAR', false, 200, null);
$this->addColumn('omzet_barang_perbulan', 'OmzetBarangPerbulan', 'DECIMAL', false, 1179648, null);
$this->addColumn('omzet_jasa_perbulan', 'OmzetJasaPerbulan', 'DECIMAL', false, 1179648, null);
$this->addColumn('prestasi_penghargaan', 'PrestasiPenghargaan', 'VARCHAR', false, 200, null);
$this->addColumn('pangsa_pasar_produk', 'PangsaPasarProduk', 'VARCHAR', false, 200, null);
$this->addColumn('pangsa_pasar_jasa', 'PangsaPasarJasa', 'VARCHAR', false, 200, null);
$this->addColumn('create_date', 'CreateDate', 'TIMESTAMP', true, null, 'now()');
$this->addColumn('last_update', 'LastUpdate', 'TIMESTAMP', true, null, 'now()');
$this->addColumn('soft_delete', 'SoftDelete', 'DECIMAL', true, 65536, null);
$this->addColumn('last_sync', 'LastSync', 'TIMESTAMP', true, null, '1901-01-01 00:00:00');
$this->addColumn('updater_id', 'UpdaterId', 'VARCHAR', true, null, null);
// validators
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function initTable(){\n\t\t\t\n\t\t}",
"protected function _initsTable() {}",
"public function initialize()\n {\n $this->setSource('tblEntry');\n\n $this->hasOne('userId', '\\Soul\\Model\\User', 'userId', ['alias' => 'user']);\n $this->belongsTo('eventId', '\\Soul\\Model\\Event', 'eventId', ['alias' => 'event']);\n $this->hasOne('paymentId', '\\Soul\\Model\\Payment', 'paymentId', ['alias' => 'payment']);\n }",
"public function init() {\r\n $this->validColumns = $this->getValidTableColumns(\"assets_permissions\");\r\n }",
"public function __construct() {\n parent::__construct();\n $this->_table_columns = array(\"id\", \"entry_date\", \"account_type\", \"entry_value\", \"memo\", \"expense\", \"confirm\", \"deleted\", \"create_stamp\", \"modified_stamp\");\n }",
"public function initialize()\n {\n $this->setSchema(\"animedb\");\n $this->setSource(\"episodes\");\n $this->hasMany('id', 'Videos', 'episode_id', ['alias' => 'Videos']);\n $this->belongsTo('anime_id', '\\Anime', 'id', ['alias' => 'Anime', 'reusable' => true]);\n $this->allowEmptyStringValues(['title', 'description']);\n $this->skipAttributes(['date']);\n }",
"protected function _initialize()\r\n {\r\n $this->metadata()->setTablename('funcionario');\r\n $this->metadata()->setPackage('system.application.models.dao');\r\n \r\n # nome_do_membro, nome_da_coluna, tipo, comprimento, opcoes\r\n \r\n $this->metadata()->addField('id', 'id', 'int', 11, array('primary' => true, 'notnull' => true, 'autoincrement' => true));\r\n $this->metadata()->addField('nome', 'nome', 'varchar', 255, array());\r\n $this->metadata()->addField('login', 'login', 'varchar', 45, array());\r\n $this->metadata()->addField('senha', 'senha', 'varchar', 255, array());\r\n $this->metadata()->addField('email', 'email', 'varchar', 255, array());\r\n $this->metadata()->addField('lotacao', 'lotacao', 'varchar', 45, array());\r\n\r\n \r\n }",
"protected function _initialize()\n {\n $this->metadata()->setTablename('turma');\n $this->metadata()->setPackage('Model');\n \n # nome_do_membro, nome_da_coluna, tipo, comprimento, opcoes\n \n $this->metadata()->addField('id', 'id', 'int', 11, array('primary' => true, 'notnull' => true, 'autoincrement' => true));\n $this->metadata()->addField('foto', 'foto', 'varchar', 45, array());\n $this->metadata()->addField('ano', 'ano', 'int', 11, array('notnull' => true));\n $this->metadata()->addField('semestre', 'semestre', 'int', 1, array('notnull' => true));\n\n \n $this->metadata()->addRelation('egressos', Lumine_Metadata::ONE_TO_MANY, 'Egresso', 'turmaId', null, null, null);\n }",
"public function __construct () {\n $this->model = 'App\\\\' . $this->model;\n $this->model = new $this->model();\n\n // Get the column listing for a given table\n $this->table_columns = Schema::getColumnListing( $this->table );\n }",
"protected static function init()\n\t{\n\t\tif( static::$table === null )\n\t\t{\n\t\t\t// set the table name by Model name\n\t\t\t// Ex: UserModel -> users\n\t\t\tstatic::$table = strtolower( preg_replace('/Model$/', '', get_called_class()) ) . \"s\";\n\t\t}\n\t}",
"public function initialize()\n {\n $this->keepSnapshots(true);\n $this->addBehavior(new Blameable());\n $this->useDynamicUpdate(true);\n $this->hasMany(\"id\", \"models\\Formentrys\", \"form_id\", ['alias' => 'Entries']);\n $this->hasMany(\"id\", \"models\\Formfields\", \"form_id\", ['alias' => 'Formfields']);\n $this->belongsTo(\"user_id\", \"models\\Users\", \"id\", ['alias' => 'Users']);\n }",
"protected function _initialize()\r\n {\r\n $this->metadata()->setTablename('comentarios');\r\n $this->metadata()->setPackage('system.application.models.dao');\r\n \r\n # nome_do_membro, nome_da_coluna, tipo, comprimento, opcoes\r\n \r\n $this->metadata()->addField('id', 'id', 'int', 11, array('primary' => true, 'notnull' => true, 'autoincrement' => true));\r\n $this->metadata()->addField('comentario', 'comentario', 'varchar', 45, array());\r\n $this->metadata()->addField('dataAvaliacao', 'data_avaliacao', 'datetime', null, array());\r\n $this->metadata()->addField('coordenadorId', 'coordenador_id', 'int', 11, array());\r\n $this->metadata()->addField('itemAvaliado', 'item_avaliado', 'varchar', 45, array());\r\n $this->metadata()->addField('avaliador', 'avaliador', 'varchar', 45, array());\r\n $this->metadata()->addField('tipoAvaliacao', 'tipo_avaliacao', 'varchar', 45, array());\r\n $this->metadata()->addField('subtipoAvaliacao', 'subtipo_avaliacao', 'varchar', 45, array());\r\n\r\n \r\n }",
"public function initialize()\n {\n $this->setSchema(\"realworlddb\");\n $this->belongsTo('followerId', User::class, 'id', ['alias' => 'User']);\n $this->belongsTo('followedId', User::class, 'id', ['alias' => 'User']);\n }",
"public function initialize()\n\t{\n\t\t// attributes\n\t\t$this->setName('tbl_user');\n\t\t$this->setPhpName('TblUser');\n\t\t$this->setClassname('TblUser');\n\t\t$this->setPackage('lib.model');\n\t\t$this->setUseIdGenerator(true);\n\t\t// columns\n\t\t$this->addPrimaryKey('USER_ID', 'UserId', 'INTEGER', true, null, null);\n\t\t$this->addColumn('USER_NOM', 'UserNom', 'VARCHAR', false, 200, null);\n\t\t$this->addColumn('USER_PRENOM', 'UserPrenom', 'VARCHAR', false, 200, null);\n\t\t$this->addColumn('USER_LOGIN', 'UserLogin', 'VARCHAR', false, 200, null);\n\t\t$this->addColumn('USER_PASSWORD', 'UserPassword', 'VARCHAR', false, 200, null);\n\t\t$this->addColumn('USER_MAIL', 'UserMail', 'VARCHAR', false, 200, null);\n\t\t$this->addColumn('USER_COMPTE_ACTIVE', 'UserCompteActive', 'BOOLEAN', false, 1, null);\n\t\t$this->addColumn('USER_LAST_CNX', 'UserLastCnx', 'TIMESTAMP', false, null, null);\n\t\t$this->addColumn('USER_NB_CNX', 'UserNbCnx', 'INTEGER', false, null, null);\n\t\t// validators\n\t}",
"public function initialize()\n {\n $this->setSchema(\"cubicfox\");\n $this->setSource(\"rates\");\n\n $this->hasManyToMany(\n \"id\",\n \"Users\",\n \"user_id\", \n \"product_id\",\n \"Products\",\n \"id\"\n );\n }",
"public function initialize()\n {\n $this->setSchema(\"mydb\");\n $this->setSource(\"paying\");\n $this->belongsTo('cid', 'Customers', 'cid', array('alias' => 'alias_customers'));\n $this->belongsTo('loanid', 'LoanInformation', 'loanid', array('alias' => 'alias_loan'));\n $this->hasManyToMany(\n 'payingid',\n 'Tracking',\n 'payingid', 'oid',\n 'DeptTrackers',\n 'oid',\n array(\n 'alias' => 'alias_depttrackers'\n )\n );\n }",
"protected function _construct()\n {\n $this->_init(self::TABLE_NAME, self::TABLE_ID);\n }",
"protected function init()\r\n {\r\n $this->table_name = 'libelles';\r\n $this->table_type = 'system';\r\n $this->table_gateway_alias = 'Sbm\\Db\\SysTableGateway\\Libelles';\r\n $this->id_name = array(\r\n 'nature',\r\n 'code'\r\n );\r\n }",
"public function initialize()\n {\n $this->setSchema(\"taff\");\n $this->setSource(\"boardchecklist\");\n $this->hasMany('checklistId', 'Boardchecklistitem', 'checklistId', ['alias' => 'Boardchecklistitem']);\n $this->belongsTo('cardId', '\\Boardcard', 'cardId', ['alias' => 'Boardcard']);\n }",
"protected function initTableFields()\r\n {\r\n $this->addField(self::$ID, STRING, \"\");\r\n $this->addField(self::$USER_ID, STRING, \"\");\r\n $this->addField(self::$LOGIN_TIME, STRING, date('Y-m-d H:i:s'));\r\n $this->addField(self::$LOGOUT_TIME, STRING, date('Y-m-d H:i:s'));\r\n $this->addField(self::$STATUS, INTEGER, USER_ACCESS_TOKEN_STATUS_INVALID);\r\n $this->addField(self::$LONGITUDE, INTEGER, 0);\r\n $this->addField(self::$LATITUDE, INTEGER, 0);\r\n $this->addField(self::$CLIENT_IP, STRING, \"\");\r\n }",
"public function initialize()\n {\n $this->skipAttributes([\n \"question_id\",\n ]);\n\n $this->skipAttributesOnCreate([\n \"question_status\"\n ]);\n\n $this->skipAttributesOnUpdate([\n \"question_creation_time\"\n ]);\n\n $this->hasMany('question_id', 'QaApp\\Models\\Answer', 'question_id', array('alias' => 'Answers'));\n }",
"public function initialize()\n {\n $this->setSchema(\"\");\n $this->hasMany(\n 'id',\n 'App\\Models\\Flats',\n 'house_id',\n array('alias' => 'Flats', \"reusable\" => true)\n );\n\n $this->belongsTo(\n \"street_id\",\n \"App\\Models\\Streets\",\n \"id\",\n array(\"alias\" => \"Streets\", \"reusable\" => true)\n );\n }",
"public function initialize()\n {\n parent::initialize();\n $this->setSchema(\"salesDB\");\n $this->setSource(\"questionnaire\");\n $this->hasMany('id', 'App\\Models\\Question', 'questionnaire_id', ['alias' => 'Question']);\n $this->belongsTo('itinerary_type_id', 'App\\Models\\ItineraryType', 'id', ['alias' => 'ItineraryType']);\n $this->belongsTo('client_id', 'App\\Models\\Client', 'id', ['alias' => 'Client']);\n $this->belongsTo('user_created', 'App\\Models\\User', 'id', ['alias' => 'UserCreated']);\n $this->belongsTo('user_updated', 'App\\Models\\User', 'id', ['alias' => 'UserUpdated']);\n $this->belongsTo('questionnaire_type_id', 'App\\Models\\QuestionnaireType', 'id', ['alias' => 'QuestionnaireType']);\n $this->belongsTo('sync_status_id', 'App\\Models\\SyncStatus', 'id', ['alias' => 'SyncStatus']);\n }",
"public function initialize() {\n\n // Relation to DasUsers\n $this->belongsTo('id', 'Aiden\\Models\\DasUsers', 'users_id', ['alias' => 'DasUsers']);\n\n // Relation to Phrases\n $this->hasMany('id', 'Aiden\\Models\\UsersPhrases', 'users_id', [\"alias\" => \"Phrases\"]);\n\n // Relation to Das\n $this->hasManyToMany('id', 'Aiden\\Models\\DasUsers', 'users_id', 'das_id', 'Aiden\\Models\\Das', 'id', ['alias' => 'Das']);\n\n // Relation to Councils\n $this->hasManyToMany('id', 'Aiden\\Models\\UsersCouncils', 'users_id', 'councils_id', 'Aiden\\Models\\Councils', 'id', ['alias' => 'Councils']);\n\n }",
"public function init()\n {\n $this->yatimsModel = new Admin_Model_DbTable_GestYatims();\n $this->dateImpl = new Default_Model_DateImpl();\n }",
"public function init() {\n//\t\tif (checkTable()) {\n//\t\t\t$this->model->upgrade();\n//\t\t}\n//\t\telse {\n\t\t\t$this->model->install();\n\t\t\t$this->loadDefaults();\n//\t\t}\n\t\t\n\t}",
"protected function _initialize() {\n $this->tableName = 'user_product';\n }",
"public function initialize()\n {\n $this->setSchema(\"test\");\n $this->setSource(\"role_admin\");\n// $this->belongsTo('admin_id', 'Application\\Common\\Models\\Admins', 'id', ['alias' => 'Admins']);\n// $this->belongsTo('role_id', 'Application\\Common\\Models\\Roles', 'id', ['alias' => 'Roles']);\n }",
"public function initialize()\n {\n $this->hasMany('id', 'app\\common\\models\\base\\UserProfile', 'user_id', array('alias' => 'UserProfile'));\n $this->hasMany('id', 'app\\common\\models\\base\\UserRoles', 'user_id', array('alias' => 'UserRoles'));\n $this->belongsTo('type_id', 'app\\common\\models\\base\\UserType', 'id', array('alias' => 'UserType'));\n }",
"public function initialize()\n {\n $this->setSchema(\"fox_zeus\");\r\n $this->setSource(\"usuario\");\r\n $this->hasMany('codUsuario', 'UsuarioSistema', 'codUsuario', ['alias' => 'UsuarioSistema']);\r\n $this->belongsTo('codPersona', '\\Empleado', 'codPersona', ['alias' => 'Empleado']);\n }",
"public function initialize()\n {\n $this->setSchema(\"sistema\");\n $this->setSource(\"comentarios\");\n $this->belongsTo('id_usuario', '\\Usuarios', 'id_usuario', ['alias' => 'Usuarios']);\n $this->belongsTo('id_reporte', '\\Reporte', 'id_reporte', ['alias' => 'Reporte']);\n }",
"public function initialize()\n {\n \t$this->belongsTo('id_usuario', 'IbcUsuario', 'id_usuario', array(\n \t\t\t'reusable' => true\n \t));\n \t$this->belongsTo('id_periodo', 'CobPeriodo', 'id_periodo', array(\n \t\t\t'reusable' => true\n \t));\n \t$this->belongsTo('id_contrato', 'CobActaconteo', 'id_contrato', array(\n \t\t\t'reusable' => true\n \t));\n \t$this->belongsTo('id_ajuste_reportado', 'CobAjusteReportado', 'id_ajuste_reportado', array(\n \t\t\t'reusable' => true\n \t));\n \t$this->belongsTo('id_actaconteo_persona_facturacion', 'CobActaconteoPersonaFacturacion', 'id_actaconteo_persona_facturacion', array(\n \t\t\t'reusable' => true\n \t));\n }",
"function init(){\n\t\t/*\n\t\t * Redefine this object, call parent then use addField to specify which fields\n\t\t * you are going to use\n\t\t */\n\t\tparent::init();\n\t\t$this->table_name = get_class($this);\n\t}",
"public function initialize()\n {\n $this->setDefaultSchema();\n $this->setSource(\"invite\");\n\n $this->hasMany('id', 'Meetingg\\Models\\User', 'invite_id', ['alias' => 'User']);\n $this->belongsTo('user_id', 'Meetingg\\Models\\User', 'id', ['alias' => 'User']);\n\n $this->belongsTo('meeting_id', 'Meetingg\\Models\\Meeting', 'id', ['alias' => 'Meeting']);\n\n $this->hasMany('id', 'Meetingg\\Models\\Meeting\\User', 'invite_id', ['alias' => 'MeetingUsers']);\n $this->hasMany('id', 'Meetingg\\Models\\Discussion\\User', 'invite_id', ['alias' => 'DiscussionUsers']);\n }",
"public function initialize()\n {\n $this->setSchema(\"c5_espositori\");\n $this->setSource(\"exhibitors\");\n $this->hasMany('id', 'Reservations', 'exhibitors_id', ['alias' => 'Reservations', 'reusable' => true]);\n $this->hasMany('id', 'Reservations', 'padre_id', ['alias' => 'Padri']);\n }",
"public function initialize()\n {\n $this->setSchema(\"agiledev\");\n $this->setSource(\"user\");\n $this->hasMany('username', 'Task', 'created_by', ['alias' => 'Task']);\n $this->hasMany('username', 'TaskAssignee', 'username', ['alias' => 'TaskAssignee']);\n $this->hasMany('username', 'UserContact', 'username', ['alias' => 'UserContact']);\n $this->hasMany('username', 'UserInfo', 'username', ['alias' => 'UserInfo']);\n }",
"public function initialize()\n {\n $this->setSource(\"users\");\n\n $this->hasOne(\n 'id',\n RememberTokenModel::class,\n 'user_id',\n [\n 'alias' => \"remember_token\"\n ]\n );\n\n $this->hasManyToMany(\n 'id',\n UsersRoles::class,\n 'user_id', 'role_id',\n Roles::class,\n \"id\",\n [\n 'alias' => \"roles\"\n ]\n );\n }",
"function __construct() \n {\n // Creation de la table\n self::createTableIfNeeded();\n }",
"public function initialize()\n {\n parent::initialize();\n $this->setSource('rules_workflow_actions');\n\n $this->hasMany(\n 'id',\n RulesActions::class,\n 'rules_workflow_actions_id',\n [\n 'alias' => 'rulesActions'\n ]\n );\n\n $this->belongsTo(\n 'actions_id',\n Actions::class,\n 'id',\n [\n 'alias' => 'actions'\n ]\n );\n }",
"public function initTables(): void\n {\n $table = TableRegistry::getTableLocator()->get('Qobo/Survey.Surveys');\n $this->Surveys = $table;\n\n $table = TableRegistry::getTableLocator()->get('Qobo/Survey.SurveyResults');\n $this->SurveyResults = $table;\n\n $table = TableRegistry::getTableLocator()->get('Qobo/Survey.SurveyEntries');\n $this->SurveyEntries = $table;\n\n $table = TableRegistry::getTableLocator()->get('Qobo/Survey.SurveyEntryQuestions');\n $this->SurveyEntryQuestions = $table;\n }",
"public function initialize()\n {\n parent::initialize();\n $this->belongsTo('users_id', Users::class, 'id', array('alias' => 'users'));\n $this->belongsTo('companies_id', Companies::class, 'id', array('alias' => 'company'));\n }",
"public function init() {\n $this->table = 'depenses';\n }",
"public function __construct(){\n \n $this->create_tables();\n \n }",
"public function initialize()\n {\n $this->setSchema(\"database\");\n $this->setSource(\"comments\");\n $this->belongsTo('articleId', 'ApplicationModels\\Articles', 'id', ['alias' => 'Articles']);\n $this->belongsTo('userId', 'ApplicationModels\\Users', 'id', ['alias' => 'Users']);\n }",
"public function initialize()\r\n {\r\n $this->setSchema(\"diplom\");\r\n $this->setSource(\"user\");\r\n $this->hasManyToMany(\r\n 'user_id',\r\n 'UserHasRoom',\r\n 'user_user_id', 'room_room_id',\r\n 'Room',\r\n 'room_id'\r\n );\r\n $this->hasManyToMany(\r\n 'user_id',\r\n 'RoomHasMessage',\r\n 'user_id', 'message_message_id',\r\n 'Message',\r\n 'message_id'\r\n );\r\n $this->hasMany('user_id', 'UserHasRoom', 'user_user_id', ['alias' => 'UserHasRoom']);\r\n }",
"public function initialize()\n {\n $this->setSchema(\"nidara_private_school\");\n $this->setSource(\"account_status\");\n $this->belongsTo('users_id', '\\Users', 'id', ['alias' => 'Users']);\n $this->belongsTo('why_are_you_leaving_id', '\\WhyAreYouLeaving', 'id', ['alias' => 'WhyAreYouLeaving']);\n }",
"public function init(){\n $s = $this->schema();\n\n $s->hasMany('roles')\n ->className('net\\mediaslave\\authentication\\app\\models\\Role', true)\n ->thru('net\\mediaslave\\authentication\\app\\models\\UserSettingThruRole', true);\n\n $s->hasMany('users')\n ->className('net\\mediaslave\\authentication\\app\\models\\User', true)\n ->thru('net\\mediaslave\\authentication\\app\\models\\UserSettingThruUser', true);\n\n\n }",
"public function initialize()\n {\n $this->setSource('Customer');\n $this->hasMany(\"Number\", \"Arrears\", \"CustomerNumber\");\n $this->hasMany(\"Number\", \"Charge\", \"CustomerNumber\");\n\n $c = $this;\n $c->IsCut = 0;\n $c->ArrearsCount = 0;\n $c->CutCount = 0;\n $c->IsClean = 0;\n $c->IsControl = 0;\n $c->Money = 0;\n $c->IsRent = 0;\n $c->RenterPhone = \"\";\n\n $c->CanCut = 0;\n $c->IsSpecial = 0;\n $c->CutStyle=\"\";\n $c->PressCount = 0;\n }",
"public function initialize()\n {\n $this->setSchema(\"dia_sin_iva\");\n $this->setSource(\"terceros_descuentos_sin_impuestos\");\n $this->belongsTo('cod_descuento_sin_impuesto', 'App\\Models\\DescuentosSinImpuestos', 'cod', ['alias' => 'DescuentosSinImpuestos']);\n $this->belongsTo('cod_producto', 'App\\Models\\Productos', 'cod', ['alias' => 'Productos']);\n }",
"public function initialize()\n {\n $this->setSchema(\"social_media\");\n $this->setSource(\"Transaction\");\n $this->belongsTo('comment_id', 'App\\Models\\Comment', 'id', ['alias' => 'Comment']);\n $this->belongsTo('user_id', 'App\\Models\\User', 'id', ['alias' => 'User']);\n }",
"public function initialize() {\n $this->setSchema(\"coopdb\");\n $this->setSource(\"pedidosdetalle\");\n $this->belongsTo('IDKEY', 'Pedidos', 'TxnID', ['alias' => 'Pedidos']);\n }",
"public function init()\r\n\t{\r\n\t\tif (count($this->table_fields) < 1)\r\n\t\t\treturn false;\r\n\t\tforeach ($this->table_fields as $table_field) {\r\n\t\t\tif ($table_field->get_primary_key()) {\r\n\t\t\t\t$this->id_field = $table_field->get_name();\r\n\t\t\t}\r\n\t\t\tif ($table_field->get_name_key()) {\r\n\t\t\t\t$this->name_fields[] = $table_field->get_name();\r\n\t\t\t}\r\n\t\t\tif ($table_field->get_unike_key()) {\r\n\t\t\t\t$this->unike_keys[] = $table_field->get_name();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public function init()\r\n {\r\n $dbTable = new Application_Model_DbTable_Fournisseur();\r\n $this->mapper = new Application_Model_Mapper_Fournisseur($dbTable);\r\n }",
"public function initialize()\n {\n $this->setSchema(\"phptest\");\n $this->setSource(\"rating\");\n\n // n-1 relation to Products\n $this->belongsTo('product_id', 'Models\\Products', 'id', ['alias' => 'product']);\n\n // n-1 relation to Users\n $this->belongsTo('user_id', 'Models\\Users', 'id', ['alias' => 'user']);\n }",
"public function initialize()\n {\n $this->belongsTo(\n 'users_id',\n Users::class,\n 'id',\n ['alias' => 'user']\n );\n\n $this->belongsTo(\n 'companies_id',\n Companies::class,\n 'id',\n ['alias' => 'company']\n );\n\n $this->setSource('users_associated_company');\n }",
"public function initialize()\n {\n $this->setSchema(\"sistema\");\n $this->setSource(\"rol\");\n $this->hasMany('id_rol', 'Usuarios', 'id_rol', ['alias' => 'Usuarios']);\n }",
"public function initialize()\n {\n parent::initialize();\n $this->setSchema(\"salesDB\");\n $this->setSource(\"product_category\");\n $this->hasMany('id', 'App\\Models\\Product', 'product_category_id', ['alias' => 'Product']);\n $this->belongsTo('user_updated', 'App\\Models\\User', 'id', ['alias' => 'UserUpdated']);\n $this->belongsTo('user_created', 'App\\Models\\User', 'id', ['alias' => 'UserCreated']);\n $this->belongsTo('client_id', 'App\\Models\\Client', 'id', ['alias' => 'Client']);\n $this->belongsTo('sync_status_id', 'App\\Models\\SyncStatus', 'id', ['alias' => 'SyncStatus']);\n }",
"public function initialize()\n {\n $this->addBehavior(new Timestampable(array(\n 'beforeValidationOnCreate' => array(\n 'field' => 'created',\n 'format' => 'Y-m-d H:i:s'\n )\n )));\n $this->hasMany('id', 'Tokens', 'users_id', array(\n 'alias' => 'tokens'\n ));\n $this->hasMany('id', 'Posts', 'users_id', array(\n 'alias' => 'posts'\n ));\n }",
"public function initialize()\n {\n $this->hasMany('id_niveldinst', 'Cargaestudiantes', 'id_niveldinst', array('alias' => 'Cargaestudiantes'));\n $this->hasMany('id_niveldinst', 'Datosprofesiona', 'nive_instr', array('alias' => 'Datosprofesiona'));\n $this->hasMany('id_niveldinst', 'Cargaestudiantes', 'id_niveldinst', NULL);\n $this->hasMany('id_niveldinst', 'Datosprofesiona', 'nive_instr', NULL);\n }",
"public function initialize()\n {\n $this->setSchema(\"atiempo_prod\");\n $this->hasMany('id', 'AcCartaAvalDetalle', 'id_carta', ['alias' => 'AcCartaAvalDetalle']);\n }",
"public function initialize()\n {\n $this->setSchema(\"ieslluis_gestiovfc\");\n $this->setSource(\"lines_comandes\");\n $this->hasMany('ncomanda', 'Comandes', 'numero', ['alias' => 'Comandes']);\n $this->hasMany('producte', 'Productes', 'codi', ['alias' => 'Productes']);\n }",
"function initialize () {\n $this->set_openingtag ( \"<TABLE[attributes]>\" );\n\t$this->set_closingtag ( \"</TABLE>\" );\n }",
"public function initialize()\n {\n $this->belongsTo(\n 'companies_id',\n 'Canvas\\Models\\Companies',\n 'id',\n ['alias' => 'company']\n );\n\n $this->belongsTo(\n 'apps_id',\n 'Canvas\\Models\\Apps',\n 'id',\n ['alias' => 'app']\n );\n\n $this->belongsTo(\n 'users_id',\n 'Canvas\\Models\\Users',\n 'id',\n ['alias' => 'user']\n );\n\n $this->belongsTo(\n 'system_modules_id',\n 'Canvas\\Models\\SystemModules',\n 'id',\n ['alias' => 'systemModule']\n );\n\n $this->setSource('email_templates_variables');\n }",
"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 init()\n {\n\n // initialize the prepared statements\n $this->eavAttributeSetStmt =\n $this->getConnection()->prepare($this->loadStatement(SqlStatementKeys::EAV_ATTRIBUTE_SET));\n $this->eavAttributeSetsByEntityTypeIdStmt =\n $this->getConnection()->prepare($this->loadStatement(SqlStatementKeys::EAV_ATTRIBUTE_SETS_BY_ENTITY_TYPE_ID));\n $this->eavAttributeSetByEntityTypeIdAndAttributeSetNameStmt =\n $this->getConnection()->prepare($this->loadStatement(SqlStatementKeys::EAV_ATTRIBUTE_SET_BY_ENTITY_TYPE_ID_AND_ATTRIBUTE_SET_NAME));\n $this->eavAttributeSetByEntityTypeCodeAndAttributeSetNameStmt =\n $this->getConnection()->prepare($this->loadStatement(SqlStatementKeys::EAV_ATTRIBUTE_SET_BY_ENTITY_TYPE_CODE_AND_ATTRIBUTE_SET_NAME));\n }",
"public function initialize()\n {\n /*$this->hasOne('id', 'Broadcasters', 'id', NULL);\n $this->hasOne('id', 'Clients', 'id', NULL);\n $this->hasMany('id', 'Credits', 'user_id', NULL);*/\n }",
"public function initialize()\n {\n parent::initialize();\n $this->setSource(\"zp_users\");\n\n $this->hasMany(\n \"ID\",\n \"ZPhal\\\\Models\\\\Usermeta\",\n \"user_id\"\n );\n\n // 软删除\n $this->addBehavior(\n new SoftDelete(\n [\n \"field\" => \"user_status\",\n \"value\" => Users::DELETED,\n ]\n )\n );\n }",
"public function __construct()\n {\n parent::init();\n $this->setColumnsList(array(\n 'id'=>'Id',\n 'username'=>'Username',\n 'password'=>'Password',\n 'email'=>'Email',\n 'id_role'=>'IdRole',\n 'status'=>'Status',\n 'recorddate'=>'Recorddate',\n 'luta'=>'Luta',\n ));\n\n $this->setParentList(array(\n ));\n\n $this->setDependentList(array(\n ));\n }",
"public function initialize()\n {\n //$this->setSchema(\"service_services\");\n $this->setSource(\"favoriteUsers\");\n $this->belongsTo('userobject', '\\Users', 'userid', ['alias' => 'Users']);\n $this->belongsTo('usersubject', '\\Users', 'userid', ['alias' => 'Users']);\n }",
"protected function initialize()\n {\n parent::initialize();\n\n $version = \\SQLite3::version();\n $version = $version['versionString'];\n\n $this->relationSupport = version_compare($version, '3.6.19') >= 0;\n\n $this->setSchemaDomainMapping(new Domain(PropelTypes::NUMERIC, 'DECIMAL'));\n $this->setSchemaDomainMapping(new Domain(PropelTypes::LONGVARCHAR, 'MEDIUMTEXT'));\n $this->setSchemaDomainMapping(new Domain(PropelTypes::DATE, 'DATETIME'));\n $this->setSchemaDomainMapping(new Domain(PropelTypes::BINARY, 'BLOB'));\n $this->setSchemaDomainMapping(new Domain(PropelTypes::VARBINARY, 'MEDIUMBLOB'));\n $this->setSchemaDomainMapping(new Domain(PropelTypes::LONGVARBINARY, 'LONGBLOB'));\n $this->setSchemaDomainMapping(new Domain(PropelTypes::BLOB, 'BLOB'));\n $this->setSchemaDomainMapping(new Domain(PropelTypes::CLOB, 'LONGTEXT'));\n $this->setSchemaDomainMapping(new Domain(PropelTypes::OBJECT, 'BLOB'));\n $this->setSchemaDomainMapping(new Domain(PropelTypes::PHP_ARRAY, 'MEDIUMTEXT'));\n $this->setSchemaDomainMapping(new Domain(PropelTypes::ENUM, 'TINYINT'));\n }",
"public function initialize()\n {\n $this->belongsTo(\n 'companies_id',\n Companies::class,\n 'id',\n ['alias' => 'company']\n );\n\n $this->belongsTo(\n 'apps_id',\n Apps::class,\n 'id',\n ['alias' => 'app']\n );\n\n $this->belongsTo(\n 'users_id',\n Users::class,\n 'id',\n ['alias' => 'user']\n );\n\n $this->setSource('users_associated_apps');\n }",
"public function initialize_columns()\n {\n $this->add_column(new DataClassPropertyTableColumn(Right::class_name(), Right::PROPERTY_NAME));\n $this->add_column(new DataClassPropertyTableColumn(Right::class_name(), Right::PROPERTY_DESCRIPTION));\n }",
"public function initialize()\n {\n $this->setSchema(\"\");\n }",
"public function initialize()\n {\n $this->setSchema(\"\");\n }",
"public function initialize()\n {\n $this->setSchema(\"\");\n }",
"protected function _setup() {\n // $this->_createTable();\n parent::_setup();\n }",
"public function initialize()\n {\n $this->hasMany('id', 'Aulas', 'id_materia', array('alias' => 'Aulas'));\n $this->hasMany('id', 'Aulas', 'id_materia', NULL);\n }",
"private function __construct() {\n\t\t$this->verifyBasicDatabaseTableSetup();\n\t}",
"public function initialize()\n {\n $this->belongsTo('nu_cedula', 'Datospersonales', 'nu_cedula', array('alias' => 'Datospersonales'));\n $this->belongsTo('nu_cedula', 'Datospersonales', 'nu_cedula', array('foreignKey' => true));\n }",
"protected function tableModel()\n {\n }",
"public function initialize(){\n $this->setSchema(\"\");\n }",
"public function initialize()\n {\n $this->hasMany('cd', 'ShouhinMrs', 'shu_souko_mr_cd', array('alias' => 'ShouhinMrs'));\n $this->hasMany('cd', 'ShiireMeisaiDts', 'souko_mr_cd', array('alias' => 'ShiireMeisaiDts'));\n $this->hasMany('cd', 'UriageMeisaiDts', 'souko_mr_cd', array('alias' => 'UriageMeisaiDts'));\n $this->belongsTo('tantou_mr_cd', 'TantouMrs', 'cd', array('alias' => 'TantouMrs'));\n }",
"public function initialize()\n {\n $this->belongsTo('id_actaconteo_persona', 'CobActaconteoPersonaExcusa', 'id_actaconteo_persona', array(\n 'reusable' => true\n ));\n $this->belongsTo('id_actaconteo_persona', 'CobActaconteoPersonaFacturacion', 'id_actaconteo_persona', array(\n 'reusable' => true\n ));\n $this->belongsTo('id_actaconteo', 'CobActaconteo', 'id_actaconteo', array(\n 'reusable' => true\n ));\n }",
"public function initialize()\n {\n $this->belongsTo(\"hotel_id\", \"Hotels\", \"id\");\n $this->belongsTo(\"user_id\", \"User\", \"id\");\n $this->hasMany(\"id\", \"Transaction\", \"reservation_id\");\n }",
"function init()\n {\n /**\n * The database table to store the model.\n * The table name will be prefixed with the prefix define\n * in the global configuration.\n */\n $this->_a['table'] = 'todo_lists';\n \n /**\n * The definition of the model.\n * Each key of the associative array\n * corresponds to a \"column\" and the definition of the column is\n * given in the corresponding array.\n */\n $this->_a['cols'] = array(\n // It is mandatory to have an \"id\" column.\n 'id' => array(\n 'type' => 'Pluf_DB_Field_Sequence',\n // It is automatically added.\n 'blank' => true\n ),\n 'name' => array(\n 'type' => 'Pluf_DB_Field_Varchar',\n 'blank' => false,\n 'size' => 100,\n // The verbose name is all lower case\n 'verbose' => 'name'\n )\n );\n /**\n * You can define the indexes.\n * Indexes are you to sort and find elements. Here we define\n * an index on the completed column to easily select the list\n * of completed or not completed elements.\n */\n $this->_a['idx'] = array();\n $this->_a['views'] = array();\n }",
"public function initialize()\n {\n $this->hasMany('id', 'AppCustomer', 'app_id', NULL);\n $this->hasMany('id', 'AppPrivileges', 'app_id', NULL);\n }",
"public function initialize() {\n\n $this->belongsTo(\"users_id\", \"Aiden\\Models\\Users\", \"id\", [\"alias\" => \"User\"]);\n $this->belongsTo(\"councils_id\", \"Aiden\\Models\\Councils\", \"id\", [\"alias\" => \"Council\"]);\n\n }",
"public function initialize()\n {\n $this->hasMany(\"id\", \"Hotelsfacility\", \"hotel_id\");\n $this->hasMany(\"id\", \"HotelRoom\", \"hotel_id\");\n $this->belongsTo(\"city_id\", \"City\", \"id\");\n $this->belongsTo(\"province_id\", \"Province\", \"id\");\n $this->belongsTo(\"country_id\", \"Country\", \"id\");\n\n }",
"public function initialize()\n {\n $this->setSchema(\"technical_test_phalcon_app\");\n $this->setSource(\"company\");\n $this->hasMany('code_company', 'App\\Models\\CompanySecurity', 'code_company', ['alias' => 'CompanySecurity']);\n }",
"public function initialize()\n\t{\n\t\t$this->hasMany('id', 'Talon\\Models\\Users\\SuccessLogins', 'usersId', array(\n\t\t\t'alias' => 'successLogins',\n\t\t\t'foreignKey' => array(\n\t\t\t\t'message' => 'User cannot be deleted because he/she has activity in the system'\n\t\t\t)\n\t\t));\n\n\t\t$this->hasMany('id', 'Talon\\Models\\Users\\PasswordChanges', 'usersId', array(\n\t\t\t'alias' => 'passwordChanges',\n\t\t\t'foreignKey' => array(\n\t\t\t\t'message' => 'User cannot be deleted because he/she has activity in the system'\n\t\t\t)\n\t\t));\n\n\t\t$this->hasMany('id', 'Talon\\Models\\Users\\ResetPasswords', 'usersId', array(\n\t\t\t'alias' => 'resetPasswords',\n\t\t\t'foreignKey' => array(\n\t\t\t\t'message' => 'User cannot be deleted because he/she has activity in the system'\n\t\t\t)\n\t\t));\n\t}",
"protected function init()\n {\n if (!isset($this['fields'])) {\n $model = $base = [];\n if (isset($this->options['base_model']) && $this->options['base_model']) {\n $base = static::getTableInfo($this->options['base_model']) ? : [];\n }\n if (isset($this->options['table_name']) && (!$base || $this->options['table_name'] != $base['table_name'])) {\n $model = $this->getTableInfo($this->options['table_name']) ? : [];\n }\n \n if ($model && $base) {\n $model['ext_table'] = $model['table_name'];\n $model['ext_fields'] = isset($model['master_fields']) ? $model['master_fields'] : array_keys($model['fields']);\n \n $model['master_table'] = $base['table_name'];\n $model['master_fields'] = isset($base['master_fields']) ? $base['master_fields'] : array_keys($base['fields']);\n }\n \n // merge\n $model = ArrayHelper::merge($base, $model);\n $this->setOption($model);\n }\n }",
"public function __construct(){\n\t\tparent::__construct($this->table);\n\t}",
"public function initialize() {\n $this->setSource('article');\n\n $this->belongsTo('author_id', Article::class, 'author_id', [\n 'alias' => 'author',\n 'reusable' => true,\n ]);\n\n $this->hasMany('article_id', ArticleTag::class, 'article_id', [\n 'alias' => 'tagRelation',\n ]);\n\n $this->hasMany('article_id', Comment::class, 'article_id', [\n 'alias' => 'comments',\n ]);\n }",
"function _init_fields()\n\t{\n\t\tif($this->table_name)\n\t\t{\n\t\t\t$this->db_fields = $this->db->list_fields($this->table_name);\n\t\t\t\n\t\t\tforeach($this->db_fields as $field)\n\t\t\t{\n\t\t\t\t$this->{$field} = NULL;\n\t\t\t}\n\t\t}\n\t}",
"public function initialize()\n {\n $this->setSchema(\"phpfw_phalcon\");\n $this->setSource(\"comments\");\n $this->belongsTo('post_id', '\\Posts', 'id', ['alias' => 'Posts']);\n $this->belongsTo('user_id', '\\Users', 'id', ['alias' => 'Users']);\n }",
"public function initialize(){\n // Untuk mengeset database service yang digunakan untuk read data, default: 'db'\n // database service harus diregister di container dependecy injector\n $this->setReadConnectionService('db');\n\n // Untuk mengeset database service yang digunakan untuk write data, default : 'db'\n $this->setWriteConnectionService('db');\n\n // Untuk mengeset schema, default : empty string\n $this->setSchema('dbo');\n\n // Untuk mengeset nama tabel, default : nama class\n $this->setSource('upgrade');\n\n $this->belongsTo(\n 'id_user',\n Users::class,\n 'id_user',\n [\n 'reusable' => true,\n 'alias' => 'user'\n ]\n );\n }",
"public function initialize()\n {\n $this->belongsTo('kousin_user_id', 'Users', 'id', array('alias' => 'Users'));\n $this->belongsTo('tanni_mr1_cd', 'TanniMrs', 'cd', array('alias' => 'TanniMr1s'));\n $this->belongsTo('tanni_mr2_cd', 'TanniMrs', 'cd', array('alias' => 'TanniMr2s'));\n $this->belongsTo('utiwake_kbn_cd', 'UtiwakeKbns', 'cd', array('alias' => 'UtiwakeKbns'));\n $this->belongsTo('denpyou_mr_cd', 'DenpyouMrs', 'cd', array('alias' => 'DenpyouMrs'));\n $this->belongsTo('tantou_mr_cd', 'TantouMrs', 'cd', array('alias' => 'TantouMrs'));\n $this->belongsTo('hinsitu_kbn_cd', 'HinsituKbns', 'cd', array('alias' => 'HinsituKbns'));\n $this->belongsTo('souko_mr_cd', 'SoukoMrs', 'cd', array('alias' => 'SoukoMrs'));\n\n //納入先、気付先を取得するため。 Add By Nishiyama 2019/2/14\n $this->belongsTo('denpyou_mr_cd','UriageDts','cd',array('alias' => 'UriageDts'));\n }",
"public function initialize()\n {\n // attributes\n $this->setName('proveedormarca');\n $this->setPhpName('Proveedormarca');\n $this->setClassname('Proveedormarca');\n $this->setPackage('zarely');\n $this->setUseIdGenerator(true);\n // columns\n $this->addPrimaryKey('idproveedormarca', 'Idproveedormarca', 'INTEGER', true, null, null);\n $this->addForeignKey('idproveedor', 'Idproveedor', 'INTEGER', 'proveedor', 'idproveedor', true, null, null);\n $this->addForeignKey('idmarca', 'Idmarca', 'INTEGER', 'marca', 'idmarca', true, null, null);\n // validators\n }",
"public function initialize()\n {\n $this->setSchema(\"gxc\");\n $this->hasMany('id', 'App\\Models\\YztIntegral', 'user_id', ['alias' => 'YztIntegral']);\n $this->hasMany('id', 'App\\Models\\YztShopCart', 'user_id', ['alias' => 'YztShopCart']);\n $this->hasMany('id', 'App\\Models\\YztShopComment', 'user_id', ['alias' => 'YztShopComment']);\n $this->hasMany('id', 'App\\Models\\YztShopCommentPraise', 'user_id', ['alias' => 'YztShopCommentPraise']);\n $this->hasMany('id', 'App\\Models\\YztShopLog', 'user_id', ['alias' => 'YztShopLog']);\n $this->hasMany('id', 'App\\Models\\YztShopOrder', 'user_id', ['alias' => 'YztShopOrder']);\n }",
"public function initialize()\n {\n $this->setSource(\"contacts\");\n $this->belongsTo('user_id', 'Users', 'id', ['alias' => 'Users']);\n }",
"public function initialize()\n {\n $this->setSchema(\"public\");\r\n $this->setSource(\"capacidad_clase\");\r\n $this->belongsTo('modelo_avion_id', '\\ModeloAvion', 'id', ['alias' => 'ModeloAvion']);\r\n $this->belongsTo('id_clases', '\\TipoClase', 'id', ['alias' => 'TipoClase']);\n }"
] | [
"0.7580732",
"0.7575299",
"0.73270494",
"0.717987",
"0.7032933",
"0.6993016",
"0.69707245",
"0.69584113",
"0.6955107",
"0.69499326",
"0.6918305",
"0.69061995",
"0.69056875",
"0.6903476",
"0.68968755",
"0.6856668",
"0.684996",
"0.6842488",
"0.6808953",
"0.67990875",
"0.67734355",
"0.6770766",
"0.675659",
"0.67508256",
"0.6738883",
"0.6734265",
"0.67315537",
"0.6723437",
"0.6718588",
"0.66777474",
"0.66750443",
"0.66696525",
"0.66648054",
"0.6646794",
"0.66393155",
"0.66217756",
"0.6592647",
"0.65812135",
"0.6577246",
"0.65750766",
"0.656646",
"0.65634996",
"0.65560466",
"0.65445244",
"0.65425557",
"0.6528493",
"0.6523452",
"0.6520587",
"0.65200955",
"0.65121603",
"0.65110904",
"0.650903",
"0.6500362",
"0.6498694",
"0.6494002",
"0.6490787",
"0.6485955",
"0.6479302",
"0.6477115",
"0.647678",
"0.6474903",
"0.6462042",
"0.6457448",
"0.64570093",
"0.6455968",
"0.64423656",
"0.6435584",
"0.6432504",
"0.6426169",
"0.640868",
"0.64082575",
"0.6394107",
"0.63888526",
"0.63888526",
"0.63888526",
"0.63861346",
"0.6385446",
"0.6384942",
"0.63845456",
"0.6378753",
"0.63737494",
"0.63708323",
"0.6356849",
"0.635414",
"0.6346159",
"0.6344902",
"0.634246",
"0.6336891",
"0.6331334",
"0.63273185",
"0.63255596",
"0.6313664",
"0.63123715",
"0.63086486",
"0.62939966",
"0.6293198",
"0.62831277",
"0.6282941",
"0.62816256",
"0.62788624",
"0.6265118"
] | 0.0 | -1 |
initialize() Build the RelationMap objects for this table relationships | public function buildRelations()
{
$this->addRelation('UnitUsaha', 'DataDikdas\\Model\\UnitUsaha', RelationMap::MANY_TO_ONE, array('unit_usaha_id' => 'unit_usaha_id', ), 'RESTRICT', 'RESTRICT');
$this->addRelation('Mou', 'DataDikdas\\Model\\Mou', RelationMap::MANY_TO_ONE, array('mou_id' => 'mou_id', ), 'RESTRICT', 'RESTRICT');
$this->addRelation('SumberDana', 'DataDikdas\\Model\\SumberDana', RelationMap::MANY_TO_ONE, array('sumber_dana_id' => 'sumber_dana_id', ), 'RESTRICT', 'RESTRICT');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function buildRelations()\n {\n $this->addRelation('Contact', 'Contact', RelationMap::MANY_TO_ONE, array('contact_id' => 'id', ), null, null);\n $this->addRelation('State', 'State', RelationMap::MANY_TO_ONE, array('state_id' => 'id', ), null, null);\n $this->addRelation('School', 'School', RelationMap::ONE_TO_MANY, array('id' => 'sponsor_id', ), null, null, 'Schools');\n }",
"public function initialize()\n {\n $this->hasMany('id', 'MapsScore', 'map_id', array('alias' => 'MapsScore'));\n $this->hasMany('id', 'Matchs', 'current_map', array('alias' => 'Matchs'));\n $this->hasMany('id', 'PlayerKill', 'map_id', array('alias' => 'PlayerKill'));\n $this->hasMany('id', 'Players', 'map_id', array('alias' => 'Players'));\n $this->hasMany('id', 'PlayersHeatmap', 'map_id', array('alias' => 'PlayersHeatmap'));\n $this->hasMany('id', 'Round', 'map_id', array('alias' => 'Round'));\n $this->hasMany('id', 'RoundSummary', 'map_id', array('alias' => 'RoundSummary'));\n $this->belongsTo('match_id', 'Matchs', 'id', array('alias' => 'Matchs'));\n }",
"public function buildRelations()\n {\n $this->addRelation('Biblio', '\\\\Slims\\\\Models\\\\Bibliography\\\\Biblio\\\\Biblio', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':biblio_id',\n 1 => ':biblio_id',\n ),\n), null, null, null, false);\n $this->addRelation('User', '\\\\Slims\\\\Models\\\\System\\\\User\\\\User', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':uid',\n 1 => ':user_id',\n ),\n), null, null, null, false);\n $this->addRelation('Colltype', '\\\\Slims\\\\Models\\\\Masterfile\\\\Colltype\\\\Colltype', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':coll_type_id',\n 1 => ':coll_type_id',\n ),\n), null, null, null, false);\n }",
"public function buildRelations()\n {\n $this->addRelation('Moneda', 'Moneda', RelationMap::MANY_TO_ONE, array('moneda_id' => 'id', ), null, null);\n $this->addRelation('Usuario', 'Usuario', RelationMap::MANY_TO_ONE, array('usuario_id' => 'id', ), null, null);\n $this->addRelation('Negocio', 'Negocio', RelationMap::ONE_TO_MANY, array('id' => 'requerimiento_id', ), null, null, 'Negocios');\n $this->addRelation('DireccionRequerimiento', 'DireccionRequerimiento', RelationMap::ONE_TO_MANY, array('id' => 'requerimiento_id', ), null, null, 'DireccionRequerimientos');\n }",
"public function buildRelations()\n {\n $this->addRelation('Country', 'Slashworks\\\\AppBundle\\\\Model\\\\Country', RelationMap::MANY_TO_ONE, array('country_id' => 'id', ), null, 'CASCADE');\n $this->addRelation('RemoteApp', 'Slashworks\\\\AppBundle\\\\Model\\\\RemoteApp', RelationMap::ONE_TO_MANY, array('id' => 'customer_id', ), 'SET NULL', 'CASCADE', 'RemoteApps');\n $this->addRelation('UserCustomerRelation', 'Slashworks\\\\AppBundle\\\\Model\\\\UserCustomerRelation', RelationMap::ONE_TO_MANY, array('id' => 'customer_id', ), 'CASCADE', 'CASCADE', 'UserCustomerRelations');\n }",
"public function buildRelations()\n\t{\n\t\t$this->addRelation('User', 'User', RelationMap::MANY_TO_ONE, array('user_id' => 'id', ), 'CASCADE', null);\n\t\t$this->addRelation('OOBookingType', 'OOBookingType', RelationMap::MANY_TO_ONE, array('oobookingtype_id' => 'id', ), null, null);\n\t\t$this->addRelation('OOEntry', 'OOEntry', RelationMap::ONE_TO_MANY, array('id' => 'oobooking_id', ), 'CASCADE', null, 'OOEntrys');\n\t\t$this->addRelation('OORequest', 'OORequest', RelationMap::ONE_TO_ONE, array('id' => 'id', ), 'CASCADE', null);\n\t}",
"public function buildRelations()\n\t{\n $this->addRelation('Track', 'Track', RelationMap::MANY_TO_ONE, array('track_id' => 'id', ), 'RESTRICT', 'CASCADE');\n $this->addRelation('Featurevectortype', 'Featurevectortype', RelationMap::MANY_TO_ONE, array('featurevectortype_id' => 'id', ), 'RESTRICT', 'CASCADE');\n $this->addRelation('File', 'File', RelationMap::MANY_TO_ONE, array('file_id' => 'id', ), 'RESTRICT', 'CASCADE');\n $this->addRelation('DistanceRelatedByTrackAId', 'Distance', RelationMap::ONE_TO_MANY, array('track_id' => 'track_a_id', ), 'RESTRICT', 'CASCADE');\n $this->addRelation('DistanceRelatedByTrackBId', 'Distance', RelationMap::ONE_TO_MANY, array('track_id' => 'track_b_id', ), 'RESTRICT', 'CASCADE');\n $this->addRelation('Distancejob', 'Distancejob', RelationMap::ONE_TO_MANY, array('track_id' => 'track_id', ), 'RESTRICT', 'CASCADE');\n $this->addRelation('Featurevectorsegment', 'Featurevectorsegment', RelationMap::ONE_TO_MANY, array('track_id' => 'track_id', ), 'RESTRICT', 'CASCADE');\n\t}",
"public function buildRelations()\n {\n }",
"public function buildRelations()\n {\n }",
"public function buildRelations()\n {\n }",
"public function buildRelations()\n {\n }",
"public function buildRelations()\n {\n }",
"public function buildRelations()\n {\n }",
"public function buildRelations()\n {\n }",
"public function buildRelations()\n {\n }",
"public function buildRelations()\n {\n }",
"public function buildRelations()\n {\n $this->addRelation('SalesHistory', '\\\\SalesHistory', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':OehhNbr',\n 1 => ':OehhNbr',\n ),\n), null, null, null, false);\n $this->addRelation('SalesHistoryDetail', '\\\\SalesHistoryDetail', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':OehhNbr',\n 1 => ':OehhNbr',\n ),\n 1 =>\n array (\n 0 => ':OedhLine',\n 1 => ':OedhLine',\n ),\n), null, null, null, false);\n $this->addRelation('ItemMasterItem', '\\\\ItemMasterItem', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':InitItemNbr',\n 1 => ':InitItemNbr',\n ),\n), null, null, null, false);\n }",
"public function buildRelations()\n {\n $this->addRelation('Denomination', 'Denomination\\\\Denomination', RelationMap::MANY_TO_ONE, array('denomination_id' => 'id', ), null, null);\n $this->addRelation('ProfessionalCategory', 'ProfessionalCategory\\\\ProfessionalCategory', RelationMap::MANY_TO_ONE, array('professional_category_id' => 'id', ), null, null);\n $this->addRelation('Country', 'Country\\\\Country', RelationMap::MANY_TO_ONE, array('country_of_birth_id' => 'id', ), null, null);\n $this->addRelation('Migration', 'Migration\\\\Migration', RelationMap::ONE_TO_MANY, array('id' => 'person_id', ), null, null, 'Migrations');\n }",
"public function buildRelations()\n\t{\n $this->addRelation('Genero', 'Genero', RelationMap::MANY_TO_ONE, array('id_genero' => 'id', ), null, 'CASCADE');\n $this->addRelation('Tematica', 'Tematica', RelationMap::MANY_TO_ONE, array('id_tematica' => 'id', ), null, 'CASCADE');\n $this->addRelation('Autor', 'Autor', RelationMap::MANY_TO_ONE, array('id_autor' => 'id', ), null, 'CASCADE');\n $this->addRelation('Materia', 'Materia', RelationMap::MANY_TO_ONE, array('id_materia' => 'id', ), null, 'CASCADE');\n $this->addRelation('Tipopublicacion', 'Tipopublicacion', RelationMap::MANY_TO_ONE, array('id_tipopublicacion' => 'id', ), null, 'CASCADE');\n\t}",
"public function buildRelations()\n {\n $this->addRelation('CastleType', 'CastleType', RelationMap::MANY_TO_ONE, array('castle_type_id' => 'id', ), null, null);\n $this->addRelation('CastleLocation', 'CastleLocation', RelationMap::MANY_TO_ONE, array('castle_location_id' => 'id', ), null, null);\n $this->addRelation('User', 'User', RelationMap::MANY_TO_ONE, array('user_id' => 'id', ), null, null);\n $this->addRelation('Attack2castle', 'Attack2castle', RelationMap::ONE_TO_MANY, array('id' => 'castle_id', ), null, null, 'Attack2castles');\n $this->addRelation('TargetActions', 'TargetActions', RelationMap::ONE_TO_MANY, array('id' => 'castle_id', ), null, null, 'TargetActionss');\n $this->addRelation('Attack', 'Attack', RelationMap::MANY_TO_MANY, array(), null, null, 'Attacks');\n }",
"public function buildRelations()\n {\n $this->addRelation('Website', '\\\\CE\\\\Model\\\\Website', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':website_id',\n 1 => ':id',\n ),\n), 'CASCADE', 'CASCADE', null, false);\n $this->addRelation('WebsiteRouting', '\\\\CE\\\\Model\\\\WebsiteRouting', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':website_routing_id',\n 1 => ':id',\n ),\n), 'CASCADE', 'CASCADE', null, false);\n }",
"public function buildRelations()\n\t{\n\t}",
"public function buildRelations()\n\t{\n\t}",
"public function buildRelations()\n\t{\n\t}",
"public function buildRelations()\n\t{\n\t}",
"public function buildRelations()\n\t{\n\t}",
"public function buildRelations()\n\t{\n\t}",
"public function buildRelations()\n\t{\n\t}",
"public function buildRelations()\n\t{\n\t}",
"public function buildRelations()\n\t{\n $this->addRelation('Provincie', 'Provincie', RelationMap::MANY_TO_ONE, array('provincie_id' => 'id', ), null, null);\n $this->addRelation('OrganisatieType', 'OrganisatieType', RelationMap::MANY_TO_ONE, array('type_id' => 'id', ), null, null);\n $this->addRelation('Persoon', 'Persoon', RelationMap::ONE_TO_MANY, array('id' => 'organisatie_id', ), null, null);\n $this->addRelation('Contact', 'Contact', RelationMap::ONE_TO_MANY, array('id' => 'organisatie_id', ), null, null);\n $this->addRelation('Vervolgactie', 'Vervolgactie', RelationMap::ONE_TO_MANY, array('id' => 'organisatie_id', ), null, null);\n $this->addRelation('Kans', 'Kans', RelationMap::ONE_TO_MANY, array('id' => 'organisatie_id', ), null, null);\n\t}",
"public function buildRelations()\n {\n $this->addRelation('Marca', 'Marca', RelationMap::MANY_TO_ONE, array('idmarca' => 'idmarca', ), 'CASCADE', 'CASCADE');\n $this->addRelation('Proveedor', 'Proveedor', RelationMap::MANY_TO_ONE, array('idproveedor' => 'idproveedor', ), 'CASCADE', 'CASCADE');\n }",
"public function buildRelations()\n\t{\n\t\t$this->addRelation('LnkUserProfil', 'LnkUserProfil', RelationMap::ONE_TO_MANY, array('user_id' => 'user_id', ), null, null, 'LnkUserProfils');\n\t\t$this->addRelation('TblAdherent', 'TblAdherent', RelationMap::ONE_TO_MANY, array('user_id' => 'user_id', ), null, null, 'TblAdherents');\n\t}",
"public function buildRelations()\n {\n $this->addRelation('Evaluacion', '\\\\Evaluacion', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':evpr_c_evaluacion',\n 1 => ':eval_codigo',\n ),\n), null, 'CASCADE', null, false);\n $this->addRelation('Objetivo', '\\\\Objetivo', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':evpr_c_objetivo',\n 1 => ':obje_codigo',\n ),\n), null, 'CASCADE', null, false);\n $this->addRelation('Pregunta', '\\\\Pregunta', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':evpr_c_pregunta',\n 1 => ':preg_codigo',\n ),\n), null, 'CASCADE', null, false);\n $this->addRelation('Seccion', '\\\\Seccion', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':evpr_c_seccion',\n 1 => ':secc_codigo',\n ),\n), null, 'CASCADE', null, false);\n }",
"public function buildRelations()\n {\n $this->addRelation('Skill', '\\\\gossi\\\\trixionary\\\\model\\\\Skill', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':skill_id',\n 1 => ':id',\n ),\n), 'CASCADE', null, null, false);\n $this->addRelation('Reference', '\\\\gossi\\\\trixionary\\\\model\\\\Reference', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':reference_id',\n 1 => ':id',\n ),\n), null, null, null, false);\n $this->addRelation('FeaturedSkill', '\\\\gossi\\\\trixionary\\\\model\\\\Skill', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':video_id',\n 1 => ':id',\n ),\n), 'SET NULL', null, 'FeaturedSkills', false);\n $this->addRelation('FeaturedTutorialSkill', '\\\\gossi\\\\trixionary\\\\model\\\\Skill', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':tutorial_id',\n 1 => ':id',\n ),\n), 'SET NULL', null, 'FeaturedTutorialSkills', false);\n }",
"public function buildRelations()\n\t{\n $this->addRelation('Organisatie', 'Organisatie', RelationMap::MANY_TO_ONE, array('organisatie_id' => 'id', ), null, null);\n $this->addRelation('Contact', 'Contact', RelationMap::ONE_TO_MANY, array('id' => 'persoon_id', ), null, null);\n\t}",
"public function buildRelations()\n {\n $this->addRelation('Alert', 'Alert', RelationMap::ONE_TO_MANY, array('id' => 'tag_id', ), 'CASCADE', 'CASCADE', 'Alerts');\n $this->addRelation('ContentsTags', 'ContentsTags', RelationMap::ONE_TO_MANY, array('id' => 'tag_id', ), 'CASCADE', 'CASCADE', 'ContentsTagss');\n $this->addRelation('AdsTags', 'AdsTags', RelationMap::ONE_TO_MANY, array('id' => 'tag_id', ), 'CASCADE', 'CASCADE', 'AdsTagss');\n $this->addRelation('Content', 'Content', RelationMap::MANY_TO_MANY, array(), 'CASCADE', 'CASCADE', 'Contents');\n $this->addRelation('Ad', 'Ad', RelationMap::MANY_TO_MANY, array(), 'CASCADE', 'CASCADE', 'Ads');\n }",
"public function buildRelations()\n {\n $this->addRelation('Attendance', '\\\\lwops\\\\lwops\\\\Attendance', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':employeeOid',\n 1 => ':oid',\n ),\n), null, null, 'Attendances', false);\n $this->addRelation('Casualemployeepayslip', '\\\\lwops\\\\lwops\\\\Casualemployeepayslip', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':employeeOid',\n 1 => ':oid',\n ),\n), null, null, 'Casualemployeepayslips', false);\n $this->addRelation('Employeeloan', '\\\\lwops\\\\lwops\\\\Employeeloan', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':employeeOid',\n 1 => ':oid',\n ),\n), null, null, 'Employeeloans', false);\n $this->addRelation('Employeeotherdeduction', '\\\\lwops\\\\lwops\\\\Employeeotherdeduction', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':employeeOid',\n 1 => ':oid',\n ),\n), null, null, 'Employeeotherdeductions', false);\n $this->addRelation('Employeepurchases', '\\\\lwops\\\\lwops\\\\Employeepurchases', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':employeeOid',\n 1 => ':oid',\n ),\n), null, null, 'Employeepurchasess', false);\n $this->addRelation('Employeerole', '\\\\lwops\\\\lwops\\\\Employeerole', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':employeeOid',\n 1 => ':oid',\n ),\n), null, null, 'Employeeroles', false);\n $this->addRelation('Employeesalaryexpenseallocation', '\\\\lwops\\\\lwops\\\\Employeesalaryexpenseallocation', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':employeeOid',\n 1 => ':oid',\n ),\n), null, null, 'Employeesalaryexpenseallocations', false);\n $this->addRelation('Employeetermination', '\\\\lwops\\\\lwops\\\\Employeetermination', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':employeeOid',\n 1 => ':oid',\n ),\n), null, null, 'Employeeterminations', false);\n $this->addRelation('Fteemployeepayslip', '\\\\lwops\\\\lwops\\\\Fteemployeepayslip', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':employeeOid',\n 1 => ':oid',\n ),\n), null, null, 'Fteemployeepayslips', false);\n $this->addRelation('Ftesalaryadvance', '\\\\lwops\\\\lwops\\\\Ftesalaryadvance', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':employeeOid',\n 1 => ':oid',\n ),\n), null, null, 'Ftesalaryadvances', false);\n $this->addRelation('Medicaldeduction', '\\\\lwops\\\\lwops\\\\Medicaldeduction', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':employeeOid',\n 1 => ':oid',\n ),\n), null, null, 'Medicaldeductions', false);\n $this->addRelation('Nssfdeduction', '\\\\lwops\\\\lwops\\\\Nssfdeduction', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':employeeOid',\n 1 => ':oid',\n ),\n), null, null, 'Nssfdeductions', false);\n $this->addRelation('Parttimedetail', '\\\\lwops\\\\lwops\\\\Parttimedetail', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':employeeOid',\n 1 => ':oid',\n ),\n), null, null, 'Parttimedetails', false);\n $this->addRelation('Salary', '\\\\lwops\\\\lwops\\\\Salary', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':employeeOid',\n 1 => ':oid',\n ),\n), null, null, 'Salaries', false);\n }",
"public function buildRelations()\n\t{\n\t\t$this->addRelation('Cargo', 'Cargo', RelationMap::MANY_TO_ONE, array('cargo_id' => 'id', ), null, null);\n\t\t$this->addRelation('Departamento', 'Departamento', RelationMap::MANY_TO_ONE, array('departamento_id' => 'id', ), null, null);\n\t\t$this->addRelation('Endereco', 'Endereco', RelationMap::MANY_TO_ONE, array('endereco_id' => 'id', ), null, null);\n\t\t$this->addRelation('Perfil', 'Perfil', RelationMap::MANY_TO_ONE, array('perfil_id' => 'id', ), null, null);\n\t\t$this->addRelation('Auditoria', 'Auditoria', RelationMap::ONE_TO_MANY, array('id' => 'usuario_id', ), null, null, 'Auditorias');\n\t\t$this->addRelation('AvaliacaoRespostaForum', 'AvaliacaoRespostaForum', RelationMap::ONE_TO_MANY, array('id' => 'usuario_id', ), null, null, 'AvaliacaoRespostaForums');\n\t\t$this->addRelation('ColetaPesquisa', 'ColetaPesquisa', RelationMap::ONE_TO_MANY, array('id' => 'usuario_id', ), null, null, 'ColetaPesquisas');\n\t\t$this->addRelation('ComentarioNoticia', 'ComentarioNoticia', RelationMap::ONE_TO_MANY, array('id' => 'usuario_id', ), null, null, 'ComentarioNoticias');\n\t\t$this->addRelation('CurtidaForum', 'CurtidaForum', RelationMap::ONE_TO_MANY, array('id' => 'usuario_id', ), null, null, 'CurtidaForums');\n\t\t$this->addRelation('Noticia', 'Noticia', RelationMap::ONE_TO_MANY, array('id' => 'usuario_id', ), null, null, 'Noticias');\n\t\t$this->addRelation('Pesquisa', 'Pesquisa', RelationMap::ONE_TO_MANY, array('id' => 'criador_id', ), null, null, 'Pesquisas');\n\t\t$this->addRelation('PesquisaHabilitada', 'PesquisaHabilitada', RelationMap::ONE_TO_MANY, array('id' => 'usuario_id', ), null, null, 'PesquisaHabilitadas');\n\t\t$this->addRelation('Premio', 'Premio', RelationMap::ONE_TO_MANY, array('id' => 'usuario_id', ), null, null, 'Premios');\n\t\t$this->addRelation('RespostaForum', 'RespostaForum', RelationMap::ONE_TO_MANY, array('id' => 'usuario_id', ), null, null, 'RespostaForums');\n\t\t$this->addRelation('SolicitacaoResgateRelatedByAprovadorId', 'SolicitacaoResgate', RelationMap::ONE_TO_MANY, array('id' => 'aprovador_id', ), null, null, 'SolicitacaoResgatesRelatedByAprovadorId');\n\t\t$this->addRelation('SolicitacaoResgateRelatedBySolicitanteId', 'SolicitacaoResgate', RelationMap::ONE_TO_MANY, array('id' => 'solicitante_id', ), null, null, 'SolicitacaoResgatesRelatedBySolicitanteId');\n\t}",
"public function buildRelations()\n {\n $this->addRelation('Vendor', '\\\\Vendor', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':ApveVendId',\n 1 => ':ApveVendId',\n ),\n), null, null, null, false);\n $this->addRelation('PurchaseOrder', '\\\\PurchaseOrder', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':ApihPoNbr',\n 1 => ':PohdNbr',\n ),\n), null, null, null, false);\n $this->addRelation('ApInvoiceDetail', '\\\\ApInvoiceDetail', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':ApidInvNbr',\n 1 => ':ApihInvNbr',\n ),\n 1 =>\n array (\n 0 => ':ApveVendId',\n 1 => ':ApveVendId',\n ),\n 2 =>\n array (\n 0 => ':ApidPayToKey',\n 1 => ':ApihPayToKey',\n ),\n 3 =>\n array (\n 0 => ':ApidPoNbr',\n 1 => ':ApihPoNbr',\n ),\n 4 =>\n array (\n 0 => ':ApidCtrlNbr',\n 1 => ':ApihCtrlNbr',\n ),\n 5 =>\n array (\n 0 => ':ApidSeq',\n 1 => ':ApihSeq',\n ),\n), null, null, 'ApInvoiceDetails', false);\n }",
"public function buildRelations()\n\t{\n $this->addRelation('SftOrganismo', 'SftOrganismo', RelationMap::ONE_TO_MANY, array('id' => 'id_pais', ), 'SET NULL', 'CASCADE');\n $this->addRelation('SftPersona', 'SftPersona', RelationMap::ONE_TO_MANY, array('id' => 'id_paisdocidentificacion', ), 'RESTRICT', 'CASCADE');\n $this->addRelation('GenPaisI18n', 'GenPaisI18n', RelationMap::ONE_TO_MANY, array('id' => 'id', ), 'CASCADE', 'CASCADE');\n\t}",
"public function buildRelations()\n {\n $this->addRelation('Attribute', '\\\\Thelia\\\\Model\\\\Attribute', RelationMap::MANY_TO_ONE, array('attribute_id' => 'id', ), 'CASCADE', 'RESTRICT');\n $this->addRelation('Feature', '\\\\Thelia\\\\Model\\\\Feature', RelationMap::MANY_TO_ONE, array('feature_id' => 'id', ), 'CASCADE', 'RESTRICT');\n $this->addRelation('ChoiceFilterOther', '\\\\ChoiceFilter\\\\Model\\\\ChoiceFilterOther', RelationMap::MANY_TO_ONE, array('other_id' => 'id', ), 'CASCADE', 'RESTRICT');\n $this->addRelation('Category', '\\\\Thelia\\\\Model\\\\Category', RelationMap::MANY_TO_ONE, array('category_id' => 'id', ), 'CASCADE', 'RESTRICT');\n $this->addRelation('Template', '\\\\Thelia\\\\Model\\\\Template', RelationMap::MANY_TO_ONE, array('template_id' => 'id', ), 'CASCADE', 'RESTRICT');\n }",
"public function buildRelations()\n {\n $this->addRelation(\n 'Group',\n 'CAD\\\\TransferBundle\\\\Model\\\\Conn1\\\\Group',\n RelationMap::MANY_TO_ONE,\n array('group_id' => 'id',),\n null,\n null\n );\n $this->addRelation(\n 'Batch',\n 'CAD\\\\TransferBundle\\\\Model\\\\Conn1\\\\Batch',\n RelationMap::MANY_TO_ONE,\n array('batch_id' => 'id',),\n null,\n null\n );\n }",
"public function initialize() {\n\n // Relation to DasUsers\n $this->belongsTo('id', 'Aiden\\Models\\DasUsers', 'users_id', ['alias' => 'DasUsers']);\n\n // Relation to Phrases\n $this->hasMany('id', 'Aiden\\Models\\UsersPhrases', 'users_id', [\"alias\" => \"Phrases\"]);\n\n // Relation to Das\n $this->hasManyToMany('id', 'Aiden\\Models\\DasUsers', 'users_id', 'das_id', 'Aiden\\Models\\Das', 'id', ['alias' => 'Das']);\n\n // Relation to Councils\n $this->hasManyToMany('id', 'Aiden\\Models\\UsersCouncils', 'users_id', 'councils_id', 'Aiden\\Models\\Councils', 'id', ['alias' => 'Councils']);\n\n }",
"public function buildRelations()\n {\n $this->addRelation('Users', 'Users', RelationMap::ONE_TO_MANY, array('r_user_type_id' => 'r_user_type_id', ), null, null, 'Userss');\n }",
"public function buildRelations()\n\t{\n $this->addRelation('CuadreCaja', 'CuadreCaja', RelationMap::MANY_TO_ONE, array('id_cuadre_caja' => 'id_cuadre_caja', ), 'RESTRICT', null);\n $this->addRelation('PersonaRelatedByIdPersona', 'Persona', RelationMap::MANY_TO_ONE, array('id_persona' => 'id_persona', ), 'RESTRICT', null);\n $this->addRelation('PersonaRelatedByIdAutoriza', 'Persona', RelationMap::MANY_TO_ONE, array('id_autoriza' => 'id_persona', ), 'RESTRICT', null);\n\t}",
"public function initialize()\n {\n $this->hasMany('cd', 'ShouhinMrs', 'shu_souko_mr_cd', array('alias' => 'ShouhinMrs'));\n $this->hasMany('cd', 'ShiireMeisaiDts', 'souko_mr_cd', array('alias' => 'ShiireMeisaiDts'));\n $this->hasMany('cd', 'UriageMeisaiDts', 'souko_mr_cd', array('alias' => 'UriageMeisaiDts'));\n $this->belongsTo('tantou_mr_cd', 'TantouMrs', 'cd', array('alias' => 'TantouMrs'));\n }",
"public function buildRelations()\n\t{\n $this->addRelation('Tbnecesespecial', 'Tbnecesespecial', RelationMap::MANY_TO_ONE, array('id_neces_especial' => 'id_neces_especial', ), null, null);\n $this->addRelation('Tbcidade', 'Tbcidade', RelationMap::MANY_TO_ONE, array('naturalidade' => 'id_cidade', ), null, null);\n $this->addRelation('Tbpais', 'Tbpais', RelationMap::MANY_TO_ONE, array('nacionalidade' => 'id_pais', ), null, null);\n $this->addRelation('TblogradouroRelatedByCep', 'Tblogradouro', RelationMap::MANY_TO_ONE, array('cep' => 'cep', ), null, null);\n $this->addRelation('Tbcursoversao', 'Tbcursoversao', RelationMap::MANY_TO_ONE, array('id_versao_curso' => 'id_versao_curso', ), null, null);\n $this->addRelation('Tbtipoingresso', 'Tbtipoingresso', RelationMap::MANY_TO_ONE, array('id_tipo_ingresso' => 'id_tipo_ingresso', ), null, null);\n $this->addRelation('Tbalunosituacao', 'Tbalunosituacao', RelationMap::MANY_TO_ONE, array('id_situacao' => 'id_situacao', ), null, null);\n $this->addRelation('TbinstexternaRelatedByIdDestino', 'Tbinstexterna', RelationMap::MANY_TO_ONE, array('id_destino' => 'id_inst_externa', ), null, null);\n $this->addRelation('TbinstexternaRelatedById2grau', 'Tbinstexterna', RelationMap::MANY_TO_ONE, array('id_2grau' => 'id_inst_externa', ), null, null);\n $this->addRelation('TbinstexternaRelatedById3grau', 'Tbinstexterna', RelationMap::MANY_TO_ONE, array('id_3grau' => 'id_inst_externa', ), null, null);\n $this->addRelation('TbinstexternaRelatedByIdTrabalho', 'Tbinstexterna', RelationMap::MANY_TO_ONE, array('id_trabalho' => 'id_inst_externa', ), null, null);\n $this->addRelation('TblogradouroRelatedByCepTrabalho', 'Tblogradouro', RelationMap::MANY_TO_ONE, array('cep_trabalho' => 'cep', ), null, null);\n $this->addRelation('Tbpolos', 'Tbpolos', RelationMap::MANY_TO_ONE, array('id_polo' => 'id_polo', ), null, null);\n $this->addRelation('Tbalunoracacor', 'Tbalunoracacor', RelationMap::MANY_TO_ONE, array('id_raca' => 'id_raca', ), null, null);\n $this->addRelation('Tbpendencia', 'Tbpendencia', RelationMap::ONE_TO_MANY, array('matricula' => 'matricula', ), null, null);\n $this->addRelation('Tbalunodiploma', 'Tbalunodiploma', RelationMap::ONE_TO_MANY, array('matricula' => 'matricula', ), null, null);\n $this->addRelation('Tbalunosenha', 'Tbalunosenha', RelationMap::ONE_TO_MANY, array('matricula' => 'matricula', ), null, null);\n $this->addRelation('Tbalunosolicitacao', 'Tbalunosolicitacao', RelationMap::ONE_TO_MANY, array('matricula' => 'matricula', ), null, null);\n $this->addRelation('Tbbanca', 'Tbbanca', RelationMap::ONE_TO_MANY, array('matricula' => 'matricula', ), null, null);\n $this->addRelation('Tbfila', 'Tbfila', RelationMap::ONE_TO_MANY, array('matricula' => 'matricula', ), null, null);\n $this->addRelation('Tbhistorico', 'Tbhistorico', RelationMap::ONE_TO_MANY, array('matricula' => 'matricula', ), null, null);\n $this->addRelation('TbturmaAluno', 'TbturmaAluno', RelationMap::ONE_TO_MANY, array('matricula' => 'matricula', ), null, null);\n\t}",
"public function initialize()\n {\n $this->belongsTo(\n 'companies_id',\n Companies::class,\n 'id',\n ['alias' => 'company']\n );\n\n $this->belongsTo(\n 'apps_id',\n Apps::class,\n 'id',\n ['alias' => 'app']\n );\n\n $this->belongsTo(\n 'users_id',\n Users::class,\n 'id',\n ['alias' => 'user']\n );\n\n $this->setSource('users_associated_apps');\n }",
"public function buildRelations()\n {\n $this->addRelation('ArtRequest', 'ArtRequestORM\\\\ArtRequest', RelationMap::ONE_TO_MANY, array('event_id' => 'event_id', ), 'CASCADE', 'CASCADE', 'ArtRequests');\n }",
"public function buildRelations()\n {\n $this->addRelation('Label', '\\\\MediaProperty\\\\Label', RelationMap::MANY_TO_ONE, array('label_id' => 'id', ), null, null);\n $this->addRelation('Album', '\\\\MediaItem\\\\Album', RelationMap::ONE_TO_MANY, array('id' => 'artist_id', ), null, null, 'Albums');\n }",
"public function buildRelations()\n {\n $this->addRelation('EmailManagerTrace', '\\\\TheliaEmailManager\\\\Model\\\\EmailManagerTrace', RelationMap::MANY_TO_ONE, array('trace_id' => 'id', ), 'CASCADE', 'RESTRICT');\n $this->addRelation('EmailManagerHistoryEmail', '\\\\TheliaEmailManager\\\\Model\\\\EmailManagerHistoryEmail', RelationMap::ONE_TO_MANY, array('id' => 'history_id', ), 'CASCADE', 'RESTRICT', 'EmailManagerHistoryEmails');\n }",
"public function initialize()\n {\n $this->belongsTo(\n 'users_id',\n Users::class,\n 'id',\n ['alias' => 'user']\n );\n\n $this->belongsTo(\n 'companies_id',\n Companies::class,\n 'id',\n ['alias' => 'company']\n );\n\n $this->setSource('users_associated_company');\n }",
"public function buildRelations()\n {\n $this->addRelation('RombonganBelajar', 'DataDikdas\\\\Model\\\\RombonganBelajar', RelationMap::MANY_TO_ONE, array('rombongan_belajar_id' => 'rombongan_belajar_id', ), 'RESTRICT', 'RESTRICT');\n $this->addRelation('EkstraKurikuler', 'DataDikdas\\\\Model\\\\EkstraKurikuler', RelationMap::MANY_TO_ONE, array('id_ekskul' => 'id_ekskul', ), 'RESTRICT', 'RESTRICT');\n }",
"private function prepRelations() : self\n {\n\n // Lvd.\n $maxRId = 0;\n $relationships = [];\n\n // Add Sheets.\n foreach ($this->xlsx->getBook()->getSheets() as $sheet) {\n\n $relationships[] = [\n '@Id' => 'rId' . $sheet->getId(),\n '@Type' => $this->types['sheet'],\n '@Target' => 'worksheets/sheet' . $sheet->getId() . '.xml',\n ];\n\n // Count max ID.\n $maxRId = max($maxRId, $sheet->getId());\n }\n\n // Add the rest of relationships.\n $relationships[] = [\n '@Id' => 'rId' . ( ++$maxRId ),\n '@Type' => $this->types['styles'],\n '@Target' => 'styles.xml',\n ];\n $relationships[] = [\n '@Id' => 'rId' . ( ++$maxRId ),\n '@Type' => $this->types['theme'],\n '@Target' => 'theme/theme1.xml',\n ];\n $relationships[] = [\n '@Id' => 'rId' . ( ++$maxRId ),\n '@Type' => $this->types['sharedStrings'],\n '@Target' => 'sharedStrings.xml',\n ];\n\n // Save.\n $this->array['Relationships']['@@']['Relationship'] = $relationships;\n\n return $this;\n }",
"public function buildRelations()\n\t{\n\t\t$this->addRelation('AmistadRelatedById_usuario', 'Amistad', RelationMap::ONE_TO_MANY, array('id' => 'id_usuario', ), null, null, 'AmistadsRelatedById_usuario');\n\t\t$this->addRelation('AmistadRelatedByid_usuarioamigo', 'Amistad', RelationMap::ONE_TO_MANY, array('id' => 'id_usuarioamigo', ), null, null, 'AmistadsRelatedByid_usuarioamigo');\n\t\t$this->addRelation('Calificacion', 'Calificacion', RelationMap::ONE_TO_MANY, array('id' => 'id_usuario', ), null, null, 'Calificacions');\n\t\t$this->addRelation('Comentario', 'Comentario', RelationMap::ONE_TO_MANY, array('id' => 'id_usuario', ), null, null, 'Comentarios');\n\t\t$this->addRelation('LibroRelatedByUsuario_ult_acc', 'Libro', RelationMap::ONE_TO_MANY, array('id' => 'usuario_ult_acc', ), null, null, 'LibrosRelatedByUsuario_ult_acc');\n\t\t$this->addRelation('LibroRelatedById_usuario', 'Libro', RelationMap::ONE_TO_MANY, array('id' => 'id_usuario', ), null, null, 'LibrosRelatedById_usuario');\n\t\t$this->addRelation('Usuario_intereses', 'Usuario_intereses', RelationMap::ONE_TO_MANY, array('id' => 'id_usuario', ), null, null, 'Usuario_interesess');\n\t\t$this->addRelation('Lista', 'Lista', RelationMap::ONE_TO_MANY, array('id' => 'id_usuario', ), null, null, 'Listas');\n\t\t$this->addRelation('Libro_colaborador', 'Libro_colaborador', RelationMap::ONE_TO_MANY, array('id' => 'idusuario', ), null, null, 'Libro_colaboradors');\n\t\t$this->addRelation('Libro_version', 'Libro_version', RelationMap::ONE_TO_MANY, array('id' => 'idusuario', ), null, null, 'Libro_versions');\n\t\t$this->addRelation('MensajeRelatedById_usuario_destinatario', 'Mensaje', RelationMap::ONE_TO_MANY, array('id' => 'id_usuario_destinatario', ), null, null, 'MensajesRelatedById_usuario_destinatario');\n\t\t$this->addRelation('MensajeRelatedById_usuario_remitente', 'Mensaje', RelationMap::ONE_TO_MANY, array('id' => 'id_usuario_remitente', ), null, null, 'MensajesRelatedById_usuario_remitente');\n\t\t$this->addRelation('NotificacionRelatedById_emisor', 'Notificacion', RelationMap::ONE_TO_MANY, array('id' => 'id_emisor', ), null, null, 'NotificacionsRelatedById_emisor');\n\t\t$this->addRelation('NotificacionRelatedById_receptor', 'Notificacion', RelationMap::ONE_TO_MANY, array('id' => 'id_receptor', ), null, null, 'NotificacionsRelatedById_receptor');\n\t\t$this->addRelation('Solicitud_amistadRelatedById_usuario_solicitado', 'Solicitud_amistad', RelationMap::ONE_TO_MANY, array('id' => 'id_usuario_solicitado', ), null, null, 'Solicitud_amistadsRelatedById_usuario_solicitado');\n\t\t$this->addRelation('Solicitud_amistadRelatedById_usuario_solicitante', 'Solicitud_amistad', RelationMap::ONE_TO_MANY, array('id' => 'id_usuario_solicitante', ), null, null, 'Solicitud_amistadsRelatedById_usuario_solicitante');\n\t\t$this->addRelation('Solicitud', 'Solicitud', RelationMap::ONE_TO_MANY, array('id' => 'id_usuario_solicitante', ), null, null, 'Solicituds');\n\t\t$this->addRelation('Postulantes', 'Postulantes', RelationMap::ONE_TO_MANY, array('id' => 'id_postulante', ), null, null, 'Postulantess');\n\t}",
"public function initialize()\n {\n $this->hasMany('id', 'app\\common\\models\\base\\UserProfile', 'user_id', array('alias' => 'UserProfile'));\n $this->hasMany('id', 'app\\common\\models\\base\\UserRoles', 'user_id', array('alias' => 'UserRoles'));\n $this->belongsTo('type_id', 'app\\common\\models\\base\\UserType', 'id', array('alias' => 'UserType'));\n }",
"public function initialize()\n {\n $this->hasMany('id', 'Aulas', 'id_materia', array('alias' => 'Aulas'));\n $this->hasMany('id', 'Aulas', 'id_materia', NULL);\n }",
"public function buildRelations()\n {\n $this->addRelation('Banco', 'Banco', RelationMap::MANY_TO_ONE, array('idbanco' => 'idbanco', ), 'CASCADE', 'CASCADE');\n }",
"public function buildRelations()\n\t{\n $this->addRelation('Aviso', 'Aviso', RelationMap::MANY_TO_ONE, array('aviso_id' => 'id', ), 'RESTRICT', null);\n $this->addRelation('Usuario', 'Usuario', RelationMap::MANY_TO_ONE, array('usuario_id' => 'id', ), 'RESTRICT', null);\n\t}",
"public function initialize()\n {\n $this->belongsTo('torihikisaki_cd', 'TokuisakiMrs', 'cd', array('alias' => 'TorihikisakiMrs'));\n $this->belongsTo('shouhin_mr_cd', 'ShouhinMrs', 'cd', array('alias' => 'ShouhinMrs'));\n $this->belongsTo('tanni_mr1_cd', 'TanniMrs', 'cd', array('alias' => 'TanniMr1s'));\n $this->belongsTo('tanni_mr2_cd', 'TanniMrs', 'cd', array('alias' => 'TanniMr2s'));\n $this->belongsTo('tantou_mr_cd', 'TantouMrs', 'cd', array('alias' => 'TantouMrs'));\n $this->belongsTo('souko_mr_cd', 'SoukoMrs', 'cd', array('alias' => 'SoukoMrs'));\n $this->belongsTo('denpyou_mr_cd', 'DenpyouMrs', 'cd', array('alias' => 'DenpyouMrs'));\n $this->belongsTo('utiwake_kbn_cd', 'UtiwakeKbns', 'cd', array('alias' => 'UtiwakeKbns'));\n $this->belongsTo('hinsitu_kbn_cd', 'HinsituKbns', 'cd', array('alias' => 'HinsituKbns'));\n $this->belongsTo('sakusei_user_id', 'Users', 'id', array('alias' => 'Users'));\n $this->belongsTo('meisai_id', 'UriageMeisaiDts', 'id', array('alias' => 'UriageMeisaiDts'));\n $this->hasMany('shukka_kbn_max', 'UriageShukkaMaxs', 'shouhin_mr_cd', array('alias' => 'UriageShukkaMaxs'));\n }",
"public function initialize()\n {\n \t$this->belongsTo('id_usuario', 'IbcUsuario', 'id_usuario', array(\n \t\t\t'reusable' => true\n \t));\n \t$this->belongsTo('id_periodo', 'CobPeriodo', 'id_periodo', array(\n \t\t\t'reusable' => true\n \t));\n \t$this->belongsTo('id_contrato', 'CobActaconteo', 'id_contrato', array(\n \t\t\t'reusable' => true\n \t));\n \t$this->belongsTo('id_ajuste_reportado', 'CobAjusteReportado', 'id_ajuste_reportado', array(\n \t\t\t'reusable' => true\n \t));\n \t$this->belongsTo('id_actaconteo_persona_facturacion', 'CobActaconteoPersonaFacturacion', 'id_actaconteo_persona_facturacion', array(\n \t\t\t'reusable' => true\n \t));\n }",
"private function _set_relationships()\n {\n if(empty($this->_relationships))\n {\n $options = array('has_one','has_many','has_many_pivot');\n foreach($options as $option)\n {\n if(isset($this->{$option}) && !empty($this->{$option}))\n {\n foreach($this->{$option} as $key => $relation)\n {\n $foreign_model = (is_array($relation)) ? $relation[0] : $relation;\n $foreign_model_name = strtolower($foreign_model);\n $this->load->model($foreign_model_name);\n $foreign_table = $this->{$foreign_model_name}->table;\n if($option=='has_many_pivot')\n {\n $tables = array($this->table, $foreign_table);\n sort($tables);\n $pivot_table = $tables[0].'_'.$tables[1];\n $foreign_key = (is_array($relation)) ? $relation[1] : $this->{$foreign_model_name}->primary;\n $local_key = (is_array($relation) && isset($relation[2])) ? $relation[2] : $this->primary;\n }\n else\n {\n $foreign_key = (is_array($relation)) ? $relation[1] : singular($this->table) . '_id';\n $local_key = (is_array($relation) && isset($relation[2])) ? $relation[2] : $this->primary;\n }\n $this->_relationships[$key] = array('relation' => $option, 'relation_key' => $key, 'foreign_model' => $foreign_model_name, 'foreign_table' => $foreign_table, 'foreign_key' => $foreign_key, 'local_key' => $local_key);\n ($option == 'has_many_pivot') ? ($this->_relationships[$key]['pivot_table'] = $pivot_table) : FALSE;\n\n }\n }\n }\n }\n }",
"public function buildRelations()\n\t{\n $this->addRelation('Tbformacao', 'Tbformacao', RelationMap::MANY_TO_ONE, array('id_formacao' => 'id_formacao', ), null, null);\n $this->addRelation('Tbcurso', 'Tbcurso', RelationMap::MANY_TO_ONE, array('cod_curso' => 'cod_curso', ), null, null);\n $this->addRelation('Tbturno', 'Tbturno', RelationMap::MANY_TO_ONE, array('id_turno' => 'id_turno', ), null, null);\n $this->addRelation('Tbcampus', 'Tbcampus', RelationMap::MANY_TO_ONE, array('id_campus' => 'id_campus', ), null, null);\n $this->addRelation('Tbsetor', 'Tbsetor', RelationMap::MANY_TO_ONE, array('id_setor' => 'id_setor', ), null, null);\n $this->addRelation('Tbalunomatricula', 'Tbalunomatricula', RelationMap::ONE_TO_MANY, array('id_versao_curso' => 'id_versao_curso', ), null, null);\n $this->addRelation('Tbalunobackup', 'Tbalunobackup', RelationMap::ONE_TO_MANY, array('id_versao_curso' => 'id_versao_curso', ), null, null);\n $this->addRelation('Tbfilacalouros', 'Tbfilacalouros', RelationMap::ONE_TO_MANY, array('id_versao_curso' => 'id_versao_curso', ), null, null);\n $this->addRelation('Tbvagas', 'Tbvagas', RelationMap::ONE_TO_MANY, array('id_versao_curso' => 'id_versao_curso', ), null, null);\n $this->addRelation('Tbloadaluno', 'Tbloadaluno', RelationMap::ONE_TO_MANY, array('id_versao_curso' => 'id_versao_curso', ), null, null);\n $this->addRelation('Tbaluno', 'Tbaluno', RelationMap::ONE_TO_MANY, array('id_versao_curso' => 'id_versao_curso', ), null, null);\n $this->addRelation('Tbcurriculodisciplinas', 'Tbcurriculodisciplinas', RelationMap::ONE_TO_MANY, array('id_versao_curso' => 'id_versao_curso', ), null, null);\n $this->addRelation('Tbdisciplinarequisitos', 'Tbdisciplinarequisitos', RelationMap::ONE_TO_MANY, array('id_versao_curso' => 'id_versao_curso', ), null, null);\n $this->addRelation('Tbdisciplinacorequisitos', 'Tbdisciplinacorequisitos', RelationMap::ONE_TO_MANY, array('id_versao_curso' => 'id_versao_curso', ), null, null);\n $this->addRelation('Tbcoordenadorcurso', 'Tbcoordenadorcurso', RelationMap::ONE_TO_MANY, array('id_versao_curso' => 'id_versao_curso', ), null, null);\n\t}",
"public function buildRelations()\n {\n $this->addRelation('Year', 'AppBundle\\\\Model\\\\Year', RelationMap::MANY_TO_ONE, array('year_id' => 'id', ), 'CASCADE', null);\n $this->addRelation('SubFileCat', 'AppBundle\\\\Model\\\\FileCat', RelationMap::MANY_TO_ONE, array('sub_file_cat_id' => 'id', ), null, null);\n $this->addRelation('FileCat', 'AppBundle\\\\Model\\\\FileCat', RelationMap::ONE_TO_MANY, array('id' => 'sub_file_cat_id', ), null, null, 'FileCats');\n $this->addRelation('File', 'AppBundle\\\\Model\\\\File', RelationMap::ONE_TO_MANY, array('id' => 'file_cat_id', ), 'CASCADE', null, 'Files');\n $this->addRelation('DocCat', 'AppBundle\\\\Model\\\\DocCat', RelationMap::ONE_TO_MANY, array('id' => 'file_cat_id', ), null, null, 'DocCats');\n $this->addRelation('AccountRelatedByFileCatLev1Id', 'AppBundle\\\\Model\\\\Account', RelationMap::ONE_TO_MANY, array('id' => 'file_cat_lev1_id', ), null, null, 'AccountsRelatedByFileCatLev1Id');\n $this->addRelation('AccountRelatedByFileCatLev2Id', 'AppBundle\\\\Model\\\\Account', RelationMap::ONE_TO_MANY, array('id' => 'file_cat_lev2_id', ), null, null, 'AccountsRelatedByFileCatLev2Id');\n $this->addRelation('AccountRelatedByFileCatLev3Id', 'AppBundle\\\\Model\\\\Account', RelationMap::ONE_TO_MANY, array('id' => 'file_cat_lev3_id', ), null, null, 'AccountsRelatedByFileCatLev3Id');\n $this->addRelation('Project', 'AppBundle\\\\Model\\\\Project', RelationMap::ONE_TO_MANY, array('id' => 'file_cat_id', ), null, null, 'Projects');\n }",
"public function initialize()\n {\n $this->hasMany('id_niveldinst', 'Cargaestudiantes', 'id_niveldinst', array('alias' => 'Cargaestudiantes'));\n $this->hasMany('id_niveldinst', 'Datosprofesiona', 'nive_instr', array('alias' => 'Datosprofesiona'));\n $this->hasMany('id_niveldinst', 'Cargaestudiantes', 'id_niveldinst', NULL);\n $this->hasMany('id_niveldinst', 'Datosprofesiona', 'nive_instr', NULL);\n }",
"public function buildRelations()\n {\n $this->addRelation('CiOptionsRelatedByIdOptionTipoAsociado', '\\\\CiOptions', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':id_option_tipo_asociado',\n 1 => ':id_option',\n ),\n), null, null, null, false);\n $this->addRelation('CiOptionsRelatedByIdOptionNivelAsociado', '\\\\CiOptions', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':id_option_nivel_asociado',\n 1 => ':id_option',\n ),\n), null, null, null, false);\n $this->addRelation('CiUsuariosRelatedByInvitadoPor', '\\\\CiUsuarios', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':invitado_por',\n 1 => ':id_usuario',\n ),\n), null, null, null, false);\n $this->addRelation('CiOptionsRelatedByIdOpcionRole', '\\\\CiOptions', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':id_opcion_role',\n 1 => ':id_option',\n ),\n), null, null, null, false);\n $this->addRelation('HbfTurnosRelatedByIdTurno', '\\\\HbfTurnos', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':id_turno',\n 1 => ':id_turno',\n ),\n), null, null, null, false);\n $this->addRelation('HbfSesionesRelatedByIdSesion', '\\\\HbfSesiones', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':id_sesion',\n 1 => ':id_sesion',\n ),\n), null, null, null, false);\n $this->addRelation('CiOptionsRelatedByIdTipoUsuario', '\\\\CiOptions', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':id_tipo_usuario',\n 1 => ':id_option',\n ),\n), null, null, null, false);\n $this->addRelation('HbfClubsRelatedByIdClub', '\\\\HbfClubs', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':id_club',\n 1 => ':id_club',\n ),\n), null, null, null, false);\n $this->addRelation('CiModulosRelatedByIdUserCreated', '\\\\CiModulos', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_created',\n 1 => ':id_usuario',\n ),\n), null, null, 'CiModulossRelatedByIdUserCreated', false);\n $this->addRelation('CiModulosRelatedByIdUserModified', '\\\\CiModulos', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_modified',\n 1 => ':id_usuario',\n ),\n), null, null, 'CiModulossRelatedByIdUserModified', false);\n $this->addRelation('CiOptionsRelatedByIdUserCreated', '\\\\CiOptions', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_created',\n 1 => ':id_usuario',\n ),\n), null, null, 'CiOptionssRelatedByIdUserCreated', false);\n $this->addRelation('CiOptionsRelatedByIdUserModified', '\\\\CiOptions', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_modified',\n 1 => ':id_usuario',\n ),\n), null, null, 'CiOptionssRelatedByIdUserModified', false);\n $this->addRelation('CiSessions', '\\\\CiSessions', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_usuario',\n 1 => ':id_usuario',\n ),\n), null, null, 'CiSessionss', false);\n $this->addRelation('CiSettingsRelatedByIdUserCreated', '\\\\CiSettings', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_created',\n 1 => ':id_usuario',\n ),\n), null, null, 'CiSettingssRelatedByIdUserCreated', false);\n $this->addRelation('CiSettingsRelatedByIdUserModified', '\\\\CiSettings', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_modified',\n 1 => ':id_usuario',\n ),\n), null, null, 'CiSettingssRelatedByIdUserModified', false);\n $this->addRelation('CiUsuariosRelatedByIdUsuario', '\\\\CiUsuarios', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':invitado_por',\n 1 => ':id_usuario',\n ),\n), null, null, 'CiUsuariossRelatedByIdUsuario', false);\n $this->addRelation('HbfClubsRelatedByIdUserCreated', '\\\\HbfClubs', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_created',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfClubssRelatedByIdUserCreated', false);\n $this->addRelation('HbfClubsRelatedByIdUserModified', '\\\\HbfClubs', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_modified',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfClubssRelatedByIdUserModified', false);\n $this->addRelation('HbfComandasRelatedByIdUserCreated', '\\\\HbfComandas', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_created',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfComandassRelatedByIdUserCreated', false);\n $this->addRelation('HbfComandasRelatedByIdUserModified', '\\\\HbfComandas', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_modified',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfComandassRelatedByIdUserModified', false);\n $this->addRelation('HbfComandasRelatedByIdCliente', '\\\\HbfComandas', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_cliente',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfComandassRelatedByIdCliente', false);\n $this->addRelation('HbfDetallesPedidosRelatedByIdUserCreated', '\\\\HbfDetallesPedidos', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_created',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfDetallesPedidossRelatedByIdUserCreated', false);\n $this->addRelation('HbfDetallesPedidosRelatedByIdUserModified', '\\\\HbfDetallesPedidos', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_modified',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfDetallesPedidossRelatedByIdUserModified', false);\n $this->addRelation('HbfEgresosRelatedByIdUserCreated', '\\\\HbfEgresos', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_created',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfEgresossRelatedByIdUserCreated', false);\n $this->addRelation('HbfEgresosRelatedByIdUserModified', '\\\\HbfEgresos', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_modified',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfEgresossRelatedByIdUserModified', false);\n $this->addRelation('HbfEgresosRelatedByIdCliente', '\\\\HbfEgresos', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_cliente',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfEgresossRelatedByIdCliente', false);\n $this->addRelation('HbfIngresosRelatedByIdUserCreated', '\\\\HbfIngresos', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_created',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfIngresossRelatedByIdUserCreated', false);\n $this->addRelation('HbfIngresosRelatedByIdUserModified', '\\\\HbfIngresos', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_modified',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfIngresossRelatedByIdUserModified', false);\n $this->addRelation('HbfIngresosRelatedByIdCliente', '\\\\HbfIngresos', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_cliente',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfIngresossRelatedByIdCliente', false);\n $this->addRelation('HbfPorcionesRelatedByIdUserCreated', '\\\\HbfPorciones', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_created',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfPorcionessRelatedByIdUserCreated', false);\n $this->addRelation('HbfPorcionesRelatedByIdUserModified', '\\\\HbfPorciones', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_modified',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfPorcionessRelatedByIdUserModified', false);\n $this->addRelation('HbfPrepagosRelatedByIdCliente', '\\\\HbfPrepagos', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_cliente',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfPrepagossRelatedByIdCliente', false);\n $this->addRelation('HbfPrepagosRelatedByIdUserCreated', '\\\\HbfPrepagos', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_created',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfPrepagossRelatedByIdUserCreated', false);\n $this->addRelation('HbfPrepagosRelatedByIdUserModified', '\\\\HbfPrepagos', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_modified',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfPrepagossRelatedByIdUserModified', false);\n $this->addRelation('HbfProductosRelatedByIdUserCreated', '\\\\HbfProductos', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_created',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfProductossRelatedByIdUserCreated', false);\n $this->addRelation('HbfProductosRelatedByIdUserModified', '\\\\HbfProductos', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_modified',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfProductossRelatedByIdUserModified', false);\n $this->addRelation('HbfSesionesRelatedByIdUserCreated', '\\\\HbfSesiones', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_created',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfSesionessRelatedByIdUserCreated', false);\n $this->addRelation('HbfSesionesRelatedByIdUserModified', '\\\\HbfSesiones', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_modified',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfSesionessRelatedByIdUserModified', false);\n $this->addRelation('HbfSesionesRelatedByIdAsociado', '\\\\HbfSesiones', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_asociado',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfSesionessRelatedByIdAsociado', false);\n $this->addRelation('HbfTurnosRelatedByIdUserCreated', '\\\\HbfTurnos', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_created',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfTurnossRelatedByIdUserCreated', false);\n $this->addRelation('HbfTurnosRelatedByIdUserModified', '\\\\HbfTurnos', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_modified',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfTurnossRelatedByIdUserModified', false);\n $this->addRelation('HbfTurnosRelatedByIdAsociado', '\\\\HbfTurnos', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_asociado',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfTurnossRelatedByIdAsociado', false);\n $this->addRelation('HbfVasosRelatedByIdUserModified', '\\\\HbfVasos', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_modified',\n 1 => ':id_usuario',\n ),\n), 'CASCADE', 'CASCADE', 'HbfVasossRelatedByIdUserModified', false);\n $this->addRelation('HbfVasosRelatedByIdUserCreated', '\\\\HbfVasos', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_created',\n 1 => ':id_usuario',\n ),\n), 'CASCADE', 'CASCADE', 'HbfVasossRelatedByIdUserCreated', false);\n $this->addRelation('HbfVentasRelatedByIdUserCreated', '\\\\HbfVentas', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_created',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfVentassRelatedByIdUserCreated', false);\n $this->addRelation('HbfVentasRelatedByIdUserModified', '\\\\HbfVentas', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_modified',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfVentassRelatedByIdUserModified', false);\n $this->addRelation('HbfVentasRelatedByIdCliente', '\\\\HbfVentas', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_cliente',\n 1 => ':id_usuario',\n ),\n), null, null, 'HbfVentassRelatedByIdCliente', false);\n }",
"public function initialize()\n {\n $this->setSchema(\"\");\n $this->hasMany(\n 'id',\n 'App\\Models\\Flats',\n 'house_id',\n array('alias' => 'Flats', \"reusable\" => true)\n );\n\n $this->belongsTo(\n \"street_id\",\n \"App\\Models\\Streets\",\n \"id\",\n array(\"alias\" => \"Streets\", \"reusable\" => true)\n );\n }",
"public function initialize()\n {\n $this->belongsTo('id_actaconteo_persona', 'CobActaconteoPersonaExcusa', 'id_actaconteo_persona', array(\n 'reusable' => true\n ));\n $this->belongsTo('id_actaconteo_persona', 'CobActaconteoPersonaFacturacion', 'id_actaconteo_persona', array(\n 'reusable' => true\n ));\n $this->belongsTo('id_actaconteo', 'CobActaconteo', 'id_actaconteo', array(\n 'reusable' => true\n ));\n }",
"public function buildRelations()\n {\n $this->addRelation('Pregunta', '\\\\Pregunta', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':preg_t_pregunta',\n 1 => ':tpre_tipo',\n ),\n), null, 'CASCADE', 'Preguntas', false);\n }",
"public function buildRelations()\n {\n $this->addRelation('Contrarecibo', 'Contrarecibo', RelationMap::MANY_TO_ONE, array('idcontrarecibo' => 'idcontrarecibo', ), 'CASCADE', 'CASCADE');\n }",
"public function initialize() {\n\n $this->belongsTo(\"users_id\", \"Aiden\\Models\\Users\", \"id\", [\"alias\" => \"User\"]);\n $this->belongsTo(\"councils_id\", \"Aiden\\Models\\Councils\", \"id\", [\"alias\" => \"Council\"]);\n\n }",
"public function buildRelations()\n {\n $this->addRelation('Photo', 'wiosloCMS\\\\PhotoBundle\\\\Model\\\\Photo', RelationMap::MANY_TO_ONE, array('photo_id' => 'id', ), 'CASCADE', 'CASCADE');\n $this->addRelation('UserRate', 'wiosloCMS\\\\PhotoBundle\\\\Model\\\\UserRate', RelationMap::ONE_TO_MANY, array('photo_id' => 'photo_id', ), 'CASCADE', 'CASCADE', 'UserRates');\n $this->addRelation('User', 'wiosloCMS\\\\UserBundle\\\\Model\\\\User', RelationMap::MANY_TO_MANY, array(), 'CASCADE', 'CASCADE', 'Users');\n }",
"public function buildRelations()\n {\n $this->addRelation('RemoteApp', 'Slashworks\\\\AppBundle\\\\Model\\\\RemoteApp', RelationMap::MANY_TO_ONE, array('remote_app_id' => 'id', ), 'CASCADE', 'CASCADE');\n }",
"public function initialize()\n {\n $this->belongsTo('kousin_user_id', 'Users', 'id', array('alias' => 'Users'));\n $this->belongsTo('tanni_mr1_cd', 'TanniMrs', 'cd', array('alias' => 'TanniMr1s'));\n $this->belongsTo('tanni_mr2_cd', 'TanniMrs', 'cd', array('alias' => 'TanniMr2s'));\n $this->belongsTo('utiwake_kbn_cd', 'UtiwakeKbns', 'cd', array('alias' => 'UtiwakeKbns'));\n $this->belongsTo('denpyou_mr_cd', 'DenpyouMrs', 'cd', array('alias' => 'DenpyouMrs'));\n $this->belongsTo('tantou_mr_cd', 'TantouMrs', 'cd', array('alias' => 'TantouMrs'));\n $this->belongsTo('hinsitu_kbn_cd', 'HinsituKbns', 'cd', array('alias' => 'HinsituKbns'));\n $this->belongsTo('souko_mr_cd', 'SoukoMrs', 'cd', array('alias' => 'SoukoMrs'));\n\n //納入先、気付先を取得するため。 Add By Nishiyama 2019/2/14\n $this->belongsTo('denpyou_mr_cd','UriageDts','cd',array('alias' => 'UriageDts'));\n }",
"public function initialize()\n {\n parent::initialize();\n $this->belongsTo('users_id', Users::class, 'id', array('alias' => 'users'));\n $this->belongsTo('companies_id', Companies::class, 'id', array('alias' => 'company'));\n }",
"public function initialize()\n {\n $this->hasMany(\"id\", \"Hotelsfacility\", \"hotel_id\");\n $this->hasMany(\"id\", \"HotelRoom\", \"hotel_id\");\n $this->belongsTo(\"city_id\", \"City\", \"id\");\n $this->belongsTo(\"province_id\", \"Province\", \"id\");\n $this->belongsTo(\"country_id\", \"Country\", \"id\");\n\n }",
"public function buildRelations()\n {\n $this->addRelation('Usuario', 'Usuario', RelationMap::ONE_TO_MANY, array('id' => 'plan_id', ), null, null, 'Usuarios');\n }",
"public function initialize()\n {\n $this->hasMany('informacion_id', 'Informacionadicional', 'informacion_id', array('alias' => 'Informacionadicional'));\n $this->belongsTo('informacion_adicionalId', 'Adicional', 'adicional_id', array('alias' => 'Adicional'));\n }",
"public function initialize()\n {\n $this->belongsTo('id_categoria_gastos', 'CategoriaGastos', 'id_categoria_gastos', array('alias' => 'CategoriaGastos'));\n $this->belongsTo('id_presupuesto', 'Presupuesto', 'id_presupuesto', array('alias' => 'Presupuesto'));\n }",
"public function initialize()\n {\n //$this->setSchema(\"service_services\");\n $this->setSource(\"favoriteUsers\");\n $this->belongsTo('userobject', '\\Users', 'userid', ['alias' => 'Users']);\n $this->belongsTo('usersubject', '\\Users', 'userid', ['alias' => 'Users']);\n }",
"public function initialize()\n {\n $this->belongsTo('cons_order_id', '\\Orders', 'id', array('alias' => 'Orders'));\n $this->belongsTo('order_id', '\\Orders', 'id', array('alias' => 'Orders'));\n }",
"public function buildRelations()\n\t{\n $this->addRelation('BatchJob', 'BatchJob', RelationMap::MANY_TO_ONE, array('batch_job_id' => 'id', ), null, null);\n $this->addRelation('BatchJob', 'BatchJob', RelationMap::ONE_TO_MANY, array('id' => 'batch_job_lock_id', ), null, null);\n\t}",
"public static function init()\n {\n if (self::$_map != null) {\n return;\n }\n\n self::$_map = [\n self::CONTACT => [\n 'tableName' => \\app\\models\\Contact::tableName(),\n 'label' => 'contact'\n ],\n self::ADDRESS => [\n 'tableName' => \\app\\models\\Address::tableName(),\n 'label' => 'address'\n ],\n self::BANK_ACCOUNT => [\n 'tableName' => \\app\\models\\BankAccount::tableName(),\n 'label' => 'bank account',\n 'viewRoute' => 'bank-account/view'\n ],\n self::ATTACHMENT => [\n 'tableName' => \\app\\models\\Attachment::tableName(),\n 'label' => 'attachment'\n ],\n self::CATEGORY => [\n 'tableName' => \\app\\models\\Category::tableName(),\n 'label' => 'category'\n ],\n self::ORDER => [\n 'tableName' => \\app\\models\\Order::tableName(),\n 'label' => 'order'\n ],\n self::PRODUCT => [\n 'tableName' => \\app\\models\\Product::tableName(),\n 'label' => 'product'\n ],\n self::TRANSACTION => [\n 'tableName' => \\app\\models\\Transaction::tableName(),\n 'label' => 'transaction'\n ],\n self::TRANSACTION_PACK => [\n 'tableName' => \\app\\models\\TransactionPack::tableName(),\n 'label' => 'transaction pack',\n 'viewRoute' => 'transaction-pack/view'\n ],\n self::CONTACT_RELATION => [\n 'tableName' => \\app\\models\\ContactRelation::tableName(),\n 'label' => 'contact relation',\n 'viewRoute' => 'contact-relation/view'\n ],\n self::TAG => [\n 'tableName' => \\app\\models\\Tag::tableName(),\n 'label' => 'tag',\n 'viewRoute' => 'tag/view'\n ],\n ];\n }",
"public function initialize()\n {\n $this->hasMany('idmov', 'App\\Models\\MovEstoque', 'movimentacao_manual_estoque_idmov', array('alias' => 'MovEstoque'));\n $this->hasMany('idmov', 'App\\Models\\MovimentacaoManualEstoqueItem', 'idmov', array('alias' => 'MovimentacaoManualEstoqueItem'));\n $this->belongsTo('cd_ordem_servico_reparo', 'App\\Models\\OrdemServicoReparo', 'cd_ordem_servico', array('alias' => 'OrdemServicoReparo'));\n $this->belongsTo('cd_unidade', 'App\\Models\\UnidadeNegocio', 'cd_unidade', array('alias' => 'UnidadeNegocio'));\n $this->belongsTo('requerente', 'App\\Models\\Empresa', 'cd_empresa', array('alias' => 'Empresa'));\n $this->belongsTo('usuario_responsavel', 'App\\Models\\Usuario', 'cd_usuario', array('alias' => 'Usuario'));\n }",
"public function initialize()\n {\n $this->hasMany('id', 'Message', 'idFil', array('alias' => 'Message'));\n $this->belongsTo('idFil', 'Message', 'id', array('alias' => 'Message'));\n $this->belongsTo('idProjet', 'Projet', 'id', array('alias' => 'Projet'));\n $this->belongsTo('idUser', 'User', 'id', array('alias' => 'User'));\n }",
"protected static function _relations() {\n\n\t}",
"public function initialize()\n {\n $this->hasMany(\"province_id\", \"Phoenix\\Models\\Area\", \"province_id\");\n $this->hasMany(\"province_id\", \"Phoenix\\Models\\Academy\", \"province_id\");\n $this->hasMany(\"province_id\", \"Phoenix\\Models\\Members\", \"province_id\");\n }",
"public function initialize()\n {\n $this->setSchema(\"mydb\");\n $this->setSource(\"paying\");\n $this->belongsTo('cid', 'Customers', 'cid', array('alias' => 'alias_customers'));\n $this->belongsTo('loanid', 'LoanInformation', 'loanid', array('alias' => 'alias_loan'));\n $this->hasManyToMany(\n 'payingid',\n 'Tracking',\n 'payingid', 'oid',\n 'DeptTrackers',\n 'oid',\n array(\n 'alias' => 'alias_depttrackers'\n )\n );\n }",
"public function buildRelations()\n {\n $this->addRelation('Ruang', 'DataDikdas\\\\Model\\\\Ruang', RelationMap::MANY_TO_ONE, array('id_ruang' => 'id_ruang', ), 'RESTRICT', 'RESTRICT');\n $this->addRelation('SekolahLongitudinal', 'DataDikdas\\\\Model\\\\SekolahLongitudinal', RelationMap::MANY_TO_ONE, array('sekolah_id' => 'sekolah_id', 'semester_id' => 'semester_id', ), 'RESTRICT', 'RESTRICT');\n $this->addRelation('PembelajaranRelatedByBelKe01', 'DataDikdas\\\\Model\\\\Pembelajaran', RelationMap::MANY_TO_ONE, array('bel_ke_01' => 'pembelajaran_id', ), 'RESTRICT', 'RESTRICT');\n $this->addRelation('PembelajaranRelatedByBelKe02', 'DataDikdas\\\\Model\\\\Pembelajaran', RelationMap::MANY_TO_ONE, array('bel_ke_02' => 'pembelajaran_id', ), 'RESTRICT', 'RESTRICT');\n $this->addRelation('PembelajaranRelatedByBelKe03', 'DataDikdas\\\\Model\\\\Pembelajaran', RelationMap::MANY_TO_ONE, array('bel_ke_03' => 'pembelajaran_id', ), 'RESTRICT', 'RESTRICT');\n $this->addRelation('PembelajaranRelatedByBelKe04', 'DataDikdas\\\\Model\\\\Pembelajaran', RelationMap::MANY_TO_ONE, array('bel_ke_04' => 'pembelajaran_id', ), 'RESTRICT', 'RESTRICT');\n $this->addRelation('PembelajaranRelatedByBelKe05', 'DataDikdas\\\\Model\\\\Pembelajaran', RelationMap::MANY_TO_ONE, array('bel_ke_05' => 'pembelajaran_id', ), 'RESTRICT', 'RESTRICT');\n $this->addRelation('PembelajaranRelatedByBelKe06', 'DataDikdas\\\\Model\\\\Pembelajaran', RelationMap::MANY_TO_ONE, array('bel_ke_06' => 'pembelajaran_id', ), 'RESTRICT', 'RESTRICT');\n $this->addRelation('PembelajaranRelatedByBelKe07', 'DataDikdas\\\\Model\\\\Pembelajaran', RelationMap::MANY_TO_ONE, array('bel_ke_07' => 'pembelajaran_id', ), 'RESTRICT', 'RESTRICT');\n $this->addRelation('PembelajaranRelatedByBelKe08', 'DataDikdas\\\\Model\\\\Pembelajaran', RelationMap::MANY_TO_ONE, array('bel_ke_08' => 'pembelajaran_id', ), 'RESTRICT', 'RESTRICT');\n $this->addRelation('PembelajaranRelatedByBelKe09', 'DataDikdas\\\\Model\\\\Pembelajaran', RelationMap::MANY_TO_ONE, array('bel_ke_09' => 'pembelajaran_id', ), 'RESTRICT', 'RESTRICT');\n $this->addRelation('PembelajaranRelatedByBelKe10', 'DataDikdas\\\\Model\\\\Pembelajaran', RelationMap::MANY_TO_ONE, array('bel_ke_10' => 'pembelajaran_id', ), 'RESTRICT', 'RESTRICT');\n $this->addRelation('PembelajaranRelatedByBelKe11', 'DataDikdas\\\\Model\\\\Pembelajaran', RelationMap::MANY_TO_ONE, array('bel_ke_11' => 'pembelajaran_id', ), 'RESTRICT', 'RESTRICT');\n $this->addRelation('PembelajaranRelatedByBelKe12', 'DataDikdas\\\\Model\\\\Pembelajaran', RelationMap::MANY_TO_ONE, array('bel_ke_12' => 'pembelajaran_id', ), 'RESTRICT', 'RESTRICT');\n $this->addRelation('PembelajaranRelatedByBelKe13', 'DataDikdas\\\\Model\\\\Pembelajaran', RelationMap::MANY_TO_ONE, array('bel_ke_13' => 'pembelajaran_id', ), 'RESTRICT', 'RESTRICT');\n $this->addRelation('PembelajaranRelatedByBelKe14', 'DataDikdas\\\\Model\\\\Pembelajaran', RelationMap::MANY_TO_ONE, array('bel_ke_14' => 'pembelajaran_id', ), 'RESTRICT', 'RESTRICT');\n $this->addRelation('PembelajaranRelatedByBelKe15', 'DataDikdas\\\\Model\\\\Pembelajaran', RelationMap::MANY_TO_ONE, array('bel_ke_15' => 'pembelajaran_id', ), 'RESTRICT', 'RESTRICT');\n $this->addRelation('PembelajaranRelatedByBelKe16', 'DataDikdas\\\\Model\\\\Pembelajaran', RelationMap::MANY_TO_ONE, array('bel_ke_16' => 'pembelajaran_id', ), 'RESTRICT', 'RESTRICT');\n $this->addRelation('PembelajaranRelatedByBelKe17', 'DataDikdas\\\\Model\\\\Pembelajaran', RelationMap::MANY_TO_ONE, array('bel_ke_17' => 'pembelajaran_id', ), 'RESTRICT', 'RESTRICT');\n $this->addRelation('PembelajaranRelatedByBelKe18', 'DataDikdas\\\\Model\\\\Pembelajaran', RelationMap::MANY_TO_ONE, array('bel_ke_18' => 'pembelajaran_id', ), 'RESTRICT', 'RESTRICT');\n $this->addRelation('PembelajaranRelatedByBelKe19', 'DataDikdas\\\\Model\\\\Pembelajaran', RelationMap::MANY_TO_ONE, array('bel_ke_19' => 'pembelajaran_id', ), 'RESTRICT', 'RESTRICT');\n $this->addRelation('PembelajaranRelatedByBelKe20', 'DataDikdas\\\\Model\\\\Pembelajaran', RelationMap::MANY_TO_ONE, array('bel_ke_20' => 'pembelajaran_id', ), 'RESTRICT', 'RESTRICT');\n }",
"public function initialize()\n {\n $this->hasMany(\"id\", \"Modules\\Models\\Orders\", \"member_id\", array(\n 'alias' => 'orders'\n ));\n }",
"private function setupMapping()\n {\n $this->mapping = array();\n $fields = array();\n\n $aliases = array_keys($this->getJoinSettings());\n\n foreach ($aliases as $i => $alias) {\n $fields = array_merge($fields, $this->mapAlias($alias));\n }\n\n $this->mapping['fields'] = array_replace_recursive($fields, $this->getCustomMapping());\n $this->mapping['joins'] = $this->getJoinSettings();\n }",
"public function initialize()\n {\n $this->setSource('tblEntry');\n\n $this->hasOne('userId', '\\Soul\\Model\\User', 'userId', ['alias' => 'user']);\n $this->belongsTo('eventId', '\\Soul\\Model\\Event', 'eventId', ['alias' => 'event']);\n $this->hasOne('paymentId', '\\Soul\\Model\\Payment', 'paymentId', ['alias' => 'payment']);\n }",
"public function initialize()\n {\n $this->hasMany('id', 'GroupProfile', 'media_id', array('alias' => 'GroupProfile'));\n $this->belongsTo('profile_id', 'Profile', 'id', array('alias' => 'Profile'));\n $this->belongsTo('evenement_id', 'Event', 'id', array('alias' => 'Event'));\n }",
"public function initialize()\r\n {\r\n $this->belongsTo('encuesta_personalId', 'Personal', 'personal_id', array('alias' => 'Personal'));\r\n $this->belongsTo('encuesta_alojamientoId', 'Alojamiento', 'alojamiento_id', array('alias' => 'Alojamiento'));\r\n $this->belongsTo('encuesta_recepcionId', 'Recepcion', 'recepcion_id', array('alias' => 'Recepcion'));\r\n $this->belongsTo('encuesta_unidadId', 'Unidad', 'unidad_id', array('alias' => 'Unidad'));\r\n $this->belongsTo('encuesta_adicionalId', 'Adicional', 'adicional_id', array('alias' => 'Adicional'));\r\n $this->belongsTo('encuesta_sorteoId', 'Sorteo', 'sorteo_id', array('alias' => 'Sorteo'));\r\n }",
"public function initialize()\n {\n $this->setSchema(\"realworlddb\");\n $this->belongsTo('followerId', User::class, 'id', ['alias' => 'User']);\n $this->belongsTo('followedId', User::class, 'id', ['alias' => 'User']);\n }",
"public function initialize()\n {\n $this->hasMany('id_tipobeneficio', 'Documentosbeneficios', 'id_tipobeneficio', array('alias' => 'Documentosbeneficios'));\n $this->hasMany('id_tipobeneficio', 'Documentosbeneficios', 'id_tipobeneficio', NULL);\n }",
"public function initialize()\n {\n $this->hasMany(\n 'id',\n AuditDetail::class,\n 'audit_id',\n [\n 'alias' => 'details',\n ]\n );\n }",
"public function initialize()\n {\n $this->belongsTo('nu_cedula', 'Datospersonales', 'nu_cedula', array('alias' => 'Datospersonales'));\n $this->belongsTo('nu_cedula', 'Datospersonales', 'nu_cedula', array('foreignKey' => true));\n }",
"public function initialize()\n {\n /*$this->hasOne('id', 'Broadcasters', 'id', NULL);\n $this->hasOne('id', 'Clients', 'id', NULL);\n $this->hasMany('id', 'Credits', 'user_id', NULL);*/\n }",
"public function initialize()\n {\n $this->hasMany('groep_id', 'Gebruikers', 'groep_id', array('alias' => 'Gebruikers'));\n $this->hasMany('groep_id', 'Groep_permissies', 'groep_id', array('alias' => 'Groep_permissies'));\n }"
] | [
"0.73681265",
"0.72307146",
"0.7225127",
"0.7160457",
"0.7108614",
"0.70908445",
"0.70744073",
"0.7071587",
"0.7071587",
"0.7071587",
"0.7071587",
"0.7071587",
"0.7071587",
"0.7071587",
"0.7071587",
"0.7071587",
"0.70415735",
"0.7030082",
"0.6997258",
"0.6991801",
"0.6983611",
"0.69822973",
"0.69822973",
"0.69822973",
"0.69822973",
"0.69822973",
"0.69822973",
"0.69822973",
"0.69822973",
"0.6955736",
"0.69218236",
"0.69024307",
"0.68791217",
"0.6861222",
"0.68543863",
"0.6848087",
"0.68455887",
"0.68406785",
"0.6821734",
"0.68049943",
"0.6735809",
"0.6725497",
"0.67212355",
"0.6705519",
"0.670189",
"0.6691827",
"0.66850317",
"0.66530937",
"0.6622937",
"0.661444",
"0.66046154",
"0.65848064",
"0.6567561",
"0.6567417",
"0.6566818",
"0.65583783",
"0.65540457",
"0.6548795",
"0.6545848",
"0.6542667",
"0.65237",
"0.65193826",
"0.65092593",
"0.6494462",
"0.6485828",
"0.6450528",
"0.6442824",
"0.64415026",
"0.644001",
"0.64276093",
"0.6420142",
"0.64131796",
"0.64124775",
"0.63856524",
"0.63853866",
"0.63821185",
"0.63748276",
"0.63738257",
"0.63634837",
"0.63534695",
"0.6330813",
"0.63305557",
"0.6327777",
"0.6300928",
"0.629912",
"0.62906593",
"0.62824017",
"0.6282383",
"0.62807393",
"0.62783545",
"0.62667024",
"0.6261173",
"0.62541103",
"0.62399846",
"0.6238927",
"0.62292826",
"0.6224388",
"0.62173814",
"0.62002546",
"0.6188554"
] | 0.6473727 | 65 |
Handle an incoming request. | public function handle($request, Closure $next)
{
if(DB::table('apartment_sponsorship') -> count() > 0){
foreach (DB::table('apartment_sponsorship') -> get() as $value) {
$apartment = Apartment::findOrFail($value -> apartment_id);
$sponsorship = Sponsorship::findOrFail($value -> sponsorship_id);
$date = Carbon::now();
switch ($sponsorship -> hours) {
case 24:
if($date -> diffInHours($value -> creation_date) > 24)
DB::table('apartment_sponsorship')
-> where('id', $value -> id)
-> update(['expired' => true]);
break;
case 72:
if($date -> diffInMinutes($value -> creation_date) > 5)
DB::table('apartment_sponsorship')
-> where('id', $value -> id)
-> update(['expired' => true]);
break;
case 144:
if($date -> diffInHours($value -> creation_date) > 144)
DB::table('apartment_sponsorship')
-> where('id', $value -> id)
-> update(['expired' => true]);
break;
}
}
}
return $next($request);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract public function handle_request();",
"public function handleRequest();",
"public function handleRequest();",
"public function handleRequest();",
"protected abstract function handleRequest();",
"abstract public function handleRequest($request);",
"abstract public function handleRequest(Request $request);",
"public function handle($request);",
"public function handleRequest() {}",
"function handleRequest() ;",
"public function handle(Request $request);",
"protected function handle(Request $request) {}",
"public function handle(array $request);",
"public function process_request() {\n if(!empty($this->POST)) {\n return $this->handlePOST();\n } else {\n return $this->handleGET();\n }\n }",
"public function handleRequest() {\n // Make sure the action parameter exists\n $this->requireParam('action');\n\n // Call the correct handler based on the action\n switch($this->requestBody['action']) {\n\n case 'checkoutLocker':\n $this->handleCheckoutLocker();\n\t\t\t\tbreak;\n\n\t\t\tcase 'remindLocker':\n $this->handleRemindLocker();\n\t\t\t\tbreak;\n\n\t\t\tcase 'returnLocker':\n $this->handleReturnLocker();\n\t\t\t\tbreak;\n\n default:\n $this->respond(new Response(Response::BAD_REQUEST, 'Invalid action on Locker resource'));\n }\n }",
"abstract protected function process(Request $request);",
"public function handleRequest($request)\n {\n list ($route, $params) = $request->resolve();\n $this->requestedRoute = $route;\n $result = $this->runAction($route, $params);\n\n if ($result instanceof Response) {\n return $result;\n } elseif ($result instanceof Looper){\n $result->loop();\n\n $response = $this->getResponse();\n $response->exitStatus = 0;\n\n return $response;\n } else {\n $response = $this->getResponse();\n $response->exitStatus = $result;\n\n return $response;\n }\n }",
"abstract function handle(Request $request, $parameters);",
"protected function handle_request() {\r\n global $wp;\r\n $film_query = $wp->query_vars['films'];\r\n \r\n if (!$film_query) { // send all films\r\n $raw_data = $this->get_all_films();\r\n }\r\n else if ($film_query == \"featured\") { // send featured films\r\n $raw_data = $this->get_featured_films();\r\n }\r\n else if (is_numeric($film_query)) { // send film of id\r\n $raw_data = $this->get_film_by_id($film_query);\r\n }\r\n else { // input error\r\n $this->send_response('Bad Input');\r\n }\r\n\r\n $all_data = $this->get_acf_data($raw_data);\r\n $this->send_response('200 OK', $all_data);\r\n }",
"public function handle(ServerRequestInterface $request);",
"public function handleRequest()\n {\n $route = $this->router->match();\n\n if ($route) {\n $controllerName = $route['target']['controllerName'];\n $methodName = $route['target']['methodName'];\n\n $controller = new $controllerName();\n\n $controller->$methodName($route['params']);\n } else {\n header(\"HTTP:1.0 404 not Found\");\n echo json_encode([\n \"error_code\" => 404,\n \"reason\" => \"page not found\"\n ]);\n }\n }",
"function handle(Request $request = null, Response $response = null);",
"public function processRequest();",
"public abstract function processRequest();",
"public function handleRequest(Request $request, Response $response);",
"abstract public function processRequest();",
"public function handle(array $request = []);",
"public function handleRequest()\n {\n $router = new Router();\n $controllerClass = $router->resolve()->getController();\n $controllerAction = $router->getAction();\n\n \n\n if(!class_exists($controllerClass)\n || !method_exists($controllerClass,$controllerAction)\n ){\n header('Not found', true, 404);\n exit;\n }\n\n $controller = new $controllerClass();\n call_user_func([$controller, $controllerAction]);\n\n }",
"public function handle(Request $request)\n {\n if ($request->header('X-GitHub-Event') === 'push') {\n return $this->handlePush($request->input());\n }\n\n if ($request->header('X-GitHub-Event') === 'pull_request') {\n return $this->handlePullRequest($request->input());\n }\n\n if ($request->header('X-GitHub-Event') === 'ping') {\n return $this->handlePing();\n }\n\n return $this->handleOther();\n }",
"protected function _handle()\n {\n return $this\n ->_addData('post', $_POST)\n ->_addData('get', $_GET)\n ->_addData('server', $_SERVER)\n ->_handleRequestRoute();\n }",
"public function processRequest() {\n $action = \"\";\n //retrieve action from client.\n if (filter_has_var(INPUT_GET, 'action')) {\n $action = filter_input(INPUT_GET, 'action');\n }\n\n switch ($action) {\n case 'login':\n $this->login(); \n break;\n case 'register':\n $this->register(); //list all articles\n break;\n case 'search':\n $this->search(); //show a form for an article\n break;\n case 'searchList':\n $this->searchList();\n break;\n case 'remove':\n $this->removeArticle();\n break;\n case 'modify':\n $this->modifyArticle();\n break;\n case 'listCategoryForm':\n $this->listCategoryForm();\n break;\n case 'listCategory':\n $this->listCategory();\n break;\n default :\n break;\n }\n }",
"public static function handleRequest($request)\r\n {\r\n // Load controller for requested resource\r\n $controllerName = ucfirst($request->getRessourcePath()) . 'Controller';\r\n\r\n if (class_exists($controllerName))\r\n {\r\n $controller = new $controllerName();\r\n\r\n // Get requested action within controller\r\n $actionName = strtolower($request->getHTTPVerb()) . 'Action';\r\n\r\n if (method_exists($controller, $actionName))\r\n {\r\n // Do the action!\r\n $result = $controller->$actionName($request);\r\n\r\n // Send REST response to client\r\n $outputHandlerName = ucfirst($request->getFormat()) . 'OutputHandler';\r\n\r\n if (class_exists($outputHandlerName))\r\n {\r\n $outputHandler = new $outputHandlerName();\r\n $outputHandler->render($result);\r\n }\r\n }\r\n }\r\n }",
"public function process(Request $request, Response $response, RequestHandlerInterface $handler);",
"public function handle(Request $request)\n {\n $handler = $this->router->match($request);\n if (!$handler) {\n echo \"Could not find your resource!\\n\";\n return;\n }\n\n return $handler();\n }",
"public function handleRequest() {\n\t\t\n\t\tif (is_null($this->itemObj)) {\n\t\t\t$this->itemObj = MovieServices::getVcdByID($this->getParam('vcd_id'));\n\t\t}\n\t\t\n\t\t$action = $this->getParam('action');\n\t\t\n\t\tswitch ($action) {\n\t\t\tcase 'upload':\n\t\t\t\t$this->uploadImages();\n\t\t\t\t// reload and close upon success\n\t\t\t\tredirect('?page=addscreens&vcd_id='.$this->itemObj->getID().'&close=true');\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 'fetch':\n\t\t\t\t$this->fetchImages();\n\t\t\t\t// reload and close upon success\n\t\t\t\tredirect('?page=addscreens&vcd_id='.$this->itemObj->getID().'&close=true');\n\t\t\t\tbreak;\n\t\t\n\t\t\tdefault:\n\t\t\t\tredirect();\n\t\t\t\tbreak;\n\t\t}\n\t}",
"public function handle(Request $request): Response;",
"public static function process_http_request()\n {\n }",
"public function processRequest() {\r\n switch($this->requestMethod) {\r\n case 'GET':\r\n if($this->id) {\r\n $response = $this->get($this->id);\r\n }\r\n else {\r\n $response = $this->getAll();\r\n }\r\n break;\r\n case 'POST':\r\n $response = $this->create();\r\n break;\r\n case 'PUT':\r\n $response = $this->update($this->id);\r\n break;\r\n case 'DELETE':\r\n $response = $this->delete($this->id);\r\n break;\r\n case 'OPTIONS':\r\n break;\r\n default:\r\n $response = $this->notFoundResponse();\r\n break;\r\n }\r\n\r\n header($response['status_code_header']);\r\n\r\n // If there is a body then echo it\r\n if($response['body']) {\r\n echo $response['body'];\r\n }\r\n }",
"abstract public function handle(ServerRequestInterface $request): ResponseInterface;",
"public function processRequest()\n\t\t{\n\t\t\t$request_method = strtolower($_SERVER['REQUEST_METHOD']);\n\t\t\tswitch ($request_method)\n\t\t\t{\n\t\t\t\tcase 'get':\n\t\t\t\t\t$data = $_GET['url'];\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'post':\n\t\t\t\t\t$data = $_GET['url'];\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t$request_parts = explode('/', $data);\n\t\t\t$controller = $request_parts[0];\n\t\t\tswitch ($controller)\n\t\t\t{\n\t\t\t\tcase 'ad':\n\t\t\t\t\tprocessAdRequest(substr($data, strlen('ad')+1));\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'category':\n\t\t\t\t\tprocessCategoryRequest(substr($data, strlen('category')+1));\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'user':\n\t\t\t\t\tprocessUserRequest(substr($data, strlen('user')+1));\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\techo \"Invalid Request!\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}",
"function handleRequest (&$request, &$context) {\n\n\t\t/* cycle through our process callback queue. using each() vs.\n\t\t * foreach, etc. so we may add elements to the callback array\n\t\t * later. probably primarily used for conditional callbacks. */\n\t\treset ($this->_processCallbacks);\n\t\twhile ($c = each ($this->_processCallbacks)) {\n\n\t\t\t// test for a successful view dispatch\n\t\t\tif ($this->_processProcess ($this->_processCallbacks[$c['key']],\n\t\t\t $request,\n\t\t\t $context))\n\t\t\t\treturn;\n\t\t}\n\n\t\t// if no view has been found yet attempt our default\n\t\tif ($this->defaultViewExists ())\n\t\t\t$this->renderDefaultView ($request, $context);\n\t}",
"public function handle($request, $next);",
"public function handle(): void\n {\n $globals = $_SERVER;\n //$SlimPsrRequest = ServerRequestFactory::createFromGlobals();\n //it doesnt matters if the Request is of different class - no need to create Guzaba\\Http\\Request\n $PsrRequest = ServerRequestFactory::createFromGlobals();\n //the only thing that needs to be fixed is the update the parsedBody if it is NOT POST & form-fata or url-encoded\n\n\n //$GuzabaPsrRequest =\n\n //TODO - this may be reworked to reroute to a new route (provided in the constructor) instead of providing the actual response in the constructor\n $DefaultResponse = $this->DefaultResponse;\n //TODO - fix the below\n// if ($PsrRequest->getContentType() === ContentType::TYPE_JSON) {\n// $DefaultResponse->getBody()->rewind();\n// $structure = ['message' => $DefaultResponse->getBody()->getContents()];\n// $json_string = json_encode($structure, JSON_UNESCAPED_SLASHES);\n// $StreamBody = new Stream(null, $json_string);\n// $DefaultResponse = $DefaultResponse->\n// withBody($StreamBody)->\n// withHeader('Content-Type', ContentType::TYPES_MAP[ContentType::TYPE_JSON]['mime'])->\n// withHeader('Content-Length', (string) strlen($json_string));\n// }\n\n $FallbackHandler = new RequestHandler($DefaultResponse);//this will produce 404\n $QueueRequestHandler = new QueueRequestHandler($FallbackHandler);//the default response prototype is a 404 message\n foreach ($this->middlewares as $Middleware) {\n $QueueRequestHandler->add_middleware($Middleware);\n }\n $PsrResponse = $QueueRequestHandler->handle($PsrRequest);\n $this->emit($PsrResponse);\n\n }",
"public function HandleRequest(Request $request)\r\n {\r\n $command = $this->_commandResolver->GetCommand($request);\t// Create command object for Request\r\n $response = $command->Execute($request);\t\t\t\t\t// Execute the command to get response\r\n $view = ApplicationController::GetView($response);\t\t\t\t\t// Send response to the appropriate view for display\r\n $view->Render();\t\t\t\t\t\t\t\t\t\t\t// Display the view\r\n }",
"public function process($path, Request $request);",
"public function handle(string $query, ServerRequestInterface $request);",
"public function handleRequest()\n\t{\n\t\t$fp = $this->fromRequest();\n\t\treturn $fp->render();\n\t}",
"private function _processRequest()\n\t{\n\t\t// prevent unauthenticated access to API\n\t\t$this->_secureBackend();\n\n\t\t// get the request\n\t\tif (!empty($_REQUEST)) {\n\t\t\t// convert to object for consistency\n\t\t\t$this->request = json_decode(json_encode($_REQUEST));\n\t\t} else {\n\t\t\t// already object\n\t\t\t$this->request = json_decode(file_get_contents('php://input'));\n\t\t}\n\n\t\t//check if an action is sent through\n\t\tif(!isset($this->request->action)){\n\t\t\t//if no action is provided then reply with a 400 error with message\n\t\t\t$this->reply(\"No Action Provided\", 400);\n\t\t\t//kill script\n\t\t\texit();\n\t\t}\n\n\t\t//check if method for the action exists\n\t\tif(!method_exists($this, $this->request->action)){\n\t\t\t//if method doesn't exist, send 400 code and message with reply'\n\t\t\t$this->reply(\"Action method not found\",400);\n\t\t\t//kill script\n\t\t\texit();\n\t\t}\n \n\t\tswitch($this->request->action){\n\t\t\tcase \"hello\":\n\t\t\t\t$this->hello($this->request->data);\n\t\t\t\tbreak;\n\t\t\tcase \"submit_video\":\n\t\t\t\t//error_log(\"formSubmit has been sent through\");\n\t\t\t\t$this->submit_video($this->request, $_FILES);\n\t\t\t\tbreak;\n\t\t\tcase \"remove_video\":\n\t\t\t\t//error_log(\"formSubmit has been sent through\");\n\t\t\t\t$this->remove_video($this->request);\n\t\t\t\tbreak;\n\t\t\tcase \"isSubmitted\":\n\t\t\t\t$this->isSubmitted($this->request);\n\t\t\tdefault:\n\t\t\t\t$this->reply(\"action switch failed\",400);\n\t\t\tbreak;\n\t\t}\n\n\n\n\t}",
"public function handleRequest ()\n\t{\n\t\t$this->version = '1.0';\n\t\t$this->id = NULL;\n\n\t\tif ($this->getProperty(self::PROPERTY_ENABLE_EXTRA_METHODS))\n\t\t\t$this->publishExtraMethods();\n\n\t\tif ($_SERVER['REQUEST_METHOD'] == 'POST')\n\t\t{\n\n\t\t\t$json = file_get_contents('php://input');\n\t\t\t$request = \\json_decode($json);\n\n\t\t\tif (is_array($request))\n\t\t\t{\n\t\t\t\t// Multicall\n\t\t\t\t$this->version = '2.0';\n\n\t\t\t\t$response = array();\n\t\t\t\tforeach ($request as $singleRequest)\n\t\t\t\t{\n\t\t\t\t\t$singleResponse = $this->handleSingleRequest($singleRequest, TRUE);\n\t\t\t\t\tif ($singleResponse !== FALSE)\n\t\t\t\t\t\t$response[] = $singleResponse;\n\t\t\t\t}\n\n\t\t\t\t// If all methods in a multicall are notifications, we must not return an empty array\n\t\t\t\tif (count($response) == 0)\n\t\t\t\t\t$response = FALSE;\n\t\t\t}\n\t\t\telse if (is_object($request))\n\t\t\t{\n\t\t\t\t$this->version = $this->getRpcVersion($request);\n\t\t\t\t$response = $this->handleSingleRequest($request);\n\t\t\t}\n\t\t\telse\n\t\t\t\t$response = $this->formatError(self::ERROR_INVALID_REQUEST);\n\t\t}\n\t\telse if ($_SERVER['PATH_INFO'] != '')\n\t\t{\n\t\t\t$this->version = '1.1';\n\t\t\t$this->id = NULL;\n\n\t\t\t$method = substr($_SERVER['PATH_INFO'], 1);\n\t\t\t$params = $this->convertFromRpcEncoding($_GET);\n\n\t\t\tif (!$this->hasMethod($method))\n\t\t\t\t$response = $this->formatError(self::ERROR_METHOD_NOT_FOUND);\n\t\t\telse\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tRpcResponse::setWriter(new JsonRpcResponseWriter($this->version, $this->id));\n\t\t\t\t\t$res = $this->invoke($method, $params);\n\t\t\t\t\tif ($res instanceof JsonRpcResponseWriter)\n\t\t\t\t\t{\n\t\t\t\t\t\t$res->finalize();\n\t\t\t\t\t\t$resposne = FALSE;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\t$response = $this->formatResult($res);\n\t\t\t\t}\n\t\t\t\tcatch (\\Exception $exception)\n\t\t\t\t{\n\t\t\t\t\t$response = $this->formatException($exception);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$response = $this->formatError(self::ERROR_PARSE_ERROR);\n\t\t}\n\n\t\tif (!headers_sent())\n\t\t{\n\t\t\theader('Content-Type: application/json', TRUE);\n\t\t\theader('Cache-Control: nocache', TRUE);\n\t\t\theader('Pragma: no-cache', TRUE);\n\t\t}\n\n\t\tif ($response !== FALSE)\n\t\t{\n\t\t\t$result = \\json_encode($this->convertToRpcEncoding($response));\n\n\t\t\tif ($result === FALSE)\n\t\t\t\terror_log(var_export($response, TRUE));\n\t\t\telse\n\t\t\t\techo($result);\n\t\t}\n\t}",
"public function handle($request)\n {\n $this->setRouter($this->app->compose('Cygnite\\Base\\Router\\Router', $request), $request);\n\n try {\n $response = $this->sendRequestThroughRouter($request);\n /*\n * Check whether return value is a instance of Response,\n * otherwise we will try to fetch the response form container,\n * create a response and return to the browser.\n *\n */\n if (!$response instanceof ResponseInterface && !is_array($response)) {\n $r = $this->app->has('response') ? $this->app->get('response') : '';\n $response = Response::make($r);\n }\n } catch (\\Exception $e) {\n $this->handleException($e);\n } catch (Throwable $e) {\n $this->handleException($e);\n }\n\n return $response;\n }",
"public function handleRequest()\n\t{\n $response = array();\n switch ($this->get_server_var('REQUEST_METHOD')) \n {\n case 'OPTIONS':\n case 'HEAD':\n $response = $this->head();\n break;\n case 'GET':\n $response = $this->get();\n break;\n case 'PATCH':\n case 'PUT':\n case 'POST':\n $response = $this->post();\n break;\n case 'DELETE':\n $response = $this->delete();\n break;\n default:\n $this->header('HTTP/1.1 405 Method Not Allowed');\n }\n\t\treturn $response;\n }",
"public function handleRequest(Zend_Controller_Request_Http $request)\n {\n \n }",
"final public function handle(Request $request)\n {\n $response = $this->process($request);\n if (($response === null) && ($this->successor !== null)) {\n $response = $this->successor->handle($request);\n }\n\n return $response;\n }",
"public function process(Aloi_Serphlet_Application_HttpRequest $request, Aloi_Serphlet_Application_HttpResponse $response) {\r\n\r\n\t\ttry {\r\n\t\t\t// Identify the path component we will use to select a mapping\r\n\t\t\t$path = $this->processPath($request, $response);\r\n\t\t\tif (is_null($path)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif (self::$log->isDebugEnabled()) {\r\n\t\t\t\tself::$log->debug('Processing a \"' . $request->getMethod() . '\" for path \"' . $path . '\"');\r\n\t\t\t}\r\n\r\n\t\t\t// Select a Locale for the current user if requested\r\n\t\t\t$this->processLocale($request, $response);\r\n\r\n\t\t\t// Set the content type and no-caching headers if requested\r\n\t\t\t$this->processContent($request, $response);\r\n\t\t\t$this->processNoCache($request, $response);\r\n\r\n\t\t\t// General purpose preprocessing hook\r\n\t\t\tif (!$this->processPreprocess($request, $response)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t//Identify the mapping for this request\r\n\t\t\t$mapping = $this->processMapping($request, $response, $path);\r\n\t\t\tif (is_null($mapping)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// Check for any role required to perform this action\r\n\t\t\tif (!$this->processRoles($request, $response, $mapping)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// Process any ActionForm bean related to this request\r\n\t\t\t$form = $this->processActionForm($request, $response, $mapping);\r\n\t\t\t$this->processPopulate($request, $response, $form, $mapping);\r\n\t\t\tif (!$this->processValidate($request, $response, $form, $mapping)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// Process a forward or include specified by this mapping\r\n\t\t\tif (!$this->processForward($request, $response, $mapping)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif (!$this->processInclude($request, $response, $mapping)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// Create or acquire the Action instance to process this request\r\n\t\t\t$action = $this->processActionCreate($request, $response, $mapping);\r\n\t\t\tif (is_null($action)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// Call the Action instance itself\r\n\t\t\t$forward = $this->processActionPerform($request, $response, $action, $form, $mapping);\r\n\r\n\t\t\t// Process the returned ActionForward instance\r\n\t\t\t$this->processForwardConfig($request, $response, $forward);\r\n\t\t} catch (ServletException $e) {\r\n\t\t\tthrow $e;\r\n\t\t}\r\n\t}",
"function handleRequest() {\n // I. On récupère l'action demandée par l'utilisateur, avec retrocompatibilité\n // Controller et Entité\n $entityName = (isset($_GET['controller']) ? $_GET['controller'] : \"article\");\n // on retravaille le nom pour obtenir un nom de la forme \"Article\"\n $entityName = ucfirst(strtolower($entityName));\n\n // Action\n $actionName = (isset($_GET['action']) ? $_GET['action'] : \"index\");\n $actionName = strtolower($actionName);\n\n // II à IV sont maintenant dans loadDep\n $controller = $this->loadDependencies($entityName);\n\n // V. On regarde si l'action de controller existe, puis on la charge\n // on retravaille la var obtenue pour obtenir un nom de la forme \"indexAction\"\n $action = $actionName . \"Action\";\n\n // si la méthode demandée n'existe pas, remettre \"index\"\n if (!method_exists($controller, $action)) {\n $actionName = \"index\";\n $action = \"indexAction\";\n }\n\n // on stock le titre sous la forme \"Article - Index\"\n $this->title = $entityName . \" - \" . $actionName;\n\n // on appelle dynamiquement la méthode de controller\n $this->content = $controller->$action();\n }",
"public function handle(RequestInterface $request): ResponseInterface;",
"public function handleRequest() {\n $this->loadErrorHandler();\n\n $this->sanitizeRequest();\n $this->modx->invokeEvent('OnHandleRequest');\n if (!$this->modx->checkSiteStatus()) {\n header('HTTP/1.1 503 Service Unavailable');\n if (!$this->modx->getOption('site_unavailable_page',null,1)) {\n $this->modx->resource = $this->modx->newObject('modDocument');\n $this->modx->resource->template = 0;\n $this->modx->resource->content = $this->modx->getOption('site_unavailable_message');\n } else {\n $this->modx->resourceMethod = \"id\";\n $this->modx->resourceIdentifier = $this->modx->getOption('site_unavailable_page',null,1);\n }\n } else {\n $this->checkPublishStatus();\n $this->modx->resourceMethod = $this->getResourceMethod();\n $this->modx->resourceIdentifier = $this->getResourceIdentifier($this->modx->resourceMethod);\n if ($this->modx->resourceMethod == 'id' && $this->modx->getOption('friendly_urls', null, false) && !$this->modx->getOption('request_method_strict', null, false)) {\n $uri = $this->modx->context->getResourceURI($this->modx->resourceIdentifier);\n if (!empty($uri)) {\n if ((integer) $this->modx->resourceIdentifier === (integer) $this->modx->getOption('site_start', null, 1)) {\n $url = $this->modx->getOption('site_url', null, MODX_SITE_URL);\n } else {\n $url = $this->modx->getOption('site_url', null, MODX_SITE_URL) . $uri;\n }\n $this->modx->sendRedirect($url, array('responseCode' => 'HTTP/1.1 301 Moved Permanently'));\n }\n }\n }\n if (empty ($this->modx->resourceMethod)) {\n $this->modx->resourceMethod = \"id\";\n }\n if ($this->modx->resourceMethod == \"alias\") {\n $this->modx->resourceIdentifier = $this->_cleanResourceIdentifier($this->modx->resourceIdentifier);\n }\n if ($this->modx->resourceMethod == \"alias\") {\n $found = $this->findResource($this->modx->resourceIdentifier);\n if ($found) {\n $this->modx->resourceIdentifier = $found;\n $this->modx->resourceMethod = 'id';\n } else {\n $this->modx->sendErrorPage();\n }\n }\n $this->modx->beforeRequest();\n $this->modx->invokeEvent(\"OnWebPageInit\");\n\n if (!is_object($this->modx->resource)) {\n if (!$this->modx->resource = $this->getResource($this->modx->resourceMethod, $this->modx->resourceIdentifier)) {\n $this->modx->sendErrorPage();\n return true;\n }\n }\n\n return $this->prepareResponse();\n }",
"public function process(\n ServerRequestInterface $request,\n RequestHandlerInterface $handler\n );",
"protected function handleRequest() {\n\t\t// TODO: remove conditional when we have a dedicated error render\n\t\t// page and move addModule to Mustache#getResources\n\t\tif ( $this->adapter->getFormClass() === 'Gateway_Form_Mustache' ) {\n\t\t\t$modules = $this->adapter->getConfig( 'ui_modules' );\n\t\t\tif ( !empty( $modules['scripts'] ) ) {\n\t\t\t\t$this->getOutput()->addModules( $modules['scripts'] );\n\t\t\t}\n\t\t\tif ( $this->adapter->getGlobal( 'LogClientErrors' ) ) {\n\t\t\t\t$this->getOutput()->addModules( 'ext.donationInterface.errorLog' );\n\t\t\t}\n\t\t\tif ( !empty( $modules['styles'] ) ) {\n\t\t\t\t$this->getOutput()->addModuleStyles( $modules['styles'] );\n\t\t\t}\n\t\t}\n\t\t$this->handleDonationRequest();\n\t}",
"public function handleHttpRequest($requestParams)\n\t{\n\t\t$action = strtolower(@$requestParams[self::REQ_PARAM_ACTION]);\t\t\n\t\t$methodName = $this->actionToMethod($action);\n\t\t\n\t\ttry\n\t\t{\n\t\t\t$this->$methodName($requestParams);\n\t\t} catch(Exception $e)\n\t\t{\n\t\t\techo \"Error: \".$e->getMessage();\n\t\t}\n\t}",
"public static function handleRequest()\n\t{\n\t\t// Load language strings\n\t\tself::loadLanguage();\n\n\t\t// Load the controller and let it run the show\n\t\trequire_once dirname(__FILE__).'/classes/controller.php';\n\t\t$controller = new LiveUpdateController();\n\t\t$controller->execute(JRequest::getCmd('task','overview'));\n\t\t$controller->redirect();\n\t}",
"public function handle() {\n $this->initDb(((!isset(self::$_config['db']['type'])) ? 'mysql' : self::$_config['db']['type']));\n $request = new corelib_request(self::$_config['routing'], self::$_config['reg_routing']);\n $path = parse_url($_SERVER['REQUEST_URI']);\n\n if (self::$_config['home'] == \"/\" || self::$_config['home'] == \"\") {\n $uri = ltrim($path['path'], '/');\n } else {\n $uri = str_replace(self::$_config['home'], '', $path['path']);\n }\n\n if (\"\" == $uri || \"/\" == $uri) {\n $uri = self::$_config['routing']['default']['controller'] . '/' . self::$_config['routing']['default']['action'];\n }\n self::$isAjax = $request->isAjax();\n self::$request = $request->route($uri);\n self::$request['uri'] = $uri;\n\n if (self::$request['action'] == \"\")\n self::$request['action'] = self::$_config['routing']['default']['action'];\n\n $this->_run( self::$request['params'] );\n }",
"public function processRequest() {\n $this->server->service($GLOBALS['HTTP_RAW_POST_DATA']);\n }",
"public function request_handler(){\r\n\t\t$route = new Router;\r\n\t\t$session = new Session;\r\n\t\t$segments = $route->urlRoute();\r\n\t\t#check if controller/action exist\r\n\t\t#if not use default_controller / default_action\r\n\t\tif( count($segments) == 0 || count($segments) == 1 ){\r\n\t\t\tinclude_class_method( default_controller , default_action );\r\n\t\t}else{\r\n\t\t#if controller/action exist in the url\r\n\t\t#then check the controller if it's existed in the file\r\n\t\t\tif( file_exists( CONTROLLER_DIR . $segments[0] . CONT_EXT ) )\r\n\t\t\t{\r\n\t\t\t\t#check for segments[1] = actions\r\n\t\t\t\t#if segments[1] exist, logically segments[0] which is the controller is also exist!!\r\n\t\t\t\t//if( isset($segments[1]) ){\r\n\t\t\t\t\tinclude_class_method( $segments[0], $segments[1] . 'Action' );\r\n\t\t\t\t//}\r\n\t\t\t}else{\r\n\t\t\t\terrorHandler(CONTROLLER_DIR . $segments[0] . CONT_EXT);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public function handle() {\n if(method_exists($this->class, $this->function)) {\n echo $this->class->{$this->function}($this->request);\n }else {\n echo Response::response(['error' => 'function does not exist on ' . get_class($this->class)], 500);\n }\n }",
"public function handle(ClientInterface $client, RequestInterface $request, HttpRequest $httpRequest);",
"public function handleRequest() {\n $questions=$this->contactsService->getAllQuestions(\"date\");\n //load all the users\n $userList = User::loadUsers();\n //load all the topics\n \t\t$topics = $this->contactsService2->getAllTopics(\"name\");\n \t\t\n\t\t\t\trequire_once '../view/home.tpl';\n\t}",
"public function serve_request()\n {\n }",
"public static function process($request){\r\n\t\tcall_user_func($request -> action, $request -> params);\r\n\t}",
"function process($request) {\n\t//$logFusion =& LoggerManager::getLogger('fusion');\n//PBXFusion begin\n\t$request=$this->mapRequestVars($request);\n $mode = $request->get('callstatus');\n\t//$logFusion->debug(\"PBX CONTROLLER PROCESS mode=\".$mode);\n//PBXFusion end\n switch ($mode) {\n\t//PBXFusion begin\n \t case \"CallStart\" :\n $this->processCallStart($request);\n break;\n\t//PBXFusion end\n case \"StartApp\" :\n $this->processStartupCallFusion($request);\n break;\n case \"DialAnswer\" :\n $this->processDialCallFusion($request);\n break;\n case \"Record\" :\n $this->processRecording($request);\n break;\n case \"EndCall\" :\n $this->processEndCallFusion($request);\n break;\n case \"Hangup\" :\n $callCause = $request->get('causetxt');\n if ($callCause == \"null\") {\n break;\n }\n $this->processHangupCall($request);\n break;\n }\n }",
"public function handle() {\n\t\n\t\t$task = $this->request->getTask();\n\t\t$handler = $this->resolveHandler($task);\n\t\t$action = $this->request->getAction();\n\t\t$method = empty($action) ? $this->defaultActionMethod : $action.$this->actionMethodSuffix;\n\t\t\n\t\tif (! method_exists($handler, $method)) {\n\t\t\tthrow new Task\\NotHandledException(\"'{$method}' method not found on handler.\");\n\t\t}\n\t\t\n\t\t$handler->setRequest($this->request);\n\t\t$handler->setIo($this->io);\n\t\t\n\t\treturn $this->invokeHandler($handler, $method);\n\t}",
"private function handleCall() { //$this->request\n $err = FALSE;\n // route call to method\n $this->logToFile($this->request['action']);\n switch($this->request['action']) {\n // Edit form submitted\n case \"edit\":\n // TODO: improve error handling\n try {\n $this->logToFile(\"case: edit\");\n $this->edit($this->request['filename']);\n //$this->save();\n } catch (Exception $e) {\n $err = \"Something went wrong: \";\n $err .= $e.getMessage();\n }\n break;\n }\n // TODO: set error var in response in case of exception / error\n // send JSON response\n if($err !== FALSE) {\n $this->request['error_msg'] = $err;\n }\n $this->giveJSONResponse($this->request);\n }",
"function handle()\n {\n $this->verifyPost();\n\n $postTarget = $this->determinePostTarget();\n\n $this->filterPostData();\n\n switch ($postTarget) {\n case 'upload_media':\n $this->handleMediaFileUpload();\n break;\n case 'feed':\n $this->handleFeed();\n break;\n case 'feed_media':\n $this->handleFeedMedia();\n break;\n case 'feed_users':\n $this->handleFeedUsers();\n break;\n case 'delete_media':\n $this->handleDeleteMedia();\n break;\n }\n }",
"public function run() {\n\t\t// If this particular request is not a hook, something is wrong.\n\t\tif (!isset($this->server[self::MERGADO_HOOK_AUTH_HEADER])) {\n\t\t\tthrow new \\RuntimeException(sprintf(\n\t\t\t\t\"%s is to be used only for handling hooks sent from Mergado.\n\t\t\t\tMergado-Apps-Hook-Auth is missing.\",\n\t\t\t\t__CLASS__\n\t\t\t));\n\t\t}\n\n\t\tif (!$decoded = json_decode($this->rawRequest, true)) {\n\t\t\tthrow new \\RuntimeException(sprintf(\n\t\t\t\t\"%s cannot handle request, because the data to be handled is empty.\",\n\t\t\t\t__CLASS__\n\t\t\t));\n\t\t} elseif (!isset($decoded['action'])) {\n\t\t\tthrow new \\RuntimeException(sprintf(\n\t\t\t\t\"%s cannot handle the hook, because the hook action is undefined.\",\n\t\t\t\t__CLASS__\n\t\t\t));\n\t\t};\n\n\t\t$this->handle($decoded['action'], $decoded);\n\n\t}",
"public function handleRequest()\n {\n $version = $this->versionEngine->getVersion();\n $queryConfiguration = $version->parseRequest($this->columnConfigurations);\n $this->provider->prepareForProcessing($queryConfiguration, $this->columnConfigurations);\n $data = $this->provider->process();\n return $version->createResponse($data, $queryConfiguration, $this->columnConfigurations);\n }",
"public function process()\n\t{\n\t\t$action = $this->getAction();\n\t\tswitch (strtolower($action))\n\t\t{\n\t\t\tcase 'get':\n\t\t\tcase 'put':\n\t\t\tcase 'post':\n\t\t\tcase 'delete':\n\t\t}\t\n\t}",
"public function run(){\n // server response object \n $requestMethod = $this->requestBuilder->getRequestMethod();\n $this->response = new Response($requestMethod);\n\n try{\n $route = $this->router->validateRequestedRoute($this->requestBuilder);\n\n // serve request object\n $this->requestBuilder->setQuery();\n $this->requestBuilder->setBody();\n $requestParams = $this->requestBuilder->getParam();\n $requestQuery = $this->requestBuilder->getQuery();\n $requestBody = $this->requestBuilder->getBody(); \n $this->request = new Request($requestParams, $requestQuery, $requestBody);\n\n $callback = $route->getCallback();\n $callback($this->request, $this->response);\n }catch(RouteNotImplementedException $e){\n $this->response->statusCode(404)->json($e->getMessage()); \n }\n \n }",
"final public function handle()\n {\n \n $this->_preHandle();\n \n if ($this->_request->getActionName() == null) {\n throw new ZendL_Tool_Endpoint_Exception('Endpoint failed to setup the action name.');\n }\n\n if ($this->_request->getProviderName() == null) {\n throw new ZendL_Tool_Endpoint_Exception('Endpoint failed to setup the provider name.');\n }\n \n ob_start();\n \n try {\n $dispatcher = new ZendL_Tool_Rpc_Endpoint_Dispatcher();\n $dispatcher->setRequest($this->_request)\n ->setResponse($this->_response)\n ->dispatch();\n \n } catch (Exception $e) {\n //@todo implement some sanity here\n die($e->getMessage());\n //$this->_response->setContent($e->getMessage());\n return;\n }\n \n if (($content = ob_get_clean()) != '') {\n $this->_response->setContent($content);\n }\n \n $this->_postHandle();\n }",
"public function RouteRequest ();",
"public function handle(ServerRequestInterface $request, $handler, array $vars): ?ResponseInterface;",
"public function DispatchRequest ();",
"protected function handleRequest() {\n\t\t// FIXME: is this necessary?\n\t\t$this->getOutput()->allowClickjacking();\n\t\tparent::handleRequest();\n\t}",
"public function listen() {\n\t\t// Checks the user agents match\n\t\tif ( $this->user_agent == $this->request_user_agent ) {\n\t\t\t// Determine if a key request has been made\n\t\t\tif ( isset( $_GET['key'] ) ) {\n\t\t\t\t$this->download_update();\n\t\t\t} else {\n\t\t\t\t// Determine the action requested\n\t\t\t\t$action = filter_input( INPUT_POST, 'action', FILTER_SANITIZE_STRING );\n\n\t\t\t\t// If that method exists, call it\n\t\t\t\tif ( method_exists( $this, $action ) )\n\t\t\t\t\t$this->{$action}();\n\t\t\t}\n\t\t}\n\t}",
"abstract public function request();",
"public function run() {\r\n $this->routeRequest(new Request());\r\n }",
"public function processAction(Request $request)\n {\n // Get the request Vars\n $this->requestQuery = $request->query;\n\n // init the hybridAuth instance\n $provider = trim(strip_tags($this->requestQuery->get('hauth_start')));\n $cookieName = $this->get('azine_hybrid_auth_service')->getCookieName($provider);\n $this->hybridAuth = $this->get('azine_hybrid_auth_service')->getInstance($request->cookies->get($cookieName), $provider);\n\n // If openid_policy requested, we return our policy document\n if ($this->requestQuery->has('get') && 'openid_policy' == $this->requestQuery->get('get')) {\n return $this->processOpenidPolicy();\n }\n\n // If openid_xrds requested, we return our XRDS document\n if ($this->requestQuery->has('get') && 'openid_xrds' == $this->requestQuery->get('get')) {\n return $this->processOpenidXRDS();\n }\n\n // If we get a hauth.start\n if ($this->requestQuery->has('hauth_start') && $this->requestQuery->get('hauth_start')) {\n return $this->processAuthStart();\n }\n // Else if hauth.done\n elseif ($this->requestQuery->has('hauth_done') && $this->requestQuery->get('hauth_done')) {\n return $this->processAuthDone($request);\n }\n // Else we advertise our XRDS document, something supposed to be done from the Realm URL page\n\n return $this->processOpenidRealm();\n }",
"public function run() {\n $base = $this->request->getNextRoute();\n if ($base !== BASE) {\n $this->response->notFound();\n }\n $start = $this->request->getNextRoute();\n if ($rs = $this->getRs($start)) {\n if ($this->request->isOptions()) {\n $this->response->okEmpty();\n return;\n }\n try {\n $this->response->ok($rs->handleRequest());\n\n } catch (UnauthorizedException $e) {\n $this->response->unauthorized();\n\n } catch (MethodNotAllowedException $e) {\n $this->response->methodNotAllowed();\n\n } catch (BadRequestExceptionInterface $e) {\n $this->response->badRequest($e->getMessage());\n\n } catch (UnavailableExceptionInterface $e) {\n $this->response->unavailable($e->getMessage());\n\n } catch (Exception $e) {\n $this->response->unavailable($e->getMessage());\n }\n } else {\n $this->response->badRequest();\n }\n }",
"public function handle(Request $request, Response|JsonResponse|BinaryFileResponse|StreamedResponse $response, int $length);",
"public function handle(Request $request, Closure $next);",
"public function handleGetRequest($id);",
"abstract function doExecute($request);",
"public function parseCurrentRequest()\n {\n // If 'action' is post, data will only be read from 'post'\n if ($action = $this->request->post('action')) {\n die('\"post\" method action handling not implemented');\n }\n \n $action = $this->request->get('action') ?: 'home';\n \n if ($response = $this->actionHandler->trigger($action, $this)) {\n $this->getResponder()->send($response);\n } else {\n die('404 not implemented');\n }\n }",
"abstract public function mapRequest($request);",
"public function handle(ServerRequestInterface $request)\n {\n $router = $this->app->get(RouterInterface::class);\n $response = $router->route($request);\n\n if (! headers_sent()) {\n\n // Status\n header(sprintf(\n 'HTTP/%s %s %s',\n $response->getProtocolVersion(),\n $response->getStatusCode(),\n $response->getReasonPhrase()\n ));\n\n // Headers\n foreach ($response->getHeaders() as $name => $values) {\n foreach ($values as $value) {\n header(sprintf('%s: %s', $name, $value), false);\n }\n }\n }\n\n echo $response->getBody()->getContents();\n }",
"abstract public function processRequest(PriceWaiter_NYPWidget_Controller_Endpoint_Request $request);",
"private function handleRequest()\n {\n // we check the inputs validity\n $validator = Validator::make($this->request->only('rowsNumber', 'search', 'sortBy', 'sortDir'), [\n 'rowsNumber' => 'required|numeric',\n 'search' => 'nullable|string',\n 'sortBy' => 'nullable|string|in:' . $this->columns->implode('attribute', ','),\n 'sortDir' => 'nullable|string|in:asc,desc',\n ]);\n // if errors are found\n if ($validator->fails()) {\n // we log the errors\n Log::error($validator->errors());\n // we set back the default values\n $this->request->merge([\n 'rowsNumber' => $this->rowsNumber ? $this->rowsNumber : config('tablelist.default.rows_number'),\n 'search' => null,\n 'sortBy' => $this->sortBy,\n 'sortDir' => $this->sortDir,\n ]);\n } else {\n // we save the request values\n $this->setAttribute('rowsNumber', $this->request->rowsNumber);\n $this->setAttribute('search', $this->request->search);\n }\n }",
"public function handle() {\n\t\t\n\t\t\n\t\t\n\t\theader('ApiVersion: 1.0');\n\t\tif (!isset($_COOKIE['lg_app_guid'])) {\n\t\t\t//error_log(\"NO COOKIE\");\n\t\t\t//setcookie(\"lg_app_guid\", uniqid(rand(),true),time()+(10*365*24*60*60));\n\t\t} else {\n\t\t\t//error_log(\"cookie: \".$_COOKIE['lg_app_guid']);\n\t\t\t\n\t\t}\n\t\t// checks if a JSON-RCP request has been received\n\t\t\n\t\tif (($_SERVER['REQUEST_METHOD'] != 'POST' && (empty($_SERVER['CONTENT_TYPE']) || strpos($_SERVER['CONTENT_TYPE'],'application/json')===false)) && !isset($_GET['d'])) {\n\t\t\t\techo \"INVALID REQUEST\";\n\t\t\t// This is not a JSON-RPC request\n\t\t\treturn false;\n\t\t}\n\t\t\t\t\n\t\t// reads the input data\n\t\tif (isset($_GET['d'])) {\n\t\t\tdefine(\"WEB_REQUEST\",true);\n\t\t\t$request=urldecode($_GET['d']);\n\t\t\t$request = stripslashes($request);\n\t\t\t$request = json_decode($request, true);\n\t\t\t\n\t\t} else {\n\t\t\tdefine(\"WEB_REQUEST\",false);\n\t\t\t//error_log(file_get_contents('php://input'));\n\t\t\t$request = json_decode(file_get_contents('php://input'),true);\n\t\t\t//error_log(print_r(apache_request_headers(),true));\n\t\t}\n\t\t\n\t\terror_log(\"Method: \".$request['method']);\n\t\tif (!isset($this->exemptedMethods[$request['method']])) {\n\t\t\ttry {\n\t\t\t\t$this->authenticate();\n\t\t\t} catch (Exception $e) {\n\t\t\t\t$this->authenticated = false;\n\t\t\t\t$this->handleError($e);\n\t\t\t}\n\t\t} else {\n\t\t\t//error_log('exempted');\n\t\t}\n\t\ttrack_call($request);\n\t\t//error_log(\"RPC Method Called: \".$request['method']);\n\t\t\n\t\t//include the document containing the function being called\n\t\tif (!function_exists($request['method'])) {\n\t\t\t$path_to_file = \"./../include/methods/\".$request['method'].\".php\";\n\t\t\tif (file_exists($path_to_file)) {\n\t\t\t\tinclude $path_to_file;\n\t\t\t} else {\n\t\t\t\t$e = new Exception('Unknown method. ('.$request['method'].')', 404, null);\n \t$this->handleError($e);\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t// executes the task on local object\n\t\ttry {\n\t\t\t\n\t\t\t$result = @call_user_func($request['method'],$request['params']);\n\t\t\t\n\t\t\tif (!is_array($result) || !isset($result['result']) || $result['result']) {\n\t\t\t\t\n\t\t\t\tif (is_array($result) && isset($result['result'])) unset($result['result']);\n\t\t\t\t\n\t\t\t\t$response = array (\n\t\t\t\t\t\t\t\t\t'jsonrpc' => '2.0',\n\t\t\t\t\t\t\t\t\t'id' => $request['id'],\n\t\t\t\t\t\t\t\t\t'result' => $result,\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t );\n\t\t\t} else {\n\t\t\t\tunset($result['result']);\n\t\t\t\t\n\t\t\t\t$response = array (\n\t\t\t\t\t\t\t\t\t'jsonrpc' => '2.0',\n\t\t\t\t\t\t\t\t\t'id' => $request['id'],\n\t\t\t\t\t\t\t\t\t'error' => $result\n\t\t\t\t\t\t\t\t );\n\t\t\t}\n\t\t\t\n\t\t} catch (Exception $e) {\n\t\t\t\n\t\t\t$response = array (\n\t\t\t\t\t\t\t\t'id' => $request['id'],\n\t\t\t\t\t\t\t\t'result' => NULL,\n\t\t\t\t\t\t\t\t'error' => $e->getMessage()\n\t\t\t\t\t\t\t\t);\n\t\t\t\n\t\t}\n\t\t// output the response\n\t\tif (!empty($request['id'])) { // notifications don't want response\n\t\t\theader('content-type: text/javascript');\n\t\t\t//error_log(@print_r($response));\n\t\t\tif (isset($_GET['d'])) $str_response = $_GET['jsoncallback'].\"(\".str_replace('\\/','/',json_encode($response)).\")\";\n\t\t\telse $str_response = str_replace('\\/','/',json_encode($response));\n\t\t\t\n\t\t\tif ($_SERVER['SERVER_ADDR']=='192.168.1.6') {\n\t\t\t\t//error_log($str_response);\n\t\t\t}\n\t\t\techo $str_response;\n\t\t}\n\t\t\n\t\t\n\t\t// finish\n\t\treturn true;\n\t}",
"protected function handle(Request $request)\n {\n return 1;\n }",
"public function __invoke(Request $request, RequestHandler $handler) {\n R::setup('mysql:host=127.0.0.1;dbname=cellar','root','');\n \n $response = $handler->handle($request);\n R::close();\n return $response;\n }",
"public function handle($req)\n {\n $params = $req->post ?: [];\n\n $files = $this->transformFiles($req->files);\n\n $cookies = $req->cookie ?: [];\n\n $server = $this->transformHeadersToServerVars(array_merge($req->header, [\n 'PATH_INFO' => array_get($req->server, 'path_info'),\n ]));\n $server['X_REQUEST_ID'] = Str::uuid()->toString();\n\n $requestUri = $req->server['request_uri'];\n if (isset($req->server['query_string']) && $req->server['query_string']) {\n $requestUri .= \"?\" . $req->server['query_string'];\n }\n\n $resp = $this->call(\n strtolower($req->server['request_method']),\n $requestUri, $params, $cookies, $files,\n $server, $req->rawContent()\n );\n\n return [\n 'status' => $resp->getStatusCode(),\n 'headers' => $resp->headers,\n 'body' => $resp->getContent(),\n ];\n }",
"public function handle(Request $request)\n {\n $route_params = $this->_router->match($request->getUri());\n $route = $route_params['route'];\n $params = $route_params['params'];\n\n $func = reset($route) . self::CONTROLLER_METHOD_SUFIX;\n $class_name = key($route);\n $controller = new $class_name($request);\n\n $response = call_user_func_array(\n [\n $controller,\n $func,\n ],\n [$params]\n );\n\n if ($response instanceof Response) {\n return $response;\n } else {\n throw new InvalidHttpResponseException();\n }\n }"
] | [
"0.8299201",
"0.8147294",
"0.8147294",
"0.8147294",
"0.8127764",
"0.7993589",
"0.7927201",
"0.7912899",
"0.7899075",
"0.76317674",
"0.75089735",
"0.7485808",
"0.74074036",
"0.7377414",
"0.736802",
"0.7294553",
"0.72389543",
"0.7230166",
"0.72108",
"0.71808434",
"0.7170364",
"0.71463037",
"0.7126907",
"0.7122795",
"0.71225274",
"0.7116879",
"0.70607233",
"0.6981947",
"0.6966695",
"0.69393975",
"0.6912079",
"0.68985975",
"0.6887614",
"0.68774897",
"0.6806274",
"0.67969805",
"0.67778915",
"0.6762979",
"0.67565143",
"0.67533374",
"0.67192745",
"0.6683243",
"0.66487724",
"0.66395754",
"0.6634629",
"0.66283566",
"0.6617558",
"0.6610097",
"0.6610011",
"0.6544976",
"0.653806",
"0.6512757",
"0.64682734",
"0.64381886",
"0.6416964",
"0.63373476",
"0.63359964",
"0.6334543",
"0.63308066",
"0.6321675",
"0.63176167",
"0.631661",
"0.6310991",
"0.63108873",
"0.6295945",
"0.6279438",
"0.62778515",
"0.62508965",
"0.62422955",
"0.62321424",
"0.62237644",
"0.6203428",
"0.61954546",
"0.6191255",
"0.61774665",
"0.61682004",
"0.6151806",
"0.61271876",
"0.61257905",
"0.6116093",
"0.61126447",
"0.6112368",
"0.6101652",
"0.60893977",
"0.60871464",
"0.60862815",
"0.60734737",
"0.60535145",
"0.6028341",
"0.60250086",
"0.60224646",
"0.6011745",
"0.6011483",
"0.60106593",
"0.5998867",
"0.5997086",
"0.5991233",
"0.59844923",
"0.59668386",
"0.5961315",
"0.5954762"
] | 0.0 | -1 |
/ EDIT.PHP Allows user to edit specific entry in database creates the edit record form since this form is used multiple times in this file, I have made it a function that is easily reusable | function renderForm($id, $first_name, $last_name, $login_name, $password, $email_id, $user_role, $user_permission
, $contact_number, $address, $error)
{
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta charset="utf-8" />
<title>Add user </title>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta content="width=device-width, initial-scale=1" name="viewport" />
<meta content="" name="description" />
<meta content="" name="author" />
<!-- BEGIN GLOBAL MANDATORY STYLES -->
<link href="//fonts.googleapis.com/css?family=Open+Sans:400,300,600,700&subset=all" rel="stylesheet" type="text/css" />
<link href="css/font-awesome.min.css" rel="stylesheet" type="text/css" />
<link href="css/simple-line-icons.min.css" rel="stylesheet" type="text/css" />
<link href="css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<link href="css/uniform.default.css" rel="stylesheet" type="text/css" />
<link href="css/bootstrap-switch.min.css" rel="stylesheet" type="text/css" />
<!-- END GLOBAL MANDATORY STYLES -->
<!-- Our css style sheet -->
<link href="css/mystyle.css" rel="stylesheet" type="text/css" />
<!-- jQuery -->
<script src="js/jquery.min.js"></script>
<!-- Bootstrap Core JavaScript -->
<script src="js/bootstrap.min.js"></script>
<!-- Menu Toggle Script -->
<!-- <script>
$("#menu-toggle").click(function(e) {
e.preventDefault();
$("#wrapper").toggleClass("toggled");
});
</script>
-->
</head>
<body>
<div class="navbar navbar-inverse navbar-fixed-top">
<div class="container-fluid" >
<div class="navbar-header">
<a class="navbar-brand" href="#"><img src="img/redbeak.PNG" alt=""></a>
</div>
<div >
<ul class="nav navbar-nav" id="topnav">
<li><a href="home.php">Home</a></li>
<li><a href="view.php">All Users</a></li>
<li><a href="#">My account</a></li>
<li><a href="#">Update info</a></li>
<li><a href="#">Notification</a></li>
</ul>
</div>
<div class="collapse navbar-collapse">
<ul class="nav navbar-nav navbar-right" style="padding-top:10px;padding-right:10px;">
<a href="login.html" class="btn btn-info" role="button">Logout</a>
</ul>
</div>
</div>
</div>
<div id="wrapper">
<!-- Sidebar -->
<div id="sidebar-wrapper">
<ul class="sidebar-nav">
<li class="sidebar-brand">
<a href="#">
Admin Panel
</a>
</li>
<li>
<a href="edit.php">Update internal User</a>
</li>
<li>
<a href="#">Assign Roles to User</a>
</li>
<li>
<a href="#">Report</a>
</li>
<li>
<a href="#">Feedback</a>
</li>
<li>
<a href="#">Enquiry</a>
</li>
<li>
<a href="#">HopOp</a>
</li>
</ul>
</div>
<!-- /#sidebar-wrapper -->
<!-- Page Content -->
<div id="page-content-wrapper">
<div class="container-fluid">
<form action=" " method="post" id="adduserform" name="sentMessage" >
<div class="row">
<div class="col-lg-12" style="margin-left:200px;">
<div class="col-md-3"style="margin-top:20px">
<div class="form-group">
<input type="hidden"class="form-control" name="id" value="<?php echo $id; ?>"/>
<p><strong>ID:</strong> <?php echo $id; ?></p>
</div>
<div class="form-group">
<input type="text" name="first_name" placeholder="First name" class="form-control" value="<?php echo $first_name; ?>" id="first_name" required/>
</div>
<div class="form-group">
<input type="text" name="last_name" placeholder="last name" class="form-control" value="<?php echo $last_name; ?>"id="last_name" required/>
</div>
<div class="form-group">
<input type="text" name="login_name" placeholder="login name" class="form-control" value="<?php echo $login_name; ?>" id="login_name" required/>
</div>
<div class="form-group">
<input type="password" name="password" placeholder="Password" class="form-control" value="<?php echo $password; ?>" id="password" required/>
</div>
<div class="form-group">
<input type="email" name="email_id" placeholder="Email" class="form-control" value="<?php echo $email_id; ?>" id="email_id" required/>
</div>
<div class="form-group">
<input type="text" name="user_role" placeholder="User role" class="form-control" value="<?php echo $user_role; ?>" id="user_role" required/>
</div>
<div class="form-group">
<input type="text" name="user_permission" placeholder="UserPermission" class="form-control" value="<?php echo $user_permission; ?>" id="user_permission" required/>
</div>
<div class="form-group">
<input type="number" name="contact_number" placeholder="Contact number" class="form-control" value="<?php echo $contact_number; ?>" id="contact_number" required/>
</div>
<div class="form-group">
<textarea name="address" placeholder="Enter address" class="form-control" value="<?php echo $address; ?>" id="address" required></textarea>
</div>
<div class="row">
<div class="form-group">
<a href="useradmin.html" class="btn btn-warning pull pull-right" id="cancel" role="button">Cancel</a>
<button type="submit" name="submit" class="btn btn-primary pull pull-left" id="save">update</button>
</div>
</div>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
<!-- /#page-content-wrapper -->
<!--FOOTER SECTION -->
<div class="copyright" >
<footer id="footer" class="pull-right">
<div class="row">
<div class="col-md-12 col-sm-12">
© 2016 www.redbeak.co.in | All Rights Reserved
</div>
</div>
</footer>
</div>
</body>
</html>
<?php
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function doEdit()\n {\n global $_POST;\n$regs=explode(\":::\",$_POST[\"DROWS\"]);\n$id= $regs[0];\n if (strlen($id) <= 0)\n {\n echo \"Nao existe valores a serem editados\";\n echo \"<a href=./cadastra.php>Voltar</a> \";\n exit();\n }\n$result = lookup($id);\n\n presentInputForm(\n mysql_result($result, 0, \"id\"),\n mysql_result($result, 0, 1),\n mysql_result($result, 0, 2),\n mysql_result($result, 0, 3),\n mysql_result($result, 0, 4),\n mysql_result($result, 0, 5),\n mysql_result($result, 0, 6),\n mysql_result($result, 0, 7),\n mysql_result($result, 0, 8),\n mysql_result($result, 0, 9),\n mysql_result($result, 0, 10),\n mysql_result($result, 0, 11),\n\"E\");\n }",
"public function edit()\n\t{\n\t\t//\n\t}",
"public function edit( )\r\n {\r\n //\r\n }",
"public function edit() {\n\t\t\t\n\t\t}",
"public function edit_record()\n {\n \t$id = $this->uri->segment(4);\n $table = CMS_TABLE.' as u';\n\t\t$fields = array('u.*');\n\t\t$match = array('u.cms_id' => $id);\n\t\t$result \t = $this->general_model->get_records($table,$fields,'','',$match);\n\t\t$data['editRecord'] = $result;\n\t\t$data['main_content'] = $this->type.'/'.$this->viewname.'/add';\n\t $this->load->view($this->type.'/assets/template',$data);\n }",
"public function edit()\n\t{\n\t\t\n\t}",
"function pa_edit() {\n\t\t\t\t$edit_pid = (int)UTIL::get_post('edit_pid');\n\t\t\t\t\n\t\t\t\t//-- haben wir keine edit-id, gibts eine seiten-tabelle zur auswahl\n\t\t\t\tif (!$edit_pid) {\n\t\t\t\t\techo 'error: no pid';\n\t\t\t\t\texit;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$form = MC::create('form');\n\t\t\t\t$form->init('page', 'mod_page');\n\t\t\t\t$form->add_hidden('edit_pid', $edit_pid);\n\t\t\t\t\n\t\t\t\t// hatten wir fehler\n\t\t\t\tif ($this->get_var('error')) {\n\t\t\t\t\t$form->set_values($this->get_var('data'));\n\t\t\t\t\t$form->set_error_fields($this->get_var('error'));\n\t\t\t\t}\t\n\t\t\t\telse {\n\t\t\t\t\t// frisch aus db lesen\n\t\t\t\t\t$sql = 'SELECT * FROM '.$this->mod_tbl.' WHERE id='.$edit_pid;\n\t\t\t\t\t$res = $this->DB->query($sql);\n\t\t\t\t\t$data = $res->r();\n\t\t\t\t\t$form->set_values($data);\n\t\t\t\t}\n\n\t\t\t\t$this->set_var('path', $this->_get_path_print($edit_pid));\n\t\t\t\t$this->set_var('form', $form);\n\t\t\t\t\n\t\t\t\t$this->OPC->generate_view($this->tpl_dir.'pa_edit.php');\n\n\t\t\t}",
"function renderForm($id, $title, $query, $query2, $query3, $type, $order, $link, $detail, $error)\n {\n?>\n <!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n <html>\n <head>\n <title>Edit Record</title>\n </head>\n <body>\n <button type=\"button\" onClick=\"window.location='index.php';\"> HOME </button>\n <?php\n // if there are any errors, display them\n if ($error != '')\n {\n echo '<div style=\"padding:4px; border:1px solid red; color:red;\">' . $error . '</div>';\n }\n \n?> \n \n <form action=\"\" method=\"post\">\n <input type=\"hidden\" name=\"id\" value=\"<?php\n echo $id;\n?>\"/>\n <div>\n <p><strong>ID:</strong> <?php\n echo $id;\n?></p>\n <strong>Title: *</strong> <input type=\"text\" name=\"title\" value=\"<?php\n echo $title;\n?>\"/><br/>\n <strong>Query: *<textarea rows=\"5\" cols=\"100\" name=\"query\" ><?php\n echo $query;\n?></textarea><br/>\n <strong>Query2: *<textarea rows=\"5\" cols=\"100\" name=\"query2\" ><?php\n echo $query2;\n?></textarea><br/>\n <strong>Query3: *<textarea rows=\"5\" cols=\"100\" name=\"query3\" ><?php\n echo $query3;\n?></textarea><br/>\n <strong>Type: *</strong> <input type=\"text\" name=\"type\" value=\"<?php\n echo $type;\n?>\"/><br/>\n <strong>Order: *</strong> <input type=\"text\" name=\"order\" value=\"<?php\n echo $order;\n?>\"/><br/>\n <strong>Link: *</strong> <input type=\"text\" name=\"link\" value=\"<?php\n echo $link;\n?>\"/><br/>\n <strong>Detail: *</strong> <input type=\"text\" name=\"detail\" value=\"<?php\n echo $detail;\n?>\"/><br/>\n <p>* Required</p>\n <input type=\"submit\" name=\"submit\" value=\"Submit\">\n </div>\n </form> \n </body>\n </html> \n <?php\n }",
"function editrec($recid)\r\n{\r\n \t$res = sql_select();\r\n \t$count = sql_getrecordcount();\r\n \tmysqli_data_seek($res, $recid);\r\n \t$row = mysqli_fetch_assoc($res);\r\n \tshowrecnav(\"edit\", $recid, $count);\r\n?>\r\n\t<br>\r\n\t<form name=\"company_validate\" enctype=\"multipart/form-data\" action=\"company/processCompany.php?status=true&action=update\" method=\"post\">\r\n\t\t<input type=\"hidden\" name=\"sql\" value=\"update\">\r\n <input type=\"hidden\" name=\"action\" value=\"update\">\r\n\t\t<input type=\"hidden\" name=\"comp_id\" value=\"<?php echo $row[\"comp_id\"] ?>\">\r\n\t\t<?php showroweditor($row, true); ?>\r\n\t\t<p>\r\n \t<input type=\"button\" name=\"btnedit\" id=\"btnedit\" value=\"Update\" onClick=\"if(companyvalidate()==true){javascript: formget(this.form, 'company/processCompany.php');}\">\r\n </p>\r\n <div id=\"output\" style=\"color: blue;\"></div>\r\n\t</form>\r\n<?php\r\n\tmysqli_free_result($res);\r\n}",
"function edit() {\n\n$id = intval( $_GET[\"id\"] );\n$a = \"select * from qlns_administrator where ctn_id=\\\"$id\\\"\";\n$b = @mysql_query($a) or die(mysql_error());\n$c = @mysql_fetch_array($b);\n?>\n\n<TABLE height=100><TBODY><TR><TD></TD></TR></TBODY></TABLE>\n\n\n<TABLE style=\"BORDER-BOTTOM: #a6b0c9 1px solid; BORDER-LEFT: #a6b0c9 1px solid; BORDER-RIGHT: #a6b0c9 1px solid; BORDER-TOP: #a6b0c9 1px solid\" cellSpacing=0 cellPadding=1 align=\"center\" width=350 bgColor=#f5f5f5 border=0>\n <TBODY>\n \n<tr bgcolor=\"#4B9BE0\"> \n<TD background=\"../images/headerbg.gif\" colSpan=6>\n<center><FONT color=#ffffff><B>Sửa thông tin thành viên</B></center></font></TD></TR>\n\n<form method=\"post\" NAME=\"mainform\" onsubmit=\"validate();\" enctype=\"multipart/form-data\">\n <TR>\n <TD vAlign=top height=22> \n <B>Họ và tên\n </B></TD>\n <TD colSpan=2>\n <input type=\"text\" onkeyup=initTyper(this); name=\"realname\" value=\"<? echo $c['ctn_name']; ?>\" size=\"35\">\n </TD></TR>\n\n <TR>\n <TD vAlign=top height=22> \n <B>Email\n </B></TD>\n <TD colSpan=2>\n <input type=\"text\" name=\"email\" value=\"<? echo $c['ctn_email']; ?>\" size=\"35\">\n </TD></TR>\n\n\n\n <TR>\n <TD vAlign=top height=22> \n <B>Nick Y!M\n </B></TD>\n <TD colSpan=2>\n <input type=\"text\" name=\"yahoo\" value=\"<? echo $c['ctn_yahoo']; ?>\" size=\"35\">\n </TD></TR>\n\n\n <TR>\n <TD vAlign=top height=22> \n <B>Điện thoại\n </B></TD>\n <TD colSpan=2>\n <input type=\"text\" name=\"mobile\" value=\"<? echo $c['ctn_mobile']; ?>\" size=\"35\">\n </TD></TR>\n\n \n <TR>\n <TD vAlign=top height=22> \n </TD>\n <TD colSpan=2>\n <input type=\"submit\" name=\"submit\" value=\"Update\">\n </TD></TR>\n\n\t\t\t\t</form>\n\t\t\t\t</TBODY></TABLE>\n\n\n\n \n\n\n\n<?\n }",
"function editrec($recid)\r\n{\r\n \t$res = sql_select();\r\n \t$count = sql_getrecordcount();\r\n \tmysqli_data_seek($res, $recid);\r\n \t$row = mysqli_fetch_assoc($res);\r\n \tshowrecnav(\"edit\", $recid, $count);\r\n?>\r\n\t<br>\r\n\t<form name=\"products\" enctype=\"multipart/form-data\" action=\"products/processProduct.php?status=true&action=update\" method=\"post\">\r\n\t\t<input type=\"hidden\" name=\"action\" value=\"update\">\r\n\t\t<input type=\"hidden\" name=\"cat_id\" value=\"<?php echo $row[\"prod_code\"] ?>\">\r\n\t\t<?php showroweditor($row, true); ?>\r\n\t\t<p>\r\n \t<input type=\"button\" name=\"btnedit\" id=\"btnedit\" value=\"Update\" onClick=\"if(prod_validate()==true){javascript: formget(this.form, 'products/processProduct.php');}\">\r\n </p>\r\n <div id=\"output\" style=\"color: blue;\"></div>\r\n\t</form>\r\n<?php\r\n\tmysqli_free_result($res);\r\n}",
"function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}",
"public function edit(){\n\t\t\tif(isset($_POST['submit'])){\n\t\t\t\t//MAP DATA\n\t\t\t\t$user = $this->_map_posted_data();\n\t\t\t\t$user->set_user_id($_POST['id']);\n\t\t\t\t$this->userrepository->update($user);\n\t\t\t\theader(\"Location: index.php/admin/index/edit\");\n\t\t\t}else{\n\t\t\t\t$view_page = \"adminusersview/edit\";\n\t\t\t\t$id = $_GET['id'];\n\t\t\t\t$user = $this->userrepository->get_by_id($id);\n\t\t\t\tif(is_null($user)){\n\t\t\t\t\theader(\"Location: index.php/admin/index\");\n\t\t\t\t}\n\t\t\t\tinclude_once(ROOT_PATH.\"admin/views/admin/container.php\");\n\t\t\t}\n\t\t}",
"public function Edit()\n\t{\n\t\t\n\t}",
"abstract protected function renderEdit();",
"public function getEditForm();",
"public function edit()\r\n {\r\n //\r\n }",
"public function edit()\r\n {\r\n //\r\n }",
"public function editAction() {\n# process the edit form.\n# check the post data and filter it.\n\t\tif(isset($_POST['cancel'])) {\n\t\t\tAPI::Redirect(API::printUrl($this->_redirect));\n\t\t}\n\t\t$input_check = $this->_model->check_input($_POST);\n\t\tif(is_array($input_check)) {\n\t\t\tAPI::Error($input_check);\n\t\t\tAPI::redirect(API::printUrl($this->_redirect));\n\t\t}\n\t\t// all hooks will stack their errors onto the API::Error stack\n\t\t// but WILL NOT redirect.\n\t\tAPI::callHooks(self::$module, 'validate', 'controller', $_POST);\n\t\tif(API::hasErrors()) {\n\t\t\tAPI::redirect(API::printUrl($this->_redirect));\n\t\t}\n\n\t\t$this->_model->set_data($_POST);\n\n\t\t// auto call the hooks for this module/action\n\t\tAPI::callHooks(self::$module, 'save', 'controller');\n\n\t\tAPI::redirect(API::printUrl($this->_redirect));\n\n\n\t}",
"public function edit()\n\t{\n\t\t\n\t\t$sql = SqlQuery::getInstance();\n\t\t\n\t\t$tbl = new AbTable(\"SELECT u.first_name, u.last_name, u.zip, c.* FROM IBO_camp c JOIN user u ON u.id = c.user_id\",array('user_id'));\n\t\t\n\t\treturn $tbl->getHtml();\n\t\t\n\t\t\n\t}",
"function updateRecord()\n{\n\n // Connect to DB\n require('connect.php');\n\n //User inputs for id, idiom, occurence and translation \n // in the record they'd like to edit \n\n $id = $_POST['update-id'];\n $idiom = $_POST['update-idiom'];\n $occurence = $_POST['update-occurence'];\n $translation = $_POST['update-translation'];\n\n // Update query\n $sql = \"UPDATE `meno` \n SET\n `idiom` = '$idiom',\n `occurence` = '$occurence',\n `translation` = '$translation',\n `commentary` = '$commentary'\n WHERE `id` = '$id' \";\n\n $update_query = mysqli_query($connection, $sql);\n\n if (!$update_query) {\n echo \"Error: \" . $sql . mysqli_error($connection);\n }\n\n mysqli_close($connection);\n\n header('Location: index.php');\n\n // check if save button has been clicked \n}",
"function fileEdit(){\n\t\t$result = mysql_query(getFile($_GET['file']));\n\t\t$GLOBALS['adminObjectId'] = $_GET['file'];\n\t\tif($row = mysql_fetch_assoc($result)) {\n\t\t\tgetFileGlobals($row);\n\t\t\tfileForm(\"edit\");\n\t\t}\n\t}",
"public function edit(){\r\n\t\t//$this->auth->set_access('edit');\r\n\t\t//$this->auth->validate();\r\n\r\n\t\t//call save method\r\n\t\t$this->save();\r\n\t}",
"function editItemForm(){\n\n\t//Database connection\n\tglobal $mysqli;\n\n\t//Selected continent, attribute, and item\n\t$continent_id=$_GET[\"continent_id\"];\n\t$attribute_id=$_GET[\"attribute_id\"];\n\t$title=$_GET[\"title\"];\n\t\n\t//Corresponding database selection\n\t$sql_editItem=\"SELECT * FROM items WHERE continent_id=\".d($mysqli, $continent_id).\" AND attribute_id=\".d($mysqli, $attribute_id).\" AND title='\".d($mysqli, $title).\"';\";\n\t$res_editItem=mysqli_query($mysqli, $sql_editItem);\n\n\t//Edit item form\n\twhile($profile=$res_editItem->fetch_assoc()){\n\n\t\techo \"<div class=\\\"heading\\\">\n\t\t\t<h2>Edit \".h(ucfirst($profile[\"continent_name\"])).\" \".h(ucfirst($profile[\"attribute_name\"])).\": \".h(ucfirst($profile[\"title\"])).\"</h2>\n\t\t\t</div>\n\t\t\t<div class=\\\"main\\\">\n\t\t\t<form action=\\\"cms_editItemSubmit.php?continent_id=\".u($continent_id).\"&continent_name=\".h(u($profile[\"continent_name\"])).\"&attribute_id=\".u($attribute_id).\"&attribute_name=\".h(u($profile[\"attribute_name\"])).\"&title=\".h(u($title)).\"\\\" enctype=\\\"multipart/form-data\\\" method=\\\"post\\\">\n\t\t\tPage Number: Title: <input name=\\\"pg\\\" type=\\\"text\\\" value=\\\"\".ucfirst($profile[\"pg\"]).\"\\\"></input><br>\n\t\t\tTitle: <input name=\\\"title\\\" type=\\\"text\\\" value=\\\"\".ucfirst($profile[\"title\"]).\"\\\"></input><br>\n\t\t\tOld Image: <p><img src=\\\"../\".$profile[\"image_path\"].\"\\\" height=\\\"600\\\" width=\\\"800\\\"></p><br>\n\t\t\tNew Image: <input accept=\\\"image/*\\\" id=\\\"image\\\" name=\\\"image\\\" type=\\\"file\\\"><br>\n\t\t\tDescription: <textarea name=\\\"description\\\" rows=\\\"100\\\" cols=\\\"100\\\">\".h(file_get_contents(\"../\".$profile[\"description_path\"].\"\")).\"</textarea><br>\n\t\t\tUser Access: <select name=\\\"ux\\\">\";\n\t\tif($profile[\"ux\"]==\"Hidden\" || $profile[\"ux\"]==\"hidden\"){\n\n\t\t\techo \"<option value=\\\"Hidden\\\" selected>Hidden</option>\";\n\n\n\t\t}else{\n\n\t\t\techo \"<option value=\\\"Hidden\\\">Hidden</option>\";\n\n\t\t}\n\n\t\tif($profile[\"ux\"]==\"Visible\" || $profile[\"ux\"]==\"visible\"){\n\n\t\t\techo \"<option value=\\\"Visible\\\" selected>Visible</option>\";\n\n\t\t}else{\n\t\t\n\t\t\techo \"<option value=\\\"Visible\\\">Visible</option>\";\n\t\t\n\t\t}\n\t\t\n\t\t\techo \"</select>\n\t\t\t<input name=\\\"submit\\\" type=\\\"submit\\\" value=\\\"Create\\\"></input>\n\t\t\t</form>\";\n\n\t}\n\n\t$res_editItem->close(); \n\t$mysqli->close();\n\n}",
"public function edit_admin_show($edit)\n\t{\n\t\t$sql=\"SELECT * FROM `create_admin` WHERE id = '$edit'\";\n\t\t$result=$this->db->query($sql);\n\t\t$data= $result->fetch_array();\n\t\techo \"<input class='id' type='text' name='id' value='$data[serial_id]'>\n <br><br>\n <input class='name' type='text' name='name' value='$data[name]'>\n <br><br>\n <input class='email' type='email' name='email' value='$data[email]'>\n <br><br>\n <input class='pass' type='password' name='pass' value='$data[password]'>\n <br><br>\n <select class='categore' name='categore'>\n <option value='$data[categore]' selected='selected'>$data[categore]</option>\n <option value='super-admin'>Super-Admin</option>\n <option value='admin'>Admin</option>\n <option value='sub-admin'>Sub-Admin</option>\n </select>\n \n <select class='stat' name='stat'>\n \t<option value='$data[stat]'>$data[stat]</option>\n <option value='1'>Active</option>\n <option value='0'>Inactive</option>\n </select>\n <br><br>\n <button type='submit' class='submit' name='update' >Update Admin</button>\";\n\t}",
"public function edit($id)\t{\n\t\t//\n\t}",
"function editrow()\r\n {\r\n $c=$this->connector();\r\n $r='';\r\n $r.=$this->logout();\r\n $db=$_GET['db'];\r\n $tbl=$_GET['table'];\r\n $val=$_GET['val'];\r\n $col=$_GET['col'];\r\n $r.=\"<div id='isi'>\r\n <center><a href='?act=showtable&db=$db'>Show Tables </a></center><br />\";\r\n $r.=\"<form method='post' action='?act=showcon&db=$db&table=$tbl&col=$col&val=$val'>\";\r\n $r.=\"<table width=100% align='center' cellspacing=0 class='xpltab'>\";\r\n \r\n $cols=array();\r\n $iml=mysql_query(\"SHOW COLUMNS FROM $db.$tbl\");\r\n $query=mysql_query(\"SELECT * FROM $db.$tbl WHERE $col='$val'\");\r\n \r\n while($colom=mysql_fetch_assoc($iml))$cols[]=$colom['Field'];\r\n $data=mysql_fetch_assoc($query);\r\n for($i=0;$i<count($cols);$i++)\r\n {\r\n $pt=$cols[$i];\r\n $r.=\"<tr><td style='border:none'>\".$pt.\"</td><td style='border:none'>\".' : <input id=\"sqlbox\" type=\"text\" name=\"'.$cols[$i].'\" value=\"'.$data[$pt].'\"></td></tr>';\r\n\r\n }\r\n $r.=\"</table><input type='hidden' name='action' value='updaterow'><input id='but' type='submit' value='update'></form></div>\";\r\n return $r;\r\n $this->free();\r\n }",
"public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}",
"function showEdit() {\r\n\tglobal $options_url;\r\n\tglobal $restrictions;\r\n\r\n\tif ( isset($_REQUEST['id']) ) {\r\n\t\t$re_id = $_REQUEST['id'];\r\n\t} else {\r\n\t\t$re_id = \"\";\r\n\t}\r\n\t$rePlaceManager = new RePlace();\r\n\t$re_place = $rePlaceManager->getRePlace($re_id);\r\n?>\r\n<div class=\"wrap\"> \r\n\t<h2><?php _e('re.place -- edit entry'); ?></h2> \r\n\t\r\n\t<form name=\"re_edit\" method=\"post\" action=\"<?php echo $options_url; ?>\">\r\n\t<input type=\"hidden\" name=\"action\" value=\"edit2\" />\r\n\t<input type=\"hidden\" name=\"re_id\" value=\"<?php echo $re_place->re_id;?>\" />\r\n\t<table cellspacing=\"3\">\r\n\t\t<tr>\r\n\t\t\t<td valign=\"top\">ID</td>\r\n\t\t\t<td><?php echo $re_place->re_id;?></td>\r\n\t\t</tr>\r\n\t\t<tr>\r\n\t\t\t<td valign=\"top\">Description</td>\r\n\t\t\t<td>\r\n\t\t\t\t<input name=\"re_description\" type=\"text\" size=\"50\" value=\"<?php echo htmlspecialchars($re_place->re_description);?>\" /><br />\r\n\t\t\t\tAny text that helps you identify this entry\r\n\t\t\t</td>\r\n\t\t</tr>\r\n\t\t<tr>\r\n\t\t\t<td valign=\"top\">Search for</td>\r\n\t\t\t<td>\r\n\t\t\t\t<textarea name=\"re_search\" rows=\"6\" cols=\"80\"><?php echo htmlspecialchars($re_place->re_search);?></textarea><br />\r\n\t\t\t\tWhat is re.place should search for.\r\n\t\t\t</td>\r\n\t\t</tr>\r\n\t\t<tr>\r\n\t\t\t<td valign=\"top\">Replace with</td>\r\n\t\t\t<td>\r\n\t\t\t\t<textarea name=\"re_place\" rows=\"6\" cols=\"80\"><?php echo htmlspecialchars($re_place->re_place);?></textarea><br />\r\n\t\t\t\tWhat re.place should place instead.\r\n\t\t\t</td>\r\n\t\t</tr>\r\n\t\t<tr>\r\n\t\t\t<td valign=\"top\">Restriction</td>\r\n\t\t\t<td>\r\n\t\t\t\tReplace only if...\r\n\t\t\t\t<select name=\"restriction\">\r\n\t\t\t\t\t<?php foreach ( $restrictions as $r => $restr ) {\r\n\t\t\t\t\t\t$sel = $re_place->restriction ?\r\n\t\t\t\t\t\t\t( $r == $re_place->restriction ? ' selected' : '' ) :\r\n\t\t\t\t\t\t\t( $r == 'none' ? ' selected' : '' );\r\n\t\t\t\t\t\techo '<option' . $sel . ' value=\"' . $r . '\">' . __($restr) . '</option>' .\"\\n\";\r\n\t\t\t\t\t} ?>\r\n\t\t\t\t</select>\r\n\t\t\t</td>\r\n\t\t</tr>\r\n\t\t<tr>\r\n\t\t\t<td valign=\"top\">Otherwise replace with:</td>\r\n\t\t\t<td>\r\n\t\t\t\t<textarea name=\"restr_otherwise\" rows=\"6\" cols=\"80\"><?php echo htmlspecialchars($re_place->restr_otherwise);?></textarea><br />\r\n\t\t\t</td>\r\n\t\t</tr>\r\n\t\t<tr>\r\n\t\t\t<td valign=\"top\">Order</td>\r\n\t\t\t<td>\r\n\t\t\t\t<input name=\"re_order\" type=\"text\" size=\"5\" value=\"<?php echo htmlspecialchars($re_place->re_order);?>\"><br />\r\n\t\t\t\tOrder of this entry\r\n\t\t\t</td>\r\n\t\t</tr>\r\n\t\t<tr>\r\n\t\t\t<td valign=\"top\">Active</td>\r\n\t\t\t<td>\r\n\t\t\t\t<input name=\"re_active\" type=\"checkbox\" value=\"Y\" <?php echo ($re_place->re_active == \"Y\" ? \"checked\" : \"\");?> />\r\n\t\t\t</td>\r\n\t\t</tr>\r\n\t\t<tr>\r\n\t\t\t<td> </td>\r\n\t\t\t<td><input type=\"submit\" name=\"submit\" value=\"<?php _e('Save'); ?>\" /></td>\r\n\t\t</tr>\r\n\t</table>\t\t\r\n\t\r\n\t</form>\r\n</div>\r\n<?php\r\n}",
"function EDIT()\r\n{\r\n\t// se construye la sentencia de busqueda de la tupla en la bd\r\n $sql = \"SELECT * FROM NOTICIA WHERE (idNoticia = '$this->idNoticia')\";\r\n // se ejecuta la query\r\n $result = $this->mysqli->query($sql);\r\n // si el numero de filas es igual a uno es que lo encuentra\r\n if ($result->num_rows == 1)\r\n {\t// se construye la sentencia de modificacion en base a los atributos de la clase\r\n\t\t$sql = \"UPDATE NOTICIA SET \r\n\t\t\t\t\tidNoticia = '$this->idNoticia',\r\n\t\t\t\t\timageURL = '$this->imageURL',\r\n\t\t\t\t\tenlace = '$this->enlace',\r\n\t\t\t\t\ttexto = '$this->texto'\t\t\t\t\t\r\n\t\t\t\tWHERE ( idNoticia = '$this->idNoticia')\";\r\n\t\t// si hay un problema con la query se envia un mensaje de error en la modificacion\r\n if (!($resultado = $this->mysqli->query($sql))){\r\n\t\t\treturn 'Error en la modificación'; \r\n\t\t}\r\n\t\telse{ \r\n\t\t\treturn 'Modificado correctamente.';\r\n\t\t\t\r\n\t\t}\r\n }\r\n else // si no se encuentra la tupla se manda el mensaje de que no existe la tupla\r\n \treturn 'No existe en la base de datos';\r\n}",
"public function edit( $id ) {\n\t\t//\n\t}",
"public function edit( $id ) {\n\t\t//\n\t}",
"public function edit(){\n $factura = parent::find($_GET['id']);\n require_once 'views/employee/layouts/header.php';\n require_once 'views/employee/factura/edit.php';\n require_once 'views/employee/layouts/footer.php';\n\n }",
"function edit_info($page, $id, $edit) {\r\n \r\n $this->db->where('id', $id);\r\n $this->db->update($page, $edit);\r\n }",
"public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }",
"function edit($tablename, $edit_field, $edit_value, $find_field = \"\", $find_value = \"\") {\r\n if (($find_field == \"\") && ($find_value == \"\")) {\r\n $query = \"update $tablename set $edit_field = '$edit_value';\";\r\n return $this->makeQuery($query);\r\n } else if (($find_field != \"\") && ($find_value != \"\")) {\r\n $query = \"update $tablename set $edit_field = '$edit_value' where $find_field = '$find_value';\";\r\n //echo $query;\r\n return $this->makeQuery($query);\r\n }\r\n }",
"public function edit()\n {\n \n }",
"public function edit($id) {\n\t\t//\n\t}",
"public function edit($id) {\n\t\t//\n\t}",
"public function edit($id) {\n\t\t//\n\t}",
"public function edit($id) {\n\t\t//\n\t}",
"public function edit($id) {\n\t\t//\n\t}",
"public function edit($id) {\n\t\t//\n\t}",
"public function edit($id) {\n\t\t//\n\t}",
"public function edit($id) {\n\t\t//\n\t}",
"public function edit($id) {\n\t\t//\n\t}",
"public function edit($id) {\n\t\t//\n\t}",
"public function edit(Record $record)\n {\n //\n }",
"public function display_edit_form(){\n echo \"<form action='../../Controllers/charity_controller.class.php?action=update' method='post'>\";\n echo \"<input type='hidden' name='id' value=\".$this->id.\" />\";\n echo \"Name: <input type='text' name='name' value=\".$this->name.\" /><br />\";\n echo \"Description: <textarea name='description'>\".$this->description.\"</textarea><br />\";\n echo \"<input type='submit' value='Update' />\";\n echo \"</form>\";\n }",
"public function edit($id){\n\t\t//\n\t}",
"public function edit($id){\n\t\t//\n\t}",
"public function editAction() {}",
"public function edit()\n {\n \n \n }",
"public function edit() {\n }",
"public function edit(JournalEntry $entry)\n {\n //\n }",
"public function edit($id) {\n\t\t\n\t}",
"function editinventory()\n {\n\t$conn = db();\n\n $inv_id = strip_tags($_POST[\"inv_id\"]);\n?>\n\n<html>\n <head>\n\n <link rel=\"stylesheet\" type=\"text/css\" href=\"../ItemselectionSection/item_css/edit_inv.css\"/>\n\n </head>\n <body>\n <fieldset id=\"pageheader_fieldset\" style=\"border:none; font-size: 35px;\">\n\t\tInventory Edit\n </fieldset>\n <div id = \"main_div\">\n <div id=\"form_div\">\n <form method= \"post\" action =\"<?= htmlentities($_SERVER['PHP_SELF'], ENT_QUOTES) ?>\" id=\"inv_edit\">\n <fieldset id=\"holds_info_inv_set\">\n<?php\n//inventory query\n\t\t\tforeach($conn->query(\"SELECT inv_name, cat_id, stu_day_price, day_price, stu_weekend_price, weekend_price, stu_week_price, week_price\n\t\t\t\t\t\t\t\t\tFROM Inventory\n\t\t\t\t\t\t\t\t\tWHERE inv_id = '$inv_id'\") as $row)\n\t\t\t{\n\t\t\t\t$curr_inv_name = $row[\"inv_name\"];\n\t\t\t\t$curr_cat_id = $row[\"cat_id\"];\n\t\t\t\t$curr_stu_day_price = $row[\"stu_day_price\"];\n\t\t\t\t$curr_day_price = $row[\"day_price\"];\n\t\t\t\t$curr_student_weekend_price = $row[\"stu_weekend_price\"];\n\t\t\t\t$curr_weekend_price = $row[\"weekend_price\"];\n\t\t\t\t$curr_stu_week_price = $row[\"stu_week_price\"];\n\t\t\t\t$curr_week_price = $row[\"week_price\"];\n\t\t\t}\n ?>\n\t\t\t<fieldset id=\"inv_name_fieldset\" style=\"border:none;\">\n\t\t\t\t<label id=\"inv_lable\">Inventory Name:</label><br/>\n\t\t\t\t<input type = \"text\" name = \"curr_inv_name\" id = \"curr_inv_name\" value =\"<?= $curr_inv_name ?>\" />\n\t\t\t</fieldset>\n\n\t\t\t<fieldset id=\"cat_fieldset\" style=\"border:none;\">\n\t\t\t\t<label id=\"inv_lable\">Category:</label><br/> \n\t\t\t\t<select name = \"cat_select\" id=\"cat_select\" size=\"1\" required >\n<?php\n\t\t\t\t\t//Category query\n\t\t\t\t\tforeach($conn->query(\"SELECT cat_id, cat_name\n\t\t\t\t\t\t\t\t\t\t\tFROM Category\") as $row)\n\t\t\t\t\t{\n\t\t\t\t\t\t$cur_cat_name = $row[\"cat_name\"];\n\t\t\t\t\t\t$cur_cat_id = $row[\"cat_id\"];\n\t\t\t\t\t\t// what I need to do is get the original status of the item to fill this box.\n?>\n\t\t\t\t\t\t<option id ='catinv' value =\"<?= $cur_cat_id ?>\"> <?=$cur_cat_name?> </option>\n\n<?php\n\t\t\t\t\t}\n?>\n\t\t\t\t</select><br/>\n\t\t\t</fieldset>\n\n\t\t\t<fieldset id=\"stu_day_price_fieldset\" style=\"border:none;\">\n\t\t\t <label id=\"inv_lable\">Student Day Price:</label><br/> <input type = \"text\" name = \"curr_stu_day_price\" id = \"curr_stu_day_price\" value =\"<?= $curr_stu_day_price ?>\" /><br/>\n\t\t\t</fieldset>\n\n\t\t\t<fieldset id=\"reg_day_price_fieldset\" style=\"border:none;\">\n\t\t\t <label id=\"inv_lable\">Regular Day Price:</label><br/> <input type = \"text\" name = \"curr_day_price\" id = \"curr_day_price\" value =\"<?= $curr_day_price ?>\" /><br/>\n\t\t\t</fieldset>\n\n\t\t\t<fieldset id=\"stu_weekend_price_fieldset\" style=\"border:none;\">\n\t\t\t <label id=\"inv_lable\">Student Weekend Price:</label><br/> <input type = \"text\" name = \"curr_stu_weekend_price\" id = \"curr_stu_weekend_price\" value =\"<?= $curr_student_weekend_price ?>\" /><br/>\n\t\t\t</fieldset>\n\n\t\t\t<fieldset id=\"regular_weekend_price_fieldset\" style=\"border:none;\">\n\t\t\t <label id=\"inv_lable\">Regular Weekend Price:</label><br/> <input type = \"text\" name = \"curr_weekend_price\" id = \"curr_weekend_price\" value =\"<?= $curr_weekend_price ?>\" /><br/>\n\t\t\t</fieldset>\n\n\t\t\t<fieldset id=\"stu_week_price_fieldset\" style=\"border:none;\">\n\t\t\t <label id=\"inv_lable\">Student Week Price:</label><br/> <input type = \"text\" name = \"curr_stu_week_price\" id = \"curr_stu_week_price\" value =\"<?= $curr_stu_week_price ?>\" /><br/>\n\t\t\t</fieldset>\n\n\t\t\t<fieldset id=\"regular_week_price_fieldset\" style=\"border:none;\">\n\t\t\t <label id=\"inv_lable\">Regular Week Price:</label><br/> <input type = \"text\" name = \"curr_week_price\" id = \"curr_week_price\" value =\"<?= $curr_week_price ?>\" /><br/>\n\t\t\t</fieldset>\n\n </fieldset>\n </div>\n <div id=\"button_div\">\n <fieldset id=\"holds_buttons\">\n <input type=\"submit\" name=\"updateInv\" id=\"updateInv\" value = \"Update\"/>\n <input type=\"submit\" name=\"removeInv\" id=\"removeInv\" value = \"Remove\" onclick = \"return remove()\"/><br />\n <input type=\"submit\" name=\"cancel_inv_edit\" id=\"cancel_inv_edit\" value =\"Cancel\" /><br />\n </fieldset>\n </form>\n </div>\n </div>\n\n </body>\n\n <script type=\"text/javascript\">\n //creates an inv_id input object and appends the current inv_id value passed from the $_POST array\n $(function(){\n $('<input>').attr({\n type: 'hidden',\n id:'inv_id',\n name: 'inv_id'\n }).appendTo('#inv_edit');\n var hold_this = \"<?php echo $inv_id?>\";\n $(\"#inv_id\").val(hold_this);\n });\n </script>\n\t\n <script type=\"text/javascript\">\n //fucntion meant to warn the user that they are going to delete an item from the database\n function remove(){\n var inv_name = \"<?php echo $curr_inv_name ?>\"\n if(confirm(\"You're about to delete \" + inv_name + \". Continue?\")){\n return true;\n }else{\n return false;\n }\n }\n </script>\n\n <script type=\"text/javascript\">\n //appends current cat_id to it's input object\n $(document).ready(function(){\n var curr_cat = \"<?php echo $curr_cat_id ?>\"\n $(\"#cat_select\").val(curr_cat);\n });\n </script>\n\t\n</html>\n\n\n<?php\n//close connection of database\n$conn = null;\n\n}",
"public function edit($id)\n\t{\t\t\n\n\t}",
"protected function _edit(){\n\t\treturn $this->_editForm();\n\t}",
"function renderForm($user_id,$name,$surname,$cellNumber,$address,$nickname,$email,$password, $error)\n {\n ?>\n <!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n <html>\n <head>\n <p></p>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"style.css\" />\n <title>Edit Record</title>\n </head>\n <body>\n <?php \n // if there are any errors, display them\n if ($error != '')\n {\n echo '<div style=\"padding:4px; border:1px solid red; color:red;\">'.$error.'</div>';\n }\n ?> \n \n <form action=\"\" method=\"post\">\n <input type=\"hidden\" name=\"id\" value=\"<?php echo $user_id; ?>\"/>\n <div>\n <p> </p>\n<p> </p>\n <h3> </h3>\n <p> </p>\n <p> </p>\n <p> </p>\n <table width=\"348\" border=\"1\">\n <tr>\n <td bgcolor=\"#CCCCFF\"><h1><strong>Edit the Customer details</strong></h1></td>\n </tr>\n </table>\n <p> </p>\n <p> </p>\n <p> </p>\n <p> </p>\n <p> </p>\n <table width=\"244\" border=\"1\">\n <tr>\n <td colspan=\"2\"><div align=\"center\">\n <h3> </h3>\n </div></td>\n </tr>\n <tr>\n <td bgcolor=\"#FFFFFF\"><strong>ID</strong></td>\n <td bgcolor=\"#FFFFFF\"><?php echo $user_id; ?></td>\n </tr>\n <tr>\n <td bgcolor=\"#FFFFFF\"><strong>Name</strong></td>\n <td bgcolor=\"#FFFFFF\"><input type=\"text\" name=\"name\" value=\"<?php echo $name; ?>\"/></td>\n </tr>\n <tr>\n <td bgcolor=\"#FFFFFF\"><strong>Surname</strong></td>\n <td bgcolor=\"#FFFFFF\"><input name=\"surname\" type=\"text\" id=\"surname\" value=\"<?php echo $surname; ?>\"/></td>\n </tr>\n <tr>\n <td bgcolor=\"#FFFFFF\"><strong>Cell Number</strong></td>\n <td bgcolor=\"#FFFFFF\"><input name=\"number\" type=\"text\" id=\"number\" value=\"<?php echo $cellNumber; ?>\"/></td>\n </tr>\n <tr>\n <td bgcolor=\"#FFFFFF\"><strong>Address</strong></td>\n <td bgcolor=\"#FFFFFF\"><input name=\"address\" type=\"text\" id=\"address\" value=\"<?php echo $address; ?>\"/></td>\n </tr>\n <tr>\n <td bgcolor=\"#FFFFFF\"><strong>Nickname</strong></td>\n <td bgcolor=\"#FFFFFF\"><input name=\"nickname\" type=\"text\" id=\"nickname\" value=\"<?php echo $nickname; ?>\"/></td>\n </tr>\n <tr>\n <td bgcolor=\"#FFFFFF\"><strong>Email</strong></td>\n <td bgcolor=\"#FFFFFF\"><input name=\"email\" type=\"text\" id=\"email\" value=\"<?php echo $email; ?>\"/></td>\n </tr>\n <tr>\n <td bgcolor=\"#FFFFFF\"><strong>Password</strong></td>\n <td bgcolor=\"#FFFFFF\"><input name=\"password\" type=\"text\" id=\"password\" value=\"<?php echo $password; ?>\"/></td>\n </tr>\n <tr>\n <td> </td>\n <td><input type=\"submit\" name=\"submit\" value=\"Submit\"></td>\n </tr>\n <tr>\n <td colspan=\"2\"><h3><a href=\"smallView.php\"><strong>View all</strong></a> || <a href=\"index.html\">Log out</a> || <a href=\"smallAdminArea.php\">Admin Home</a></h3></td>\n </tr>\n </table>\n <p> </p>\n <p><br/>\n <br/>\n \n </p>\n <p> </p>\n </div>\n </form> \n </body>\n </html> \n <?php\n }",
"public function editRecord() {\n \n $permissions = $this->permission();\n $access = FALSE;\n foreach ($permissions as $per) {\n if ($per->permission == 'user-edit') {\n $access = TRUE;\n break;\n }\n }\n if ($access) {\n $id = $this->uri->segment(3);\n $user = $this->UserModel->getRecord($id);\n $permission_group = $this->UserModel->getUserType($user->id);\n $user->user_role = $permission_group->user_type;\n $this->data['result'] = $user;\n $this->set_view('user/edit_record_page',$this->data);\n } else {\n echo \"access denied\";\n }\n }",
"public function edit( $id ) {\n\n\t}",
"public function edit()\n { \n }",
"public function edit()\n {\n }",
"public function edit()\n {\n }",
"public function edit()\n {\n }",
"function doedit(){\r\n\t\tif(!isset($this->post['editsubmit'])){\r\n\t\t\t$did=isset($this->get[2])?$this->get[2]:'';\r\n\t\t\tif(!is_numeric($did)){\r\n\t\t\t\t$this->message($this->view->lang['docIdMustNum'],'BACK');\r\n\t\t\t}\r\n\t\t\t$focus=$this->db->fetch_by_field('focus','did',$did);\r\n\t\t\t$focus['time']=$this->date($focus['time']);\r\n\t\t\t$this->view->assign(\"focus\",$focus);\r\n\t\t\t$this->view->display(\"admin_focus_content\");\r\n\t\t}else{\r\n\t\t\t$did=isset($this->post['did'])?$this->post['did']:'';\r\n\t\t\tif(!is_numeric($did)){\r\n\t\t\t\t$this->message($this->view->lang['docIdMustNum'],'BACK');\r\n\t\t\t}\r\n\t\t\t$summary=_string::hiconv($this->post['summary']);\r\n\t\t\t$image=_string::hiconv($this->post['image']);\r\n\t\t\t$order=$this->post['displayorder'];\r\n\t\t\t$type=$this->post['doctype'];\r\n\t\t\tif(is_numeric($order)&&$_ENV['doc']->save_focus_content($did,$summary,$image,$order,$type)){\r\n\t\t\t\t$this->cache->removecache('data_'.$GLOBALS['theme'].'_index');\r\n\t\t\t\t$this->message($this->view->lang['docEditSuccess'],\"index.php?admin_focus-edit-$did\");\r\n\t\t\t}else{\r\n\t\t\t\t$this->message($this->view->lang['docEditFail'],'BACK');\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public function edit($id)\n\t{\n\t\t\n\t}",
"public function edit($id)\n\t{\n\t\t\n\t}",
"public function edit()\n {\n \n }",
"public function edit()\n {\n \n }",
"public function edit()\n {\n \n }",
"public function edit()\n {\n //\n }",
"public function edit()\n {\n //\n }",
"public function edit()\n {\n //\n }",
"public function edit()\n {\n //\n }",
"public function edit()\n {\n //\n }",
"public function edit()\n {\n //\n }",
"public function edit()\n {\n //\n }",
"public function edit()\n {\n //\n }",
"public function edit()\n {\n //\n }",
"public function edit()\n {\n //\n }",
"public function edit()\n {\n //\n }",
"public function edit()\n {\n //\n }",
"public function edit() {\n// user must be logged in\n if (User::is_logged_in()) {\n// preventing double submitting\n $token = md5(time());\n $_SESSION[$token] = true;\n\n $user_id = $_SESSION['user_id'];\n $is_admin = isset($_SESSION['is_admin']) && $_SESSION['is_admin'];\n $post_id = $_GET['post_id'];\n $post = Post::find($post_id);\n\n $description = $post['description'];\n $categoryId = $post['category'];\n $imageFile = $post['imageFile'];\n// user can edit only his post or he must be an admin\n if ($user_id == $post['authorId'] || $is_admin) {\n // get all categories for the select box in form\n $categories = Category::all();\n// show post edit form\n require_once('views/posts/edit.php');\n }\n }\n }",
"public function edit($id)\n\t{\n\t\t//\n\t}",
"public function edit($id)\n\t{\n\t\t//\n\t}",
"public function edit($id)\n\t{\n\t\t//\n\t}",
"public function edit($id)\n\t{\n\t\t//\n\t}",
"public function edit($id)\n\t{\n\t\t//\n\t}",
"public function edit($id)\n\t{\n\t\t//\n\t}",
"public function edit($id)\n\t{\n\t\t//\n\t}",
"public function edit($id)\n\t{\n\t\t//\n\t}",
"public function edit($id)\n\t{\n\t\t//\n\t}",
"public function edit($id)\n\t{\n\t\t//\n\t}",
"public function edit($id)\n\t{\n\t\t//\n\t}",
"public function edit($id)\n\t{\n\t\t//\n\t}",
"public function edit($id)\n\t{\n\t\t//\n\t}",
"public function edit($id)\n\t{\n\t\t//\n\t}",
"public function edit($id)\n\t{\n\t\t//\n\t}",
"public function edit($id)\n\t{\n\t\t//\n\t}"
] | [
"0.7816347",
"0.7596679",
"0.7523736",
"0.7507866",
"0.74850917",
"0.7484996",
"0.73916554",
"0.73578036",
"0.7320455",
"0.72522503",
"0.72508174",
"0.7244742",
"0.71608883",
"0.71302754",
"0.7108273",
"0.7108121",
"0.71059984",
"0.71059984",
"0.7095917",
"0.7095345",
"0.7091954",
"0.7079787",
"0.70790595",
"0.70784277",
"0.70719725",
"0.7071771",
"0.7059909",
"0.7049222",
"0.7043304",
"0.70381016",
"0.7035023",
"0.7035023",
"0.7016057",
"0.70154256",
"0.70131886",
"0.70047456",
"0.700382",
"0.69793934",
"0.69793934",
"0.69793934",
"0.69793934",
"0.69793934",
"0.69793934",
"0.69793934",
"0.69793934",
"0.69793934",
"0.69793934",
"0.6976383",
"0.6971602",
"0.6967385",
"0.6967385",
"0.6960414",
"0.6950197",
"0.69418657",
"0.6927957",
"0.6924508",
"0.692122",
"0.69193184",
"0.6914387",
"0.6903982",
"0.689163",
"0.6885931",
"0.688385",
"0.6873236",
"0.6873236",
"0.6873236",
"0.6872189",
"0.6872112",
"0.6872112",
"0.68662614",
"0.68662614",
"0.68662614",
"0.68624467",
"0.68624467",
"0.68624467",
"0.68624467",
"0.68624467",
"0.68624467",
"0.68624467",
"0.68624467",
"0.68624467",
"0.68624467",
"0.68624467",
"0.68624467",
"0.68623877",
"0.6857486",
"0.6857486",
"0.6857486",
"0.6857486",
"0.6857486",
"0.6857486",
"0.6857486",
"0.6857486",
"0.6857486",
"0.6857486",
"0.6857486",
"0.6857486",
"0.6857486",
"0.6857486",
"0.6857486",
"0.6857486"
] | 0.0 | -1 |
default functin, redirects to login page if no teacher logged in yet | public function index()
{
if ($this->session->userdata('is_login') != 1)
redirect(site_url('login'), 'refresh');
if ($this->session->userdata('etutor_login') == 1)
redirect(site_url('etutor/dashboard'), 'refresh');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function index() {\n if ($this->session->userdata('teacher_login') != 1)\n redirect(base_url() . 'login', 'refresh');\n if ($this->session->userdata('teacher_login') == 1)\n redirect(base_url() . 'teacher/dashboard', 'refresh');\n }",
"public function index()\n {\n if ($this->session->userdata('teacher_login') != 1)\n redirect(base_url() . 'index.php?login', 'refresh');\n if ($this->session->userdata('teacher_login') == 1)\n redirect(base_url() . 'index.php?teacher/dashboard', 'refresh');\n }",
"public function index(){\n\n\t\t$this->session->unset_userdata('teach_id');\n\t\t$data['title_page'] = 'Teacher | Login';\n\t\t$this->load->view('teach/login_teach', $data);\n\t}",
"public function isTeacher(){\n\t\t// get user type\n\t\t$session_data = $this->session->userdata('logged_in'); // get userid from session\n\t\t\t\n\t\t// redirect to home if user is not a student\n\t\tif($session_data['usertype']!=2) redirect('/home');\n\t}",
"function template_redirect() {\r\n\t\tappthemes_auth_redirect_login();\r\n\t}",
"function check_for_tutor() {\n\tif ( $_SESSION[\"user_level\"] != ADMIN && $_SESSION[\"user_level\"] != TUTOR) {\n\t\theader ('Location: index.php');\n\t}\n}",
"function login() \n\t{\n // Specify the navigation column's path so we can include it based\n // on the action being rendered\n \n \n // check for cookies and if set validate and redirect to corresponding page\n\t\t$this->viewData['navigationPath'] = $this->getNavigationPath('users');\n\t\t$this->renderWithTemplate('users/login', 'MemberPageBaseTemplate');\n\t\t\n }",
"public function requireLogin(){\n if( ! Authentifiacation::isLoggedIn()){\n Authentifiacation::rememberRequestedPage();\n Flash::addMessage('You need to login to view this page', Flash::INFO);\n self::redirect('/login/new');\n }\n }",
"public function login_page()\n\t{\n\t\t$this->redirect( EagleAdminRoute::get_login_route() );\n\t}",
"public function index()\n {\n\n if ($this->session->userdata('admin_hudai') == 1)\n redirect(base_url() . 'index.php?admin/dashboard', 'refresh');\n\n if ($this->session->userdata('teacher_login') == 1)\n redirect(base_url() . 'index.php?teacher/dashboard', 'refresh');\n\n if ($this->session->userdata('student_login') == 1)\n redirect(base_url() . 'index.php?student/dashboard', 'refresh');\n\n if ($this->session->userdata('parent_login') == 1)\n redirect(base_url() . 'index.php?parents/dashboard', 'refresh');\n\n $this->load->view('backend/login');\n\n }",
"public function login(){\n \t\t//TODO redirect if user already logged in\n \t\t//TODO Seut up a form\n \t\t//TODO Try to log in\n \t\t//TODO Redirect\n \t\t//TODO Error message\n \t\t//TODO Set subview and load layout\n\n \t}",
"public function showTeacherLoginForm()\n {\n return view('auth.login');\n }",
"function login(){\n\t\t$role = $this->session->userdata('role');\n\t\tif(empty( $role )):\n\t\t\t$this->load->view('site/simple-header');\n\t\t\t$this->load->view('site/login');\n\t\t\t$this->load->view('site/simple-footer');\n\t\telse:\n\t\t\tredirect( base_url() );\n\t\tendif;\n\t}",
"public function __construct(){\n parent::__construct();\n $this->lang->load('general', $this->session->lang); \n if($this->session->role != \"teacher\"){\n \tredirect(\"student\");\n }\n }",
"public function index()\n {\n if ($this->session->userdata('pre_student_login') != 1)\n redirect(site_url('login'), 'refresh');\n if ($this->session->userdata('pre_student_login') == 1)\n redirect(site_url('pre_student/dashboard'), 'refresh');\n }",
"protected function redirectTo(){\n //if all it's ok, then verify the saved user into the tables, if doesn't in t_worker then search to t_student\n //where to found redirect to the view\n if(Auth::user()->role === 'E')\n return 'vDocente/welcome';\n elseif(Auth::user()->role === 'S')\n return 'vAlumno/welcome';\n }",
"public function Professional(){\n\t\tparent::__construct();\n\t\tif($this->session->userdata(\"userdetails\")==NULL){\n\t\t\tredirect(base_url());\n\t\t}\n\t\telse{\n\t\t\t$obj=$this->session->userdata(\"loggedinas\");\n\t\t\tif($obj==\"student\"){\n\t\t\t\tredirect(\"student/home\");\n\t\t\t}elseif($obj==\"teacher\"){\n\t\t\t\tredirect(\"teacher/home\");\n\t\t\t}elseif($obj==\"tpo\"){\n\t\t\t\tredirect(\"tpo/home\");\n\t\t\t}\n\t\t}\n\t}",
"public static function authPage(){\n\t\tif(!self::isLogged()){\n\t\t\theader(\"Location: login.php?required\");\n\t\t\texit;\n\t\t}\n\t}",
"function staff_alllogin() {\n \n $this->setLoginRedirects();\n \n $this->layout = 'login_layout';\n\t\t// Display error message on failed authentication\n\t\tif (!empty($this->data) && !$this->Auth->_loggedIn) {\n\t\t\t$this->Session->setFlash($this->Auth->loginError);\n $this->redirect(\"http://\" . $_SERVER['HTTP_HOST']);\n\t\t}else{\n $this->redirect(\"http://\" . $_SERVER['HTTP_HOST']);\n }\n\t\t// Redirect the logged in user to respective pages\n\t\t\n\t}",
"public function loginForm()\n {\n\n if (isset($_SESSION['login_ss'])) {\n header('location: http://localhost/nhi_mvc/index/students');\n exit();\n }\n $this->view->render(\"login/login\");\n }",
"public function index()\n\t{\n\t\t// Replaced by combined teacher interface\n\t\treturn Redirect::route('teacher.index');\n\t}",
"public function authDoView(){\n if(!$this->authUser()){\n echo '{\"status\":-1,\"result\":\"/user/login?prePage='.$_SERVER['HTTP_REFERER'].'\"}';\n exit();\n }\n }",
"function login() {\n $this->layout = \"no_header\";\n $this->Auth->loginRedirect = array('controller' => 'pages', 'action' => 'display', \"home\");\n }",
"function login() {\n\n $this->redirect(\"/staff/users/alllogin\");\n \n $this->layout = 'login_layout';\n\t\t// Display error message on failed authentication\n\t\tif (!empty($this->data) && !$this->Auth->_loggedIn) {\n\t\t\t$this->Session->setFlash($this->Auth->loginError);\t\t\t\n\t\t}\n\t\t// Redirect the logged in user to respective pages\n\t\t$this->setLoginRedirects();\n\t}",
"function check_if_student_logged(){\n\t\tglobal $url_home;\n\t\tglobal $current;\n\t\tif(!isset($_SESSION['id_korisnika']) && $current != \"login.php\" && $current != \"register.php\" && $current != \"reset.php\") header('Location: '.$url_home.'user/login.php');\n\t\telse if(isset($_SESSION['id_korisnika']) && ($current == \"login.php\" || $current == \"reset.php\" || $current == \"register.php\")) header('Location: '.$url_home.'user');\n\t}",
"public function dologinpage()\n\t\t{\n\t\t\t$userdata = array(\n\t\t\t\t'email' => Input::get('email'),\n\t\t\t\t'password' => Input::get('password')\n\t\t\t);\n\n\t\t\tif(Auth::attempt($userdata)) {\n\t\t\t\tSession::flash('successMessage', \"Welcome back, \" . Auth::user()->username . \"!\");\n\t\t\t\tSession::put('loggedinuser', Auth::user()->username);\n\t\t\t\treturn Redirect::intended('/posts');\n\t\t\t\t// $userid = DB::table('users')->where('username', Session::get('loggedinuser'))->pluck('id');\n\t\t\t\t// Session::put('loggedinid', $userid);\n\t\t\t\t\n\t\t\t\t// return Redirect::action('PostsController@index');\n\t\t\t} else {\n\t\t\t\tSession::flash('errorMessage', 'Your username or password is incorrect');\n\t\t\t\treturn Redirect::to('login');\n\t\t\t}\n\t\t}",
"public function login(){\n\t\tif($this->request->is('post'))\n\t\t{\n\t\t\t/*if($this->Auth->login())\n\t\t\t{\n\t\t\t\tif($current_user['role'] == 'admin')\n\t\t\t\t{\n\t\t\t\t\treturn $this->redirect(array('controller' => 'teams','action' => 'index'));\n\t\t\t\t}\n\t\t\t} */\n\t\t\tif($this->Auth->login())\n\t\t\t{\n\t\t\t\treturn $this->redirect($this->Auth->redirectUrl());\n\t\t\t}\n\t\t\t$this->Session->setFlash('Usuario incorrecto');\n\t\t}\n\t}",
"function Admin_authetic(){\n\t\t\t\n\t\tif(!$_SESSION['adminid']) {\n\t\t\t$this->redirectUrl(\"login.php\");\n\t\t}\n\t}",
"public function __construct()\n\t{\n\t\tparent:: __construct();\n\t\tif ($this->session->userdata('admin')) {\n\t\t\tredirect(base_url('admin'));\n\t\t}\n\t\tif ($this->session->userdata('teacher')) {\n\t\t\tredirect(base_url('teacher'));\n\t\t}\n\t}",
"public function teacherLogin(LoginRequest $request)\n {\n $validated = $request->validated();\n $remember = $request->has('remember');\n \n if (Auth::guard('teacher')->attempt($validated, $remember)) {\n return redirect()->route('teacher.dashboard');\n }\n\n return redirect()\n ->route('login.teacher')\n ->with('msg', 'Tên đăng nhập hoặc mật khẩu không chính xác');\n }",
"public function loginPost(){\n\t\t\tif($this->modelLogin())\n\t\t\t\techo \"<script>location.href='home';</script>\";\n\t\t\telse\n\t\t\t\techo \"<script>location.href='login/register-fail';</script>\";\n\t\t}",
"public function home(){\n\t\t//debug($this->Session->read('Auth.User'));\n\t\t//juste verifier :\n\t\t//debug($this->Session->check('Auth.User'));\n\t\tif($this->Session->check('Auth.User')){\n\t\t\tif($this->Session->read('Auth.User.role')=='admin'){\n\t\t\t\t$this->redirect('/admins/home');\n\t\t\t}\n\t\t\telse{\n\n\t\t\t}\n\t\t}\n\t\telse {\n\n\t\t}\n\t}",
"public function actionLogin()\r\n\t{\r\n\t $this->redirect(array('//user/auth'));\r\n\t}",
"function requires_login()\n {\n $user = user();\n \n if ( empty( $user ) )\n {\n // no user id found, send to login\n Utility::redirect( Utility::login_url() );\n }\n }",
"public function init()\n { \n if(isset($_POST['LoginStaff']) && $this->_mErrors == 0)\n {\n /*\n 0 = teacher exists, email and password all correct\n 1 = teacher exists, but email or password invalid \n 2 = teacher does not exist//\n */\n $login_status = Customer::IsValidStaff($this->mStaffEmail, $this->mStaffPassword);\n switch ($login_status) {\n case 2:\n $this->mWarnErrorMsg = 'Unauthorized Access';\n break;\n case 1:\n $this->mWarnErrorMsg = 'Staff Access only';\n break;\n case 0:\n /*\n Every login credential is good \n but we need to know if has been activated\n */\n $staff_id = (int)$_SESSION['schoolshop_staff_id']; \n $staff_status = Customer::GetStaffStatusForLogin($staff_id);\n $this->mCurrentStaffStatus = (int)$staff_status['status'];\n\n if($this->mCurrentStaffStatus == 6)\n {\n //Redirect to the Teachers class \n //if(empty($_SESSION['staff_admin_logged']))\n $_SESSION['staff_admin_logged'] = true;\n \n $redirect_to = Link::ToTeachersClassPage();\n header('Location: ' . $redirect_to);\n exit();\n break;\n }\n \n break;\n \n default:\n # code...Take him to the front page \n $redirect_to = $this->mSiteUrl;\n header('Location: ' . $redirect_to);\n \n break;\n }\n\n\n }\n\n }",
"public function optional_login_test()\r\n\t{\r\n\t\tif( $this->verify_min_level(1) )\r\n\t\t{\r\n\t\t\t$page_content = '<p>Although not required, you are logged in!</p>';\r\n\t\t}\r\n\t\telseif( $this->tokens->match && $this->optional_login() )\r\n\t\t{\r\n\t\t\t// Let Community Auth handle the login attempt ...\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t// Notice parameter set to TRUE, which designates this as an optional login\r\n\t\t\t$this->setup_login_form(TRUE);\r\n\r\n\t\t\t$page_content = '<p>You are not logged in, but can still see this page.</p>';\r\n\r\n\t\t\t// Form helper needed\r\n\t\t\t$this->load->helper('form');\r\n\r\n\t\t\t$page_content .= $this->load->view('examples/login_form', '', TRUE);\r\n\t\t}\r\n\r\n\t\techo $this->load->view('examples/page_header', '', TRUE);\r\n\r\n\t\techo $page_content;\r\n\r\n\t\techo $this->load->view('examples/page_footer', '', TRUE);\r\n\t}",
"public function home(){\n\n\t\t# this will be the home of the teacher this session is now global\n\t\t$data['title_page'] ='Teacher| Home';\n\t\t$id = $this->session->userdata('teach_id');\n\n\t\tif ($id != 0) {\n\n\t\t\t$data['teach_dat'] = $this->teach_F->get_teach_dat($id);\n\t\t\t$this->load->view('teach/teach_home', $data);\n\t\t}\n\t\telse{\n\n\t\t\tredirect(site_url('teacher'));\n\t\t}\n\t\t\n\t}",
"public function index() {\n\n if ($this->session->userdata('admin_login') == 1)\n redirect(base_url() . 'admin/dashboard', 'refresh');\n\n if ($this->session->userdata('teacher_login') == 1)\n redirect(base_url() . 'teacher/dashboard', 'refresh');\n\n if ($this->session->userdata('student_login') == 1)\n redirect(base_url() . 'student/dashboard', 'refresh');\n\n if ($this->session->userdata('parent_login') == 1)\n redirect(base_url() . 'parents/dashboard', 'refresh');\n\n if ($this->session->userdata('librarian_login') == 1)\n redirect(base_url() . 'librarian/dashboard', 'refresh');\n\n if ($this->session->userdata('accountant_login') == 1)\n redirect(base_url() . 'accountant/dashboard', 'refresh');\n\n $this->load->view('backend/login');\n }",
"public function login()\n\t{\n\t\tredirect($this->config->item('bizz_url_ui'));\n\t\t// show_404();\n\t\t// ////import helpers and models\n\n\t\t// ////get data from database\n\n\t\t// //set page info\n\t\t// $pageInfo['pageName'] = strtolower(__FUNCTION__);\n\n\t\t// ////sort\n\t\t\n\t\t// //render\n\t\t// $this->_render($pageInfo);\n\t}",
"public function restrict() {\n\t\tif (!$this->is_logged_in()) {\n\t\t\tredirect('login', 'refresh');\n\t\t}\n\t}",
"public function actionLogin()\n\t{\n\t\tif ($this->getUser()->isLoggedIn())\n\t\t\t$this->redirect('Administration:default');\n\t}",
"public function redirectTo(){\n //ask if there is into t_worker\n //t_worker::where('id_worker',Auth::user()->id)->first();\n if(Auth::user()->role === 'R')\n return 'vResponsable/welcome';\n elseif(Auth::user()->role === 'E')\n return 'vDocente/welcome'; //otherwise return the docente view \n elseif(Auth::user()->role === 'S') ////ask if there is into t_student : esto tenia antes elseif(t_student::find($id_user))\n return 'vAlumno/welcome';//if there is then return the view\n }",
"public function index() {\n\t\tif(!$this->user) {\n\t\t\tRouter::redirect('/users/login');\n\t\t}else{\n\t\t\tRouter::redirect('/users/profile');\t\n\t\t}\n\t}",
"public function login()\n\t{\n\t\tif (isLogin()) {\n\t\t\tredirect('/backoffice');\n\t\t} else {\n\t\t\t$this->display(\n\t\t\t\t'backoffice/login.html.twig'\n\t\t\t);\n\t\t}\n\n\t}",
"public function formLogin(){\n $user = $this->model->connectFromCookie();\n if ($user) {\n header('location:index.php?controller=dashboard');\n } else {\n $this->view->addFormLogin();\n }\n }",
"public function login() {\n if (isset($_SESSION['userid'])) {\n $this->redirect('?v=project&a=show');\n } else {\n $this->view->login();\n }\n }",
"public function Checklogin()\n\t{\n\t\tif ($this->session->userdata('admin_email') == '')\n\t\t{\n\t\t\tredirect('head/');\n\t\t}\n\t\n\t}",
"public function Checklogin()\n\t{\n\t\tif ($this->session->userdata('admin_email') == '')\n\t\t{\n\t\t\tredirect('head/');\n\t\t}\n\t\n\t}",
"public function CASLogin()\n {\n // if student, then redirect to the student dashboard, if sponsor redirect to sponsor dashboard\n // else admin, redirect to admin page\n if(Auth::user()->roleID === 1)\n {\n return redirect()->action('Dashboard\\DashboardController@getStudentDashboard');\n }\n elseif(Auth::user()->roleID === 2)\n {\n return redirect()->action('Dashboard\\DashboardController@getSponsorDashboard');\n }\n else\n {\n return redirect('/admin');\n }\n }",
"public function check_auth()\n {\n if (isset($_SESSION['go_level'])) {\n if ($_SESSION['go_level'] == 0 || $_SESSION['go_level'] == 3) {\n redirect(base_url().\"admin/\");\n }elseif($_SESSION['go_level'] == 2){\n redirect(base_url().\"spv/\");\n }else{\n redirect(base_url().\"permohonan/\");\n }\n }\n }",
"protected function outputLoginFormIfNotAuthorized() {}",
"private function _userLoggedIn()\n {\n $this->utility->redirect('write');\n }",
"public function authenticate()\n {\n \n // Login succeeded:\n $usertype = Auth::user()->id;\n if($usertype == 1){\n return redirect()->route('dashboard.index', array('page' => 'filmmaker')); \n }\n else\n {\n return view('welcome', array('page' => 'login')); // Login failed, show login form again\n }\n }",
"public function dispatcher() {\n if (!isset($this->session->userdata['id'])) {\n redirect('accueil', 'location', 301);\n } else {\n $userData['id'] = $this->session->userdata['id'];\n if ($this->user_model->isRole($userData['id'], 'admin')) {\n redirect('backoffice', 'location', 301);\n } elseif ($this->user_model->isRole($userData['id'], 'athlete')) {\n redirect('athlete', 'location', 301);\n } elseif ($this->user_model->isRole($userData['id'], 'user')) {\n redirect('accueil', 'location', 301);\n }\n }\n }",
"private static function rerouteCheck()\n {\n if ( ! Session::isValid()) {\n if (Session::hasTrainer()) {\n // we have a trainer but not a student\n self::computeImpliedRoute();\n } else {\n (new LoginTemplate())->display();\n }\n }\n }",
"public function index()\r\n\t{\r\n\t\tif ( $this->session->userdata('userid') and \r\n\t\t\t $this->session->userdata('pass') )\r\n\t\t{\tredirect(base_url('dashboard'));\r\n\t\t} else\r\n\t\t{\t$this->load->view('v_login');\r\n\t\t}\r\n\t}",
"function login($post)\n{\n $_GET['action'] = \"login\";\n $username = @$post['username'];\n $password = @$post['password'];\n\n //cette condition sert a vérifier si l'utilisateur a deja remplit des données ou non\n if (isset($username) && isset($password)) {\n\n //cette condition va checker ce que l'utilisateur va rentrer dans la page login est rediriger sur la page home si ce qu'il a rentrer correspond a la la fonction checkLogin dans le model.php sinon sur la page login sa sa ne corespond pas\n if (checkLogin($post)) {\n $_SESSION['MotCle'] = $post['username'];\n require \"view/home.php\";\n } else\n require \"view/login.php\";\n } else {\n require \"view/login.php\";\n }\n\n\n}",
"public function login() {\n $page = 'login';\n\n require('./View/default.php');\n }",
"protected function loginIfRequested() {}",
"function validateUser() {\n\tif (!isLoggedIn()) {\n\t\tredirectTo(\"index.php\");\n\t}\n}",
"function validate_teach(){\n\n\t\t$username = $this->input->post('teach_username');\n\t\t$pass = $this->input->post('teach_password');\n\t\t/* these will be the hoe page of teacher*/\n\t\t$Q = $this->teach_lgn->validate_teach($username, $pass);\n\n\t\tif ($Q) {\n\t\t\t\n\t\t\treturn TRUE;\n\t\t}\n\t\telse{\n\n\t\t\treturn FALSE;\n\t\t}\n\t}",
"public function logged_in_redirect(){\n\n\t\tif (isset($_SESSION['user_id'])) {\n\t\t \t# code...\n\t\t \theader('Location: index.php');\n\t\t } \n\t}",
"public function index() {\r\n if ($this->session->userdata('accountant_login') != 1)\r\n redirect(base_url() . 'index.php?login', 'refresh');\r\n if ($this->session->userdata('accountant_login') == 1)\r\n redirect(base_url() . 'index.php?admin/dashboard', 'refresh');\r\n }",
"public function isStudent(){\n\t\t// get user type\n\t\t$session_data = $this->session->userdata('logged_in'); // get userid from session\n\t\t\t\n\t\t// redirect to home if user is not a student\n\t\tif($session_data['usertype']!=0) redirect('/home');\n\t}",
"function ifLoggedIn(){\n\t\n\tif(isset($_SESSION[\"userinfo\"])){\n\t\t\n\t\t\n\t\tif($_SESSION[\"userinfo\"][\"role\"]==1){\n\t\t\tredirect(\"admin.php\");\n\t\t}\n\n\t\tif($_SESSION[\"userinfo\"][\"role\"]==2){\n\t\t\tredirect(\"member.php\");\n\t\t}\n\t\t\n\t}\n}",
"private static function isUnauthorized(){\n if (LoginHelper::isACurrentDoctor() || LoginHelper::isACurrentPatient()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n }",
"public function checkAuthentication() \n {\n if(!isset($this->userInfo['admin_id']) && empty($this->userInfo['admin_id'])) \n {\n redirect('login/loginPage');\n }\n }",
"function teacher_add_view()\n {\n if ($this->session->userdata('admin_login') != 1)\n redirect(base_url(), 'refresh');\n\n $page_data['page_name'] = 'teacher_add';\n $page_data['page_title'] = get_phrase('add_teacher');\n $this->load->view('backend/index', $page_data);\n }",
"public function MySchool() {\n // without an id we just redirect to the error page as we need the post id to find it in the database\n if (!isset($_COOKIE['login']))\n return call('pages', 'error404');\n\n // we use the given id to get the right post\n $schools = School::findSchool($_COOKIE['login']);\n require_once('views/school/show.php');\n }",
"function student_add()\n\t{\n\t\tif ($this->session->userdata('teacher_login') != 1)\n redirect(base_url(), 'refresh');\n\t\t\t\n\t\t$page_data['page_name'] = 'student_add';\n\t\t$page_data['page_title'] = get_phrase('add_student');\n\t\t$this->load->view('backend/index', $page_data);\n\t}",
"public function login()\n {\n if(is_logged_in()) {\n redirect_to(url('thread/index'));\n }\n\n $user = new User;\n $page = Param::get('page_next', 'login');\n\n switch($page) {\n case 'login':\n break;\n\n case 'lobby':\n $user->username = Param::get('username');\n $user->password = Param::get('password');\n\n try {\n $user = $user->verify();\n $_SESSION['id'] = $user['id'];\n } catch (UserNotFoundException $e) {\n $page = 'login';\n }\n break;\n\n default:\n throw new UserNotFoundException(\"User not found\");\n }\n\n $this->set(get_defined_vars());\n $this->render($page);\n }",
"function redirect_when_logged() {\n $is_logged_in = AppAuthentication::is_logged_in();\n\n // If the user is already logged in we redirect to the default path of\n // his role.\n if ($is_logged_in) {\n $user_info = AppAuthentication::get_user_data();\n redirect_to_user_default_path($user_info);\n return TRUE;\n }\n\n return FALSE;\n }",
"public function login() {\n $db = Db::getInstance();\n $user = new User($db);\n\n// preventing double submitting\n $token = self::setSubmitToken();\n\n// if user is already logged in redirect him to gallery\n if( $user->is_logged_in() ){\n call('posts', 'index');\n } else {\n// otherwise show login form\n require_once('views/login/index.php');\n// and refresh navigation (Login/Logout)\n require('views/navigation.php');\n }\n }",
"function login() {\n $this->checkAccess('user',true,true);\n\n\n $template = new Template;\n echo $template->render('header.html');\n echo $template->render('user/login.html');\n echo $template->render('footer.html');\n\n //clear error status\n $this->f3->set('SESSION.haserror', '');\n }",
"public function Authentication(){\n if($_SESSION['account'] == NULL){\n // neu khong co nghia la chua dang nhap\n // t chuyen huong ve login\n header(\"location:login\");\n }\n }",
"public function beforeRoute()\n {\n if (!Session::get('userid')) {\n \\BarkaneArts\\redirect('/login');\n }\n parent::beforeRoute();\n }",
"public function MyProfil() {\n // without an id we just redirect to the error page as we need the post id to find it in the database\n if (!isset($_COOKIE['login']))\n return call('pages', 'error404');\n\n // we use the given id to get the right post\n $schools = School::findProfil($_COOKIE['login']);\n require_once('views/school/show.php');\n }",
"public function check_auth()\n {\n if (isset($_SESSION['atk_email'])) {\n redirect(base_url().\"permintaan/\");\n }\n }",
"function login() {\n // Check is already a user is logged in or not.\n if (!isset ($_SESSION['user_id'])) {\n include('blog/site/VIEW/Login.php');\n }\n else {\n header(\"location: /index.php/User/home\");\n }\n }",
"function auth_redirect()\n {\n }",
"public function login() {\r\n if ($this->request->is('post')) {\r\n \r\n //If the user is authenticated...\r\n if ($this->Auth->login()) {\r\n \r\n if ($this->isAdmin()) $this->redirect(\"/admin/halls\");\r\n else $this->redirect(\"/halls\");\r\n }\r\n else {\r\n $this->Session->setFlash(__('Invalid username or password, try again'));\r\n }\r\n }\r\n }",
"function auth_redirect() {\n\n\t\tauth_redirect();\n\n\t}",
"function teacher_logged_in()\r\n{\r\n\r\n if (isset($_SESSION['SSN']) && !empty($_SESSION['SSN'])) {\r\n\r\n\r\n return true;\r\n } else {\r\n\r\n return false;\r\n }\r\n\r\n\r\n}",
"public function index()\n\t{\n\t\tif(is_user_active('', FALSE))\n\t\t{\n\t\t\tredirect('dashboard');\n\t\t}\n\t\t\t\t\n\t\t$data['base_url'] = base_url();\n\t\t$data['view_file'] = \"login\";\n\t\t$this->template->load_admin_login_template($data);\n\t}",
"public static function index() {\n if (Auth::hasUser()) {\n redirect('/');\n } else {\n $login_page = new View('forms/signin.php');\n $login_page->render();\n }\n }",
"public function login()\n\t{\n\t\t$this->load->view('login_main');\n\n\t}",
"function _loginRedirect(){\r\n \t// send user to the login page\r\n \theader(\"Location:/index.php\");\r\n }",
"private function checkLogin() {\n\t\t\n\t\tif ( ! $this->user_model->isLoggedIn() )\n\t\t\tredirect( base_url() . 'admin' );\n\n\t}",
"function authenticate()\n {\n if(!$this->Session->check('User'))\n {\n $this->redirect(array('controller' => 'Users', 'action' => 'login_form'));\n exit();\n }\n }",
"function first_user_as_teacher()\n {\n initialize_forge_management_permissions();\n $user = User::all()->first();\n $user->assignRole('teacher');\n }",
"public function loginAction()\r\n\t{\r\n\t\t$this->setSubTitle($this->loginSubTitle);\r\n\t\t\r\n\t\t$this->view->form = new $this->loginFormClassName();\r\n\t\t\r\n\t\t$this->checkAuth();\r\n\t}",
"public function login()\n {\n\t// if the user successfully logged in..\n\tif($this->yourauth->check() == TRUE)\n\t{\n\t session_start();\n\t $_SESSION['KCFINDER'] = array();\n\t $_SESSION['KCFINDER']['disabled'] = false;\n\n\t redirect('editor/index');\n\t}\n\n }",
"function login()\n {\n if (isset($_SESSION['username'])) {\n redirect('user/index');\n } else {\n $this->view->load('frontend/user/login');\n }\n }",
"function redirectLogin()\n\t{\n\t\tredirect('auth/login');\n\t}",
"public function index() {\n\n if ($this->session->userdata('admin_login') == 1)\n redirect(base_url() . 'index.php?admin/dashboard', 'refresh');\n \n else if ($this->session->userdata('doctor_login') == 1)\n redirect(base_url() . 'index.php?doctor', 'refresh');\n \n \n else if ($this->session->userdata('pharmacist_login') == 1)\n redirect(base_url() . 'index.php?pharmacist', 'refresh');\n \n else if ($this->session->userdata('receptionist_login') == 1)\n redirect(base_url() . 'index.php?receptionist', 'refresh');\n\n $this->load->view('backend/login');\n }",
"public function index()\n\t{\n\t\tif ($this->session->userdata('patient_login') != 1)\n\t\t\tredirect(base_url() . 'index.php?login', 'refresh');\n\t\tif ($this->session->userdata('patient_login') == 1)\n\t\t\tredirect(base_url() . 'index.php?patient/dashboard', 'refresh');\n\t}",
"public function postLogin()\t{\n\t\t$credentials = Input::only('username', 'password');\n\n\t\tif (Auth::attempt($credentials, $remember = true)) {\n\t\t\tif (Auth::user()->usertype == 'coach') {\n\t\t\t\treturn Redirect::to('/coach')->with('flash_message', 'Welcome Back Coach!');\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn Redirect::to('/home')->with('flash_message', 'Welcome Back Client!');\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\treturn Redirect::to('/login')->withInput()->with('flash_message', 'Log in failed; please try again.');\n\t\t}\n\t}",
"public function index()\n {\n if ($this->session->userdata('admin_login') != 1)\n redirect(base_url() . 'login', 'refresh');\n if ($this->session->userdata('admin_login') == 1)\n redirect(base_url() . 'admin/question_list', 'refresh');\n \n \n }",
"public function templateRedirect() {\n\t\t\n\t\t$aSessParams = session_get_cookie_params();\n\t\t\n\t\t@session_set_cookie_params(\n\t\t\t$aSessParams[ 'lifetime' ],\n\t\t\tGeko_Wp::getSessionPath(),\n\t\t\t$aSessParams[ 'domain' ],\n\t\t\t$aSessParams[ 'secure' ],\n\t\t\t$aSessParams[ 'httponly' ]\n\t\t);\n\t\t\n\t\t@session_start();\n\t\t\n\t\t$sAuthKey = sprintf( '%s-auth', $this->getPrefix() );\n\t\t\n\t\t// perform authentication\n\t\tif ( isset( $_POST[ 'user' ] ) && isset( $_POST[ 'pass' ] ) ) {\n\t\t\t\n\t\t\tif (\n\t\t\t\t( $_POST[ 'user' ] ) && ( $this->getOption( 'user' ) == $_POST[ 'user' ] ) && \n\t\t\t\t( $_POST[ 'pass' ] ) && ( $this->getOption( 'pass' ) == $_POST[ 'pass' ] )\n\t\t\t) {\n\t\t\t\t\n\t\t\t\t$_SESSION[ $sAuthKey ] = TRUE;\n\t\t\t\theader( sprintf( 'Location: %s', Geko_Uri::getFullCurrent() ) );\n\t\t\t\t\n\t\t\t\tdie();\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t$this->bLoginFailed = $bLoginFailed = TRUE;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ( $_SESSION[ $sAuthKey ] ) $this->bIsAuth = TRUE;\n\t\t\n\t\t//\n\t\tif ( !$_SESSION[ $sAuthKey ] ) {\n\t\t\t\n\t\t\t$sPath = NULL;\n\t\t\t\n\t\t\tif ( $this->getOption( 'use_custom_form' ) ) {\n\t\t\t\t\n\t\t\t\tif ( $this->sCustomFormPath ) {\n\t\t\t\t\t$sPath = $this->sCustomFormPath;\n\t\t\t\t} else {\n\t\t\t\t\t$sPath = sprintf( '%s/page_login.php', TEMPLATEPATH );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\t$sPath = sprintf( '%s/login_form.php', $this->getPluginDir() );\n\t\t\t}\n\t\t\t\n\t\t\t//\n\t\t\tif ( $sPath ) {\n\t\t\t\tinclude( $sPath );\n\t\t\t}\n\t\t\t\n\t\t\tdie();\n\t\t}\n\t}",
"public function index() {\n \tif ($this->session->userdata('user_login') != 'true')\n redirect(base_url() . 'login', 'refresh');\n if ($this->session->userdata('user_login') == 'true')\n redirect(base_url() . 'admin/dashboard', 'refresh');\n\n }"
] | [
"0.8073319",
"0.798931",
"0.72585934",
"0.7137337",
"0.6831261",
"0.6826079",
"0.67710876",
"0.6706382",
"0.6698855",
"0.66926754",
"0.66671413",
"0.6651804",
"0.6644545",
"0.66041917",
"0.6597004",
"0.6596666",
"0.65538514",
"0.65429306",
"0.65424216",
"0.6528013",
"0.652639",
"0.6525411",
"0.65022165",
"0.649174",
"0.6470969",
"0.6461027",
"0.6440036",
"0.6436421",
"0.64243466",
"0.6418885",
"0.63958764",
"0.63935906",
"0.6390013",
"0.63732886",
"0.637088",
"0.6354388",
"0.63519967",
"0.634232",
"0.63345003",
"0.6329304",
"0.63285154",
"0.63091826",
"0.6307463",
"0.6301456",
"0.62979406",
"0.62969506",
"0.62929887",
"0.62929887",
"0.62716836",
"0.6265548",
"0.6263505",
"0.6262158",
"0.62611914",
"0.62545",
"0.62528706",
"0.62516487",
"0.6250836",
"0.6248283",
"0.6247366",
"0.62361073",
"0.62304014",
"0.6226868",
"0.6225149",
"0.6224391",
"0.6217036",
"0.6213907",
"0.62138075",
"0.6210404",
"0.62041086",
"0.6202956",
"0.62022173",
"0.62012583",
"0.6196135",
"0.6195762",
"0.6179061",
"0.61695105",
"0.6168847",
"0.6161471",
"0.61545575",
"0.61542416",
"0.6145905",
"0.61443543",
"0.61330974",
"0.61145866",
"0.61079973",
"0.6107454",
"0.60957485",
"0.6092899",
"0.6092013",
"0.60885787",
"0.6086046",
"0.6084619",
"0.60840255",
"0.60816455",
"0.6081066",
"0.60793525",
"0.60779953",
"0.6073122",
"0.606762",
"0.60649365"
] | 0.65938145 | 16 |
set up constant fixtures | public function setUp(): void
{
self::$mockVerificationId = "intl_ver_fakeId";
self::$mockVerificationWritable = new IntlVerificationWritable();
self::$mockIntlVerificationResponse = new IntlVerification();
self::$mockIntlVerificationResponse->setId(self::$mockVerificationId);
// Bulk Fixture
$item1 = new MultipleComponentsIntl();
$item2 = new MultipleComponentsIntl();
$item3 = new MultipleComponentsIntl();
$item1->setPrimaryLine("123 street");
$item2->setPrimaryLine("456 street");
$item3->setPrimaryLine("789 street");
self::$mockMultipleComponentsList = new IntlVerificationsPayload();
self::$mockMultipleComponentsList->setAddresses([$item1, $item2, $item3]);
$resp1 = new IntlVerificationOrError();
$resp2 = new IntlVerificationOrError();
$resp3 = new IntlVerificationOrError();
$resp1->setPrimaryLine("123 street");
$resp2->setPrimaryLine("456 street");
$resp3->setPrimaryLine("789 street");
self::$mockIntlVerificationBulkResponse = new IntlVerifications();
self::$mockIntlVerificationBulkResponse->setAddresses(array ($resp1, $resp2, $resp3));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setUp() {\n\t\t$options = [\n\t\t\t'db' => [\n\t\t\t\t'adapter' => 'Connection',\n\t\t\t\t'connection' => $this->_connection,\n\t\t\t\t'fixtures' => $this->_fixtures\n\t\t\t]\n\t\t];\n\n\t\tFixtures::config($options);\n\t\tFixtures::save('db');\n\t}",
"public function setUp()\n {\n $folder = dirname(__DIR__) . '/fixtures';\n\n $this->keyVal(true);\n $this->_mutableLoader = new Loader($folder);\n $this->_immutableLoader = new Loader($folder, true);\n }",
"public function setUp() {\n $this->fixture= new FreeTdsLookup($this->getClass()->getPackage()->getResourceAsStream('freetds.conf'));\n }",
"protected function setUp(): void\n {\n $templatesReflection = new \\ReflectionClass('Tamtamchik\\\\SimpleFlash\\\\Templates');\n $this->templates = $templatesReflection->getConstants();\n }",
"public static function loadFixture()\n {\n //include __DIR__ .'/../_files/customer.php';\n include __DIR__ .'/../_files/order_fee_variation.php';\n\n }",
"public function setupFixtures()\n {\n if ($this->_fixtures === null) {\n $loadedFixtures = [];\n foreach ($this->fixtures() as $fixtureClass) {\n $loadedFixtures[$fixtureClass] = Yii::createObject($fixtureClass);\n }\n\n $this->_fixtures = $loadedFixtures;\n }\n }",
"public function __construct()\n {\n // setup the fixture settings\n $this->fixtureSettings = array(\n sfConfig::get('sf_data_dir') . '/fixtures/wspNopastePlugin-sfGuardUserTest.yml' => 'mcx-users',\n sfConfig::get('sf_data_dir') . '/fixtures/wspNopastePlugin-EntriesCommentsTest.yml' => 'wsp-nopaste',\n );\n }",
"public static function setUpBeforeClass() {\n global $CFG;\n\n self::$fixtures = $CFG->dirroot . '/admin/tool/pluginkenobi/tests/fixtures/lang_generator';\n }",
"public function testFixtureLoadOnDemand(): void\n {\n $this->loadFixtures('Categories');\n }",
"public function setup()\n {\n parent::setup();\n \n // Build some fuxture values\n $this->userName = 'fixture';\n $this->firstName = 'Test';\n $this->lastName = 'User';\n $this->email = '[email protected]';\n $this->password = '123123';\n $this->roleName = 'Fixture';\n // Generate the fixture\n $this->createAdminUserFixture(); \n }",
"protected function setUp()\n {\n $this->fixture = new Parameter();\n }",
"public function setUp()\n {\n parent::setUp();\n\n $this->accounts = Resistance::factory('\\ActiveCollab\\Resistance\\Test\\Storage\\Accounts');\n $this->users = Resistance::factory('\\ActiveCollab\\Resistance\\Test\\Storage\\Users');\n }",
"public function setUp()\n {\n Configure::write('Error.exceptionRenderer', JsonApiExceptionRenderer::class);\n\n Router::scope('/', function ($routes) {\n $routes->resources('Countries', [\n 'inflect' => 'dasherize'\n ]);\n $routes->resources('Currencies', [\n 'inflect' => 'dasherize'\n ]);\n $routes->resources('Cultures', [\n 'inflect' => 'dasherize'\n ]);\n });\n\n $this->configRequest([\n 'headers' => [\n 'Accept' => 'application/vnd.api+json'\n ]\n ]);\n\n // store path the the json fixtures\n $this->_JsonDir = Plugin::path('Crud') . 'tests' . DS . 'Fixture' . DS . 'JsonApi' . DS;\n }",
"protected function setUp(): void\n {\n parent::setUp();\n config([\"services.{$this->provider}.client_id\" => $this->faker->uuid]);\n config([\"services.{$this->provider}.client_secret\" => $this->faker->uuid]);\n }",
"protected function setUp()\n {\n $this->fixture = new Configuration();\n }",
"protected function fixture_setup() {\r\n $this->service = SQLConnectionService::get_instance($this->configuration);\r\n test_data_setup($this->service);\r\n }",
"protected function setUp()\n {\n $this->fixture = new Record();\n }",
"public function setUp()\n {\n $this->data = array(\n 'folder_name_1' => array(\n 'src' => 'source_1',\n 'dst' => 'destination_1',\n ),\n 'folder_name_2' => array(\n 'src' => 'source_2',\n 'dst' => 'destination_2',\n 'client' => 'test'\n )\n );\n }",
"abstract protected function getFixtures();",
"public function setUp()\n\t{\n\t\tparent::setUp();\n if(is_array($this->fixtures)){\n foreach($this->fixtures as $fixtureName=>$modelClass)\n {\n $tableName=WF_Table::model($modelClass)->tableName();\n $this->resetTable($tableName);\n $rows=$this->loadFixtures($modelClass, $tableName);\n if(is_array($rows) && is_string($fixtureName))\n {\n $this->_rows[$fixtureName]=$rows;\n if(isset($modelClass))\n {\n foreach(array_keys($rows) as $alias)\n $this->_records[$fixtureName][$alias]=$modelClass;\n }\n }\n }\n }\n }",
"protected function setUp()\n {\n $container = include 'config/container.php';\n InsideConstruct::setContainer($container);\n }",
"public function setUp() {\r\n // and doing it every test slows the tests down to a crawl\r\n $this->sharedFixture = new MovieLensDataSet(DATA_DIR);\r\n }",
"protected function setUp()\n {\n $this->fixture = new NamespaceDescriptor();\n }",
"public static function setUpBeforeClass(): void\n {\n parent::setUpBeforeClass();\n\n self::$reader = [\n 'username' => self::$faker->userName,\n 'email' => self::$faker->email,\n 'password' => self::$faker->password,\n ];\n\n // load user admin fixtures\n parent::$writer['id'] = Utils::loadUserData(\n parent::$writer['username'],\n parent::$writer['email'],\n parent::$writer['password'],\n true\n );\n\n // load user reader fixtures\n self::$reader['id'] = Utils::loadUserData(\n self::$reader['username'],\n self::$reader['email'],\n self::$reader['password'],\n false\n );\n }",
"public function setUp()\n {\n foreach (glob(__DIR__.'/../data/*.json') as $jsonFile) {\n if (basename($jsonFile) != 'json_output_test_json_fixed.json') {\n unlink($jsonFile);\n }\n }\n\n $this->data = [\n [1, 'PHP Developer', 'Mazen Kenjrawi'],\n [4, 'Dummy Classes', 'Foo Bar'],\n ];\n\n $this->headingFields = ['id', 'Title', 'Name'];\n\n $this->Loader = new Loader();\n }",
"public function setUp()\n {\n $this->fixtures('articles');\n }",
"protected function setUp(): void\n {\n parent::setUp();\n\n $this->baseUrl = 'api/v1';\n\n $this->faker = \\Faker\\Factory::create();\n }",
"public function setUp()\n {\n $this->reloadSchema();\n $this->reloadDataFixtures();\n }",
"protected function setUp(): void\n {\n parent::setUp();\n\n $this->value = random_int(1, 100000);\n\n $randomValue = md5((string)$this->value);\n\n $this->value1 = $randomValue . '_1';\n $this->value2 = $randomValue . '_2';\n $this->value3 = $randomValue . '_3';\n }",
"public function setUp()\n {\n $faker = new Generator();\n $faker->addProvider(new Animals($faker));\n $this->faker = $faker;\n }",
"protected function setUp()\n { \n $settings = require __DIR__ . '/../../../config/settings.php';\n $container = new \\Slim\\Container($settings);\n $container['stockconfig'] = function ($config) {\n $stockconfig =$config['settings']['stockconfig']; \n return $stockconfig;\n };\n $dependencies = new Dependencies($container);\n $dependencies->registerLogger();\n $dependencies->registerDatabase();\n $this->object = new StockResource($container);\n \n }",
"public static function loadWebsiteFixtures()\n {\n include __DIR__ . '/../../../_files/websiteFixtures.php';\n }",
"public static function loadWebsiteFixtures()\n {\n include __DIR__ . '/../../../_files/websiteFixtures.php';\n }",
"public function setUp()\n {\n $this->salt = new Ingredient('salt');\n $this->tomato = new Ingredient('tomato');\n $this->kg = new Unit('kilogram', 'kg');\n $this->l = new Unit('liter', 'l');\n $this->recipe = new Recipe('tomato sauce', [\n new Quantity(0.5, $this->kg, $this->tomato),\n new Quantity(0.2, $this->kg, $this->salt),\n ], true, $this->l, 0.8);\n }",
"public static function loadWebsiteFixtures(): void\n {\n include __DIR__ . '/../../../_files/websiteFixtures.php';\n }",
"public static function loadWebsiteFixtures(): void\n {\n include __DIR__ . '/../../../_files/websiteFixtures.php';\n }",
"public function setUp()\n {\n $this->name = new Name([\n 'title' => 'Miss',\n 'first' => 'Rachel',\n 'last' => 'Green',\n ]);\n\n $this->poaName = new Name([\n 'title' => 'Mrs',\n 'first' => 'Someone',\n 'last' => 'Else',\n ]);\n }",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}"
] | [
"0.7087405",
"0.7080009",
"0.68825936",
"0.68241495",
"0.68148834",
"0.6795175",
"0.67844933",
"0.6782415",
"0.67604476",
"0.671429",
"0.6707923",
"0.67047775",
"0.66827434",
"0.66385704",
"0.6630408",
"0.6606315",
"0.6602686",
"0.6594592",
"0.6590731",
"0.65746695",
"0.657173",
"0.65687025",
"0.65343976",
"0.6525665",
"0.65211457",
"0.65203863",
"0.6506291",
"0.64918154",
"0.6487795",
"0.6487179",
"0.64839554",
"0.6467641",
"0.6467641",
"0.64665604",
"0.64648247",
"0.64648247",
"0.64600015",
"0.64459544",
"0.64459544",
"0.64459544",
"0.64459544",
"0.64459544",
"0.64459544",
"0.64459544",
"0.64459544",
"0.64459544",
"0.64459544",
"0.64459544",
"0.64459544",
"0.64459544",
"0.64459544",
"0.6445096",
"0.6445096",
"0.6445096",
"0.6445096",
"0.6445096",
"0.6445096",
"0.6445096",
"0.6445096",
"0.6445096",
"0.6445096",
"0.6445096",
"0.6445096",
"0.6445096",
"0.6445096",
"0.6445096",
"0.6444865",
"0.6444865",
"0.644481",
"0.644481",
"0.644481",
"0.644481",
"0.644481",
"0.644481",
"0.644481",
"0.644481",
"0.644481",
"0.644481",
"0.644481",
"0.644481",
"0.644481",
"0.644481",
"0.644481",
"0.644481",
"0.644481",
"0.644481",
"0.644481",
"0.644481",
"0.644481",
"0.644481",
"0.644481",
"0.644481",
"0.644481",
"0.644481",
"0.644481",
"0.644481",
"0.644481",
"0.644481",
"0.644481",
"0.644481",
"0.644481"
] | 0.0 | -1 |
Register the service provider. | public function register()
{
$this->app->singleton('command.contractor.send.emails', function ($app) {
return new SendEmails();
});
$this->commands('command.contractor.send.emails');
$this->app->singleton('command.contractor.check.emails', function ($app) {
return new CheckDeadlines();
});
$this->commands('command.contractor.check.emails');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function register()\n {\n $this->registerServices();\n }",
"public function register()\n {\n // service 由各个应用在 AppServiceProvider 单独绑定对应实现\n }",
"public function register()\n {\n //\n if (env('APP_DEBUG', false) && $this->app->isLocal()) {\n $this->app->register(\\Laravel\\Telescope\\TelescopeServiceProvider::class);\n $this->app->register(TelescopeServiceProvider::class);\n }\n }",
"public function register()\n {\n\n $this->registerBinding();\n }",
"public function register()\n\t{\n\t\t$this->registerCommands();\n\t\t$this->registerHybridAuth();\n\t}",
"public function register()\n {\n $this->registerAuthenticator();\n }",
"public function register()\n {\n $this->loadHelpers();\n \n $this->passportSetting();\n }",
"public function register()\n {\n //Bind service in IoC container\n $this->app->singleton('tenancy', function(){\n return new TenantManager();\n });\n }",
"public function register()\n {\n\n $this->app->register(HookProvider::class);\n $this->app->register(RouteProvider::class);\n// $this->app->register(InstallModuleProvider::class);\n }",
"public function register()\n\t{\n\t\t\n\t\t$this->registerViewManager();\n\t\t$this->registerResponseHandler();\n\t\t$this->registerHttpMethods();\n\t}",
"public function register()\n {\n $this->registerAccountService();\n\n $this->registerCurrentAccount();\n\n //$this->registerMenuService();\n\n //$this->registerReplyService();\n }",
"public function register()\n {\n // ...\n }",
"public function register()\n {\n // ...\n }",
"public function register() {\n $this->registerProviders();\n $this->registerFacades();\n }",
"public function register()\n {\n $this->registerServiceProvider();\n\n $this->addAssetNamespaceHint();\n $this->addStreamsNamespaceHint();\n }",
"public function register()\n {\n $this->registerRequestHandler();\n $this->registerAuthorizationService();\n $this->registerServices();\n }",
"public function register()\n {\n // register its dependencies\n $this->app->register(\\Cviebrock\\EloquentSluggable\\ServiceProvider::class);\n }",
"public function register(){\n $this->registerDependencies();\n $this->registerAlias();\n $this->registerServiceCommands();\n }",
"public function register()\n {\n $this->registerContracts();\n }",
"public function register()\n\t{\n $this->registerApi();\n\t}",
"public function register()\n {\n \n $this->registerLoader();\n $this->registerTranslator();\n }",
"public function register()\r\n {\r\n Passport::ignoreMigrations();\r\n\r\n $this->app->singleton(\r\n CityRepositoryInterface::class,\r\n CityRepository::class\r\n );\r\n\r\n $this->app->singleton(\r\n BarangayRepositoryInterface::class,\r\n BarangayRepository::class\r\n );\r\n }",
"public function register() {\n //\n }",
"public function register() {\n //\n }",
"public function register() {\n //\n }",
"public function register() {\n //\n }",
"public function register() {\n //\n }",
"public function register() {\n //\n }",
"public function register() {\n //\n }",
"public function register() {\n //\n }",
"public function register()\n {\n $this->registerServiceProviders();\n $this->registerSettingsService();\n $this->registerHelpers();\n }",
"public function register()\n {\n /**\n * Register additional service\n * providers if they exist.\n */\n foreach ($this->providers as $provider) {\n if (class_exists($provider)) {\n $this->app->register($provider);\n }\n }\n }",
"public function register()\n {\n $this->registerAssets();\n $this->registerServices();\n }",
"public function register()\n\t{\n\n $this->registerUserService();\n $this->registerCountryService();\n $this->registerMetaService();\n $this->registerLabelService();\n $this->registerTypeService();\n $this->registerGroupeService();\n $this->registerActiviteService();\n $this->registerRiiinglinkService();\n $this->registerInviteService();\n $this->registerTagService();\n $this->registerAuthService();\n $this->registerChangeService();\n $this->registerRevisionService();\n $this->registerUploadService();\n //$this->registerTransformerService();\n }",
"public function register()\n {\n $this->registerFinite();\n }",
"public function register()\n {\n $this->setupConfig();\n\n $this->bindServices();\n }",
"public function register()\n {\n $this->registerServices();\n $this->setupStubPath();\n $this->registerProviders();\n }",
"public function register()\n {\n $this->app['cache'] = $this->app->share(function($app)\n {\n return new CacheManagerMaster($app);\n });\n\n $this->app['memcached.connector'] = $this->app->share(function()\n {\n return new MemcachedConnector;\n });\n\n $this->registerCommands();\n }",
"public function register()\n {\n $this->registerFactory();\n $this->registerManager();\n $this->registerBindings();\n }",
"public function register()\n {\n $this->registerFactory();\n $this->registerManager();\n $this->registerBindings();\n }",
"public function register()\n {\n $this->registerFactory();\n $this->registerManager();\n $this->registerBindings();\n }",
"public function register()\n {\n $this->registerBrowser();\n\n $this->registerViewFinder();\n }",
"public function register()\n {\n $this->registerCacheManager();\n $this->registerCourier();\n }",
"public function register()\n {\n $this->app->singleton(Adapter::class, function () {\n\n return new Adapter(config('services.sso.id'), config('services.sso.secret'));\n\n });\n }",
"public function register()\n {\n $this->registerRollbar();\n }",
"public function register()\n {\n $this->configure();\n }",
"public function register()\n {\n $this->registerFactory();\n $this->registerManager();\n }",
"public function register(): void\n {\n parent::register();\n\n $this->singleton(RouteViewerContract::class, RouteViewer::class);\n }",
"public function register() {\n\n }",
"public function register()\n {\n $this->registerFlareFacade();\n $this->registerServiceProviders();\n $this->registerBindings();\n }",
"public function register()\n {\n $this->registerBindings();\n $this->registerEventListeners();\n }",
"public function register()\n {\n //\n if ($this->app->environment() !== 'production') {\n $this->app->register(\\Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider::class);\n }\n\n\n\n\n $this->app->register(ResponseMacroServiceProvider::class);\n $this->app->register(TwitterServiceProvider::class);\n }",
"public function register()\n {\n $this->app->singleton(Service\\TagsSynchronizer::class, function ($app) {\n return new Service\\TagsSynchronizer();\n });\n }",
"public function register() {\n }",
"public function register() {\n }",
"public function register() {\n }",
"public function register() {\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }",
"public function register()\n {\n //\n }"
] | [
"0.71774215",
"0.7054453",
"0.6968271",
"0.69677705",
"0.6952019",
"0.6931252",
"0.6926226",
"0.6918423",
"0.6899592",
"0.6895726",
"0.6894278",
"0.68906504",
"0.68906504",
"0.6883112",
"0.6872877",
"0.6865099",
"0.68640506",
"0.68627584",
"0.68624485",
"0.68491566",
"0.6823619",
"0.68196595",
"0.681956",
"0.681956",
"0.681956",
"0.681956",
"0.681956",
"0.681956",
"0.681956",
"0.681956",
"0.68090034",
"0.68089324",
"0.6807419",
"0.6803942",
"0.6802752",
"0.679191",
"0.67904466",
"0.67874974",
"0.6785141",
"0.6785141",
"0.6785141",
"0.6780175",
"0.67768264",
"0.6776666",
"0.6770326",
"0.6762759",
"0.67627436",
"0.67611307",
"0.6757141",
"0.67570823",
"0.67548144",
"0.6753397",
"0.6753232",
"0.67504245",
"0.67504245",
"0.67504245",
"0.67504245",
"0.6749705",
"0.6749705",
"0.6749705",
"0.6749705",
"0.6749705",
"0.6749705",
"0.6749705",
"0.6749705",
"0.6749705",
"0.6749705",
"0.6749705",
"0.6749705",
"0.6749705",
"0.6749705",
"0.6749705",
"0.6749705",
"0.6749705",
"0.6749705",
"0.6749705",
"0.6749705",
"0.6749705",
"0.6749705",
"0.6749705",
"0.6749705",
"0.6749705",
"0.6749705",
"0.6749705",
"0.6749705",
"0.6749705",
"0.6749705",
"0.6749705",
"0.6749705",
"0.6749705",
"0.6749705",
"0.6749705",
"0.6749705",
"0.6749705",
"0.6749705",
"0.6749705",
"0.6749705",
"0.6749705",
"0.6749705",
"0.6749705",
"0.6749705"
] | 0.0 | -1 |
Preform booting of services... | public function boot()
{
if (!$this->app->routesAreCached()) {
$this->app->router->group(['namespace' => 'Kregel\Contractor\Http\Controllers'], function ($router) {
require __DIR__.'/Http/routes.php';
});
}
$this->loadViewsFrom(__DIR__.'/../resources/views', 'contractor');
$this->publishes([
__DIR__.'/../resources/views' => base_path('resources/views/vendor/contractor'),
], 'views');
$this->publishes([
__DIR__.'/../config/config.php' => config_path('kregel/contractor.php'),
], 'config');
$this->publishes([
__DIR__.'/../database/migrations/' => database_path('migrations/'),
], 'migrations');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function boot()\n {\n if ($this->booted) {\n return;\n }\n\n array_walk($this->loadedServices, function ($s) {\n $this->bootService($s);\n });\n\n $this->booted = true;\n }",
"public function boot(): void\n {\n if ($this->booted) {\n return;\n }\n\n array_walk($this->services, function ($service) {\n $this->bootServices($service);\n });\n\n $this->booted = true;\n }",
"protected function boot()\n\t{\n\t\tforeach ($this->serviceProviders as $provider)\n\t\t{\n\t\t\t$provider->boot($this);\n\t\t}\n\n\t\t$this->booted = true;\n\t}",
"public function boot(){}",
"public function boot()\n {\n // Nothing to boot\n }",
"abstract public function boot();",
"abstract public function boot();",
"abstract public function boot();",
"abstract public function boot();",
"public static function boot() {\n\t\tstatic::container()->boot();\n\t}",
"public function boot();",
"public function boot();",
"public function boot();",
"public function boot();",
"public function boot()\n {}",
"public function boot()\n {}",
"public function boot() {\n\t\t// no-op\n\t}",
"private function booted()\n {\n }",
"public static function boot();",
"public function boot(): void\n {\n }",
"public function boot(): void\n {\n }",
"public function boot()\n {\n // no-op\n }",
"public function boot(): void\n {\n //\n }",
"public function boot(): void\n {\n //\n }",
"public function boot(): void\n {\n //\n }",
"public function boot(): void\n {\n //\n }",
"public function boot(): void\n {\n\n }",
"protected static function booting()\n {\n //\n }",
"public function boot() {\n\t}",
"public function boot() {\n\t}",
"public static function boot()\n {\n self::getInstance()->boot();\n }",
"protected static function boot()\n {\n }",
"public function boot() {\n\n\t\t$this->registerProviders();\n\t\t$this->bootProviders();\n\t\t$this->registerProxies();\n\t}",
"abstract protected static function boot();",
"public function boot()\n {\n if ($this->booted) {\n return;\n }\n\n $this->app->registerConfiguredProvidersInRequest();\n\n $this->fireAppCallbacks($this->bootingCallbacks);\n\n /** array_walk\n * If when a provider booting, it reg some other providers,\n * then the new providers added to $this->serviceProviders\n * then array_walk will loop the new ones and boot them. // pingpong/modules 2.0 use this feature\n */\n array_walk($this->serviceProviders, function ($p) {\n $this->bootProvider($p);\n });\n\n $this->booted = true;\n\n $this->fireAppCallbacks($this->bootedCallbacks);\n }",
"public function boot()\r\n\t{\r\n\t\t\r\n\t}",
"public function boot()\n\t{\n\t\t\n\t}",
"public function boot()\n\t{\n\t\t\n\t}",
"public function boot() {\n\t\t//\n\t}",
"public function boot() {\n\t\t//\n\t}",
"protected static function booted()\n {\n //\n }",
"protected static function booted()\n {\n //\n }",
"public function boot(){\n // ...\n }",
"public function boot(): void;",
"public function boot()\r\n {\r\n }",
"public function boot()\n\t{\n\n\t}",
"public function boot()\n\t{\n\n\t}",
"public function boot()\n\t{\n\n\t}",
"public function boot() : void;",
"public function boot() {\r\n\t\t$hosting_service = HostResolver::get_host_service();\r\n\r\n\t\tif ( ! empty( $hosting_service ) ) {\r\n\t\t\t$this->provides[] = $hosting_service;\r\n\t\t}\r\n\t}",
"public function boot()\n {\n\t\t//\n }",
"protected function bootServiceProviders()\n {\n foreach($this->activeProviders as $provider)\n {\n // check if the service provider has a boot method.\n if (method_exists($provider, 'boot')) {\n $provider->boot();\n }\n }\n }",
"public function boot()\r\n {\r\n //\r\n }",
"public function boot()\r\n {\r\n //\r\n }",
"public function boot()\r\n {\r\n //\r\n }",
"public function boot()\r\n {\r\n //\r\n }",
"public function bootstrapSystem() {}",
"public function bootstrapSystem() {}",
"public function boot()\n\t{\t\n\t}",
"public function boot()\n {\n $this->bootingDomain();\n\n $this->registerCommands();\n $this->registerListeners();\n $this->registerPolicies();\n $this->registerRoutes();\n $this->registerBladeComponents();\n $this->registerLivewireComponents();\n $this->registerSpotlightCommands();\n\n $this->bootedDomain();\n }",
"public function boot()\n\t{\n\t\t//\n\t}",
"public function boot()\n\t{\n\t\t//\n\t}",
"public function boot()\n\t{\n\t\t//\n\t}",
"public function boot()\n\t{\n\t\t//\n\t}",
"public function boot()\n\t{\n\t\t//\n\t}",
"public function boot()\n\t{\n\t\t//\n\t}",
"public function boot()\n\t{\n\t\t//\n\t}",
"public function boot()\n\t{\n\t\t//\n\t}",
"public function boot()\n\t{\n\t\t//\n\t}",
"public function boot()\n\t{\n\t\t//\n\t}",
"public function boot()\n\t{\n\t\t//\n\t}",
"public function boot()\n\t{\n\t\t//\n\t}",
"public function boot()\n\t{\n\t\t//\n\t}",
"public function boot()\n\t{\n\t\t//\n\t}",
"public function boot()\n {\n $this->bootEvents();\n\n $this->bootPublishes();\n\n $this->bootTypes();\n\n $this->bootSchemas();\n\n $this->bootRouter();\n\n $this->bootViews();\n \n $this->bootSecurity();\n }",
"public function boot() {\n \n }",
"public static function booted()\n {\n }",
"public static function booted()\n {\n }",
"public function boot()\n { }",
"public function boot()\n { }",
"public function boot()\n {\n // Boot here application\n }",
"protected function boot()\n {\n //Nothing to do here, but you can override this function in child classes.\n }",
"public function bootstrap()\n {\n if (!$this->app->hasBeenBootstrapped()) {\n $this->app->bootstrapWith($this->bootstrappers());\n }\n\n //$this->app->loadDeferredProviders();\n\n if (!$this->commandsLoaded) {\n //$this->commands();\n\n $this->commandsLoaded = true;\n }\n }",
"public function boot()\n {\n $this->bootPackages();\n }",
"public function boot()\n {\n $providers = $this->make('config')->get('app.console_providers', array());\n foreach ($providers as $provider) {\n $provider = $this->make($provider);\n if ($provider && method_exists($provider, 'boot')) {\n $provider->boot();\n }\n }\n }",
"public function boot()\n {\n $this->app->booted(function () {\n $this->callMethodIfExists('jobs');\n });\n }",
"public function boot()\n {\n static::bootMethods();\n }",
"public function boot ()\n {\n\n }",
"public function boot()\n {\n \n }",
"public function boot() {\n //\n }",
"public function boot()\n {\n }",
"public function boot()\n {\n }",
"public function boot()\n {\n }",
"public function boot()\n {\n }",
"public function boot()\n {\n }",
"public function boot()\n {\n }",
"public function boot()\n {\n }",
"public function boot()\n {\n }",
"public function boot()\n {\n }",
"public function boot()\n {\n }",
"public function boot()\n {\n }"
] | [
"0.81306547",
"0.79847085",
"0.7729253",
"0.7632548",
"0.75944704",
"0.7586324",
"0.7586324",
"0.7586324",
"0.7586324",
"0.75295055",
"0.7468294",
"0.7468294",
"0.7468294",
"0.7468294",
"0.74171",
"0.74171",
"0.7377308",
"0.73657596",
"0.7357651",
"0.73409384",
"0.73409384",
"0.73338825",
"0.73265785",
"0.73265785",
"0.73265785",
"0.73265785",
"0.7322449",
"0.73041433",
"0.72964174",
"0.72964174",
"0.728481",
"0.7277535",
"0.7272777",
"0.7261039",
"0.7256858",
"0.7227929",
"0.72089225",
"0.72089225",
"0.72024935",
"0.72024935",
"0.7194875",
"0.7194875",
"0.7184541",
"0.71759534",
"0.7172306",
"0.71707785",
"0.71707785",
"0.71707785",
"0.7148966",
"0.7144962",
"0.7113114",
"0.7089096",
"0.7087257",
"0.7087257",
"0.7087257",
"0.7087257",
"0.7083063",
"0.7081899",
"0.7081105",
"0.7076511",
"0.70726156",
"0.70726156",
"0.70726156",
"0.70726156",
"0.70726156",
"0.70726156",
"0.70726156",
"0.70726156",
"0.70726156",
"0.70726156",
"0.70726156",
"0.70726156",
"0.70726156",
"0.70726156",
"0.7069766",
"0.70638573",
"0.705961",
"0.705961",
"0.7059163",
"0.7059163",
"0.7052325",
"0.7047058",
"0.70266795",
"0.7017339",
"0.70019025",
"0.70005774",
"0.69846815",
"0.697971",
"0.6954946",
"0.6953461",
"0.6953122",
"0.6953122",
"0.6953122",
"0.6953122",
"0.6953122",
"0.6953122",
"0.6953122",
"0.6953122",
"0.6953122",
"0.6953122",
"0.6953122"
] | 0.0 | -1 |
Get the services provided by the provider. | public function provides()
{
return [];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"final public function getServices()\n {\n if (is_null($this->serviceProviders)) {\n $this->serviceProviders = $this->getServiceProviders();\n }\n\n return $this->serviceProviders;\n }",
"protected function getServices()\n {\n return $this->services;\n }",
"protected static function getServiceProviders()\n {\n return [];\n }",
"public static function get_service_providers(): array {\n\t\treturn self::$service_providers;\n\t}",
"public function getServices();",
"public function getServices()\n {\n return $this->services;\n }",
"public function getServices()\n {\n return $this->services;\n }",
"public function getServices()\n {\n return $this->services;\n }",
"public function services()\n {\n return $this->belongstomany(Service::class);\n }",
"public function getServices() {\n return $this->services;\n }",
"public function getServices() {\n return $this->services;\n }",
"public function getServiceProviders();",
"public function getServices() {\n\n return $this->services;\n\n }",
"public function getServices()\n {\n return $this->pantonoServices;\n }",
"public static function getServices(): array\n {\n return static::$services;\n }",
"public static function get_services() {\n return [ \n Pages\\Admin::class,\n Base\\Enqueue::class,\n Base\\SettingsLinks::class,\n Base\\JsObjectsManager::class,\n Base\\ShortCodesManager::class\n ];\n }",
"private function get_services() {\n\t\treturn [\n\t\t\tServices\\Language_Loader::class,\n\t\t\tServices\\Setup_Database::class,\n\t\t\tServices\\Scripts_And_Templates::class,\n\t\t\tServices\\Admin_Pages::class,\n\t\t\tServices\\Setup_Settings_Page::class,\n\t\t\tServices\\Loggers_Loader::class,\n\t\t\tServices\\Dropins_Loader::class,\n\t\t\tServices\\Setup_Log_Filters::class,\n\t\t\tServices\\Setup_Pause_Resume_Actions::class,\n\t\t\tServices\\Setup_Purge_DB_Cron::class,\n\t\t\tServices\\API::class,\n\t\t\tServices\\Dashboard_Widget::class,\n\t\t\tServices\\Network_Menu_Items::class,\n\t\t\tServices\\Plugin_List_Link::class,\n\t\t];\n\t}",
"public static function get_services()\n {\n return [\n Pages\\Dashboard::class,\n Base\\Enqueue::class,\n Base\\SettingsLink::class,\n Base\\CustomPostTypeController::class,\n ];\n }",
"public static function get_services()\n {\n return [\n Pages\\Admin::class,\n Base\\Enqueue::class,\n Base\\CustomPostType::class,\n Base\\CustomMetaBox::class,\n Base\\Shortcode::class,\n Base\\Cron::class,\n ];\n }",
"public function &getServices(): array {\n return $this->services;\n }",
"public function getServiceLocator()\n {\n return $this->services;\n }",
"public function getServiceProviderList()\n {\n return $this->providers;\n }",
"public function services()\n {\n return $this->getAngularLocation($this->service_path);\n }",
"public function provides()\n {\n return [Client::class, Services\\OAuth::class];\n }",
"public function getServices(): array;",
"public function getServiceProvider();",
"public static function get_services()\n {\n\n //підключаємо всі необхідні класи для активації через масив\n return [\n Pages\\Admin::class,\n Base\\Enqueue::class,\n Base\\SettingsLinks::class\n ];\n }",
"public function provides()\n {\n return [\n SerasaService::class\n ];\n }",
"public function serviceProviders(): ?Collection;",
"public function getServices()\r\n {\r\n if (is_null($this->_services)) {\r\n if ($this->getConfig('auto')) {\r\n $this->_services = array();\r\n $config = Mage::app()->getConfig();\r\n foreach (array('cache', 'full_page_cache', 'fpc') as $cacheType) {\r\n $node = $config->getXpath('global/' . $cacheType . '[1]');\r\n if (isset($node[0]->backend) && in_array((string)$node[0]->backend, array(\r\n 'Cm_Cache_Backend_Redis',\r\n 'Mage_Cache_Backend_Redis'\r\n ))) {\r\n $this->_services[] = $this->_buildServiceArray(\r\n $this->__(str_replace('_', ' ', uc_words($cacheType))),\r\n $node[0]->backend_options->server,\r\n $node[0]->backend_options->port,\r\n $node[0]->backend_options->password,\r\n $node[0]->backend_options->database\r\n );\r\n }\r\n }\r\n // get session\r\n $node = $config->getXpath('global/redis_session');\r\n if ($node) {\r\n $this->_services[] = $this->_buildServiceArray(\r\n $this->__('Session'),\r\n $node[0]->host,\r\n $node[0]->port,\r\n $node[0]->password,\r\n $node[0]->db\r\n );\r\n }\r\n } else {\r\n $this->_services = unserialize($this->getConfig('manual'));\r\n }\r\n }\r\n return $this->_services;\r\n }",
"public function loadServices($providers);",
"public static function get_services(): array\n {\n return [\n Base\\SettingsLinks::class,\n Pages\\Admin::class,\n Base\\Enqueue::class,\n CPT\\EmailCpt::class,\n ];\n }",
"public function services(): array\n {\n return \\array_merge(\n \\array_keys($this->_services),\n \\array_keys($this->aliases)\n );\n }",
"public function get_services() {\n return $this->linkemperor_exec(null, null,\"/api/v2/customers/services.json\");\n }",
"public function getRequestedServices();",
"public function getProviders();",
"public function getProviders();",
"protected function getUserServices()\n\t{\n\t\treturn $this->userServices = new UsersService();\n\t}",
"protected function getServices() {\n\t\treturn [\n\t\t\tMessagesService::class,\n\t\t];\n\t}",
"public static function get_providers() {\n\t\treturn self::$providers;\n\t}",
"public function getRequiredServices();",
"public function getModulesServiceProviders()\n {\n $modulesNamespace = ModulesConfig::getModulesNamespace();\n\n foreach (ModulesConfig::getModulesNames() as $moduleName) {\n // get the Module extra service providers (extra service providers are defined in the modules config file)\n foreach (ModulesConfig::getModulesExtraServiceProviders($moduleName) as $provider) {\n $allServiceProviders[] = $provider;\n }\n // append the Module main service provider\n $allServiceProviders[] = ModulesConfig::buildMainServiceProvider($modulesNamespace, $moduleName);\n }\n\n return array_unique($allServiceProviders) ? : [];\n }",
"public function provides()\n {\n return [\n RouteServiceProvider::class,\n MenuServiceProvider::class,\n ];\n }",
"public function getUsersServices()\r\n {\r\n return $this->usersServices = new UsersService();\r\n }",
"public function getServices()\n\t{\n\t\treturn ['card', 'topup_mobile', 'topup_mobile_post', 'topup_game'];\n\t}",
"public function providerGet()\n {\n $getList = $this->getMethodsName('get');\n $provider = [];\n\n foreach ($getList as $name) {\n $provider[$name] = [\n 'name' => $name,\n 'arguments' => $this->getArgumentsForMethod($name),\n ];\n }\n\n return $provider;\n }",
"public function findServices(): array;",
"public static function get_services()\n {\n $ServicesObj = new Services();\n $Services = array();\n try {\n $stmt = $ServicesObj->read();\n $count = $stmt->rowCount();\n if ($count > 0) {\n while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {\n extract($row);\n $p = (object) array(\n \"ServiceID\" => (int) $ServiceID,\n \"ServiceName\" => $ServiceName,\n );\n\n array_push($Services, $p);\n }\n }\n return $Services;\n } catch (Exception $e) {\n throw $e;\n }\n }",
"protected function otherServiceProviders()\n {\n $providers = [\n \\Collective\\Html\\HtmlServiceProvider::class,\n \\Intervention\\Image\\ImageServiceProvider::class,\n \\Acacha\\AdminLTETemplateLaravel\\Providers\\AdminLTETemplateServiceProvider::class,\n \\Serff\\Cms\\Core\\Providers\\InstallationServiceProvider::class,\n \\Serff\\Cms\\Core\\Providers\\AdminServiceProvider::class,\n ];\n\n $manifestPath = app()->getCachedServicesPath();\n\n (new ProviderRepository(app(), new Filesystem, $manifestPath))\n ->load($providers);\n }",
"protected function getProviders() {\n\n\t\treturn $this->providers;\n\t}",
"public function provides()\n {\n return [\n 'sm.callback.factory',\n 'sm.event.dispatcher',\n 'sm.factory',\n Debug::class,\n ];\n }",
"public function get_providers()\n {\n }",
"public function provides()\n {\n return [\n 'freshdesk.factory',\n 'freshdesk',\n 'freshdesk.connection',\n ];\n }",
"public function provides()\n {\n return [\\App\\Services\\ApiPlatformProductFactoryService::class];\n }",
"public function getServiceProvider($provider);",
"public static function getListServices () {\n return self::findByStatus(self::STATUS_ACTIVE);\n }",
"protected function registerServiceProviders()\n {\n if ($this->active()->has('providers')) {\n $providers = $this->active()->get('providers');\n\n foreach ($providers as $provider) {\n App::register($provider);\n }\n }\n }",
"public function provides()\n\t{\n\t\treturn array(\n\t\t\t'mosms',\n\t\t\t'moclient',\n\t\t\t);\n\t}",
"public function provides() {\n $providers = array();\n foreach ($this->providers as $key => $value) {\n $providers[] = $key;\n }\n return $providers;\n }",
"public function getLoadedProviders(): array\n {\n return $this->loadServiceProviders;\n }",
"public function provides()\n {\n AchieveLogger::info(\"Deferred true and I am here in provides()\");\n return['App\\Services\\Utility\\AchieveLoggerService'];\n }",
"public function getModuleServiceProvider()\n {\n return isset($this->config['module']['providers']) ? $this->config['module']['providers'] : [];\n }",
"public function provides()\n {\n return [\n CreateService::class,\n CreateInterface::class,\n CreateProvider::class,\n ];\n }",
"public function setProviders()\n {\n $services = $this->container['services']??null;\n\n if (is_array($services)) {\n foreach ($services as $service) {\n $service::register($this->container);\n $service::boot($this->container);\n }\n }\n }",
"public function provides()\n {\n return [\n ZhyuInfoServiceProvider::class,\n ];\n }",
"public function getProviders()\n {\n return $this->providers;\n }",
"public function getProviders()\n {\n return $this->providers;\n }",
"public function services($ignore_cache = false) {\n if ($this->services === null || $ignore_cache) {\n $this->services = StatusBoard_Service::allForSite($this);\n }\n \n return $this->services;\n }",
"public function getProviders(): array\n {\n return $this->providers;\n }",
"public function getProviders(): array\n {\n return $this->providers;\n }",
"public function get_service() {\n\n\t\treturn $this->provider_instance;\n\t}",
"public function provides()\n {\n return [\n 'digitalocean.adapterfactory',\n 'digitalocean.factory',\n 'digitalocean',\n 'digitalocean.connection',\n ];\n }",
"public function provides()\n {\n return [\n 'dubbo_cli',\n 'dubbo_cli.factory',\n ];\n }",
"public static function getSubscribedServices()\r\n {\r\n return [\r\n MDHelper::class,\r\n LoggerInterface::class\r\n ];\r\n }",
"public function getDependencies()\n {\n return array(\n MongoServiceProvider::SERVICE_NAME\n );\n }",
"protected function getAuth_Provider_Oauth_ServiceCollectionService()\n {\n $this->services['auth.provider.oauth.service_collection'] = $instance = new \\phpbb\\di\\service_collection($this);\n\n $instance->add('auth.provider.oauth.service.bitly');\n $instance->add('auth.provider.oauth.service.facebook');\n $instance->add('auth.provider.oauth.service.google');\n $instance->add('auth.provider.oauth.service.twitter');\n\n return $instance;\n }",
"public function provides()\n {\n return [CardService::class];\n }",
"public function getServices()\n {\n $services = InvoiceService::where('office_id', request('office_id'))->where('name', 'like', '%' . request('q') . '%')->get();\n\n return $services;\n }",
"public function provides()\n {\n return [\n 'auth',\n 'Permit\\CurrentUser\\ContainerInterface',\n 'Permit\\Access\\CheckerInterface',\n 'Permit\\CurrentUser\\LoginValidatorInterface'\n ];\n }",
"public function getProviders($provider)\n {\n $name = is_string($provider) ? $provider : getClass($provider, true);\n \n return Arr::where($this->serviceProviders, function ($value) use ($name) {\n return $value instanceof $name;\n });\n }",
"public function getServiceCheckProviders(): array\n {\n return $this->serviceCheckProviders;\n }",
"public static function getDeferredServices(){\n return \\Illuminate\\Foundation\\Application::getDeferredServices();\n }",
"abstract public function getProviders();",
"private function providers()\n {\n $this->register(new CorsServiceProvider());\n $this->register(new HmacServiceProvider());\n }",
"public function getDeferredServices(): array\n {\n return $this->deferredServices;\n }",
"public function services(){\n\n $facades = Array(\n 'Cache' => 'Disco\\classes\\Cache',\n 'Crypt' => 'Disco\\classes\\Crypt',\n 'Data' => 'Disco\\classes\\Data',\n 'DB' => 'Disco\\classes\\DB',\n 'Email' => 'Disco\\classes\\Email',\n 'Event' => 'Disco\\classes\\Event',\n 'Html' => 'Disco\\classes\\Html',\n 'Form' => 'Disco\\classes\\Form',\n 'Model' => 'Disco\\classes\\ModelFactory',\n 'Queue' => 'Disco\\classes\\Queue',\n 'Session' => 'Disco\\classes\\Session',\n 'Template' => 'Disco\\classes\\Template',\n 'View' => 'Disco\\classes\\View'\n );\n\n foreach($facades as $facade=>$v){\n $this->make($facade,$v);\n }//foreach\n\n $this->as_factory('Router',function(){\n return new \\Disco\\classes\\Router::$base;\n });\n\n }",
"public function provides()\n {\n return [\n EventDispatcher::class,\n Repository::class,\n ];\n }",
"public function getServiceProvider(): Provider\n {\n return $this->serviceProvider;\n }",
"protected function getPuntoAtencionServices()\n {\n return $this->container->get('snc.services.puntoatencion');\n }",
"public function get_services($settings = FALSE)\n\t{\t\n\t\treturn parent::get_objects(array(\n\t\t\t'settings' => $settings\n\t\t));\n\t}",
"public function provides()\n {\n return [\n Factory::class,\n 'flipbox.sdk',\n ];\n }",
"public function provides()\n {\n return array(\n 'icsconfig',\n 'icsview',\n 'icsmessage',\n 'icspdf'\n );\n }",
"public function getAvailableServices();",
"public function provides()\n {\n return [\n ZhyuAuthServiceProvider::class,\n ];\n }",
"public function getServices() {\n $serviceNames = $this->getServiceNames($this->serviceFolderPaths);\n $ret = $ret1 = array();\n// require_once AMFPHP_ROOTPATH.'Plugins/AmfphpDiscovery/CReflection.php';\n foreach ($serviceNames as $serviceName) {\n/* $methods = array();\n $objC = new CReflection(APP_PATH.'/app/controllers/'.$serviceName.'.php');\n $objComment = $objC->getDocComment();\n $arrMethod = $objC->getMethods();\n foreach ($arrMethod as $objMethods)\n {\n $methodComment = $objMethods->getDocComment();\n $parsedMethodComment = $this->parseMethodComment($methodComment);\n $arrParamenter = $objMethods->getParameters();\n foreach ($arrParamenter as $Paramenter)\n {\n $parameterInfo = new AmfphpDiscovery_ParameterDescriptor($Paramenter, '');\n $parameters[] = $parameterInfo;\n }\n $methods[$objMethods->_name] = new AmfphpDiscovery_MethodDescriptor($objMethods->_name, $parameters, $methodComment, $parsedMethodComment['return']);\n }\n\n $ret[$serviceName] = new AmfphpDiscovery_ServiceDescriptor($serviceName, $methods, $objComment); */\n $ret1[] = array('label'=>$serviceName,'date'=>'');\n }\n// var_dump($ret);exit();\n //note : filtering must be done at the end, as for example excluding a Vo class needed by another creates issues\n foreach ($ret as $serviceName => $serviceObj) {\n foreach (self::$excludePaths as $excludePath) {\n if (strpos($serviceName, $excludePath) !== false) {\n unset($ret[$serviceName]);\n break;\n }\n }\n }\n return $ret1;\n }",
"public function providers()\n {\n return $this->request('get', '/api/teams/'.Helpers::config('team').'/providers');\n }",
"public function get_registered_services() {\n\t\t$data = [];\n\t\t$res = self::$dbo->query( 'SELECT storage_service FROM snapshot_storage_credentials' );\n\t\twhile ( $row = $res->fetchArray() ) {\n\t\t\t$data[] = $row['storage_service'];\n\t\t}\n\n\t\treturn $data;\n\t}",
"protected function getPayrollServices()\n\t{\n\t\treturn $this->payrollServices = new PayrollServices();\n\t}",
"public function provides()\n {\n return ['shppcart_service'];\n }",
"public function provides()\n {\n return ['vk_service'];\n }",
"public function provides() {\n\t\treturn array();\n\t}"
] | [
"0.79039633",
"0.7667588",
"0.76229626",
"0.75573224",
"0.7470691",
"0.7423859",
"0.7423859",
"0.7423859",
"0.7409516",
"0.736475",
"0.736475",
"0.7363987",
"0.7322196",
"0.71889",
"0.7162814",
"0.71509963",
"0.7137116",
"0.70622355",
"0.7047945",
"0.70362085",
"0.70213807",
"0.69303095",
"0.6916005",
"0.689161",
"0.6809766",
"0.6804473",
"0.6777694",
"0.67695314",
"0.67489713",
"0.6727971",
"0.6722673",
"0.6699434",
"0.66944385",
"0.6651968",
"0.6645622",
"0.66324407",
"0.66324407",
"0.6616089",
"0.6613961",
"0.6610317",
"0.66008735",
"0.6567814",
"0.6562319",
"0.6529889",
"0.6500722",
"0.6480351",
"0.64535",
"0.645232",
"0.6418372",
"0.6416018",
"0.6413331",
"0.6397339",
"0.63955915",
"0.63899195",
"0.6379133",
"0.63766354",
"0.63379693",
"0.63369566",
"0.63356155",
"0.6335485",
"0.6318311",
"0.6316751",
"0.63084865",
"0.62963986",
"0.6278965",
"0.6264424",
"0.6264424",
"0.62581587",
"0.6252555",
"0.6252555",
"0.62434787",
"0.62404764",
"0.623751",
"0.62194616",
"0.6210146",
"0.6203944",
"0.62002736",
"0.6197869",
"0.61938506",
"0.6188146",
"0.61726904",
"0.6170289",
"0.6163297",
"0.61600006",
"0.61570746",
"0.6152867",
"0.6147815",
"0.6147383",
"0.61295825",
"0.6126574",
"0.6124758",
"0.61204225",
"0.6100293",
"0.60957974",
"0.6073751",
"0.6072919",
"0.60692966",
"0.6069216",
"0.60561067",
"0.604959",
"0.60481"
] | 0.0 | -1 |
Lists all States models. | public function actionIndex()
{
$searchModel = new StatesSearch();
$dataProvider = $searchModel->search(Yii::$app->request->queryParams);
if(Yii::$app->request->isAjax && Yii::$app->request->post('status_token'))
{
$id = Yii::$app->request->post('id');
$model = $this->findModel($id);
return $this->changeStatus($model);
}
return $this->render('index', [
'searchModel' => $searchModel,
'dataProvider' => $dataProvider,
]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getStateList() {\n $states = State::latest()->paginate(10);\n return $states;\n }",
"public function fetchAll()\n\t{\n\t\t$states = $this->getStatesModel()->fetchAll();\n\t\treturn $states;\n\t}",
"public static function get_all_states()\n {\n $query = new Query;\n return $query->select(['core_states.*','core_zones.zone_name'])->from('core_states')\n ->innerJoin('core_zones','core_states.zone_id = core_zones.zone_id')\n ->orderBy(['core_states.state_name' => SORT_ASC])->All();\n }",
"public function states() {\n\t\t$this->loadModel('Data.States');\n\t\t$states = $this->States->find('all')->toArray();\n\n\t\t$this->set(compact('states'));\n\t\t$this->set('_serialize', ['states']);\n\t}",
"function getStates(){\n\t\tApp::import('Model', 'State');\n\t\t$this->State = new State();\n\t\t$stateArr = array();\n\t\t$stateArr = $this->State->find('list',array(\n\t\t\t'fields'=>array('State.state_code','State.name'),\n\t\t\t'order'=>array('State.name')\n\t\t\t));\n\t\treturn $stateArr;\n\t}",
"public function index()\n {\n //$states = State::orderBy('id','desc')->paginate(10);\n\n $states = State::with('City')->paginate(10);\n\n return view('admin/state/index')->with('states', $states);\n }",
"public function index()\n {\n //GET states\n $states = State::all();\n return JSON_encode(compact('states'));\n }",
"public function index()\n {\n \n\n Return View::make('real_state.list', array('real_state' => RealState::all()));\n }",
"public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => CallStates::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function index()\n\t{\n\t\t$states = State::paginate(15);\n\t\treturn View::make('pages.admin.state.index')->with('states',$states);\n\t}",
"public function index()\n {\n return $this->model->all();\n }",
"public function getAllStates(){\n\n $states = $this->stateRepo->get();\n $states_array = array();\n if($states){\n foreach($states as $key=>$state)\n {\n $states_array[$key]['id'] = $state->getId();\n $states_array[$key]['name'] = $state->getName();\n\n }\n }\n return json_encode($states_array);\n }",
"public function index()\n {\n return view('admin.states.index');\n }",
"public function states()\n {\n return $this->hasMany('App\\State', 'country_id')->orderby('name', 'asc');\n }",
"public function states()\n {\n return $this->hasMany(State::class);\n }",
"public function show()\n {\n $states = State::all();\n\n return response([ 'data' => $states, 'success' => 1], 200);\n }",
"public function actionIndex()\n\t{ \n\t\t$this->render('states');\n\t}",
"public function index()\n {\n return $this->model->getAll();\n }",
"public function index()\n {\n\t\t$validUser = $this->CheckUser();\n\t\tif($validUser) return\tview('errors.404');\n\n $state =\\DB::table('states')->where('states.deleted',0)->groupBy('states.id')\n\t\t->paginate(trans('messages.PAGINATE'));\n\n return view('state.index', compact('state'));\n }",
"public function index(){\n return $this->model->all();\n }",
"public function states()\n\t{\n\t\t$states = State::all();\n\t\treturn StudentResource::collection($states);\n\t}",
"public function getStatesModel()\n\t{\n\t\treturn $this->statesModel = new StatesModel();\n\t}",
"public function index()\n {\n return Model::all();\n }",
"public function getStatesList() {\n \t$user = Auth::user();\n \t$states = $user->states->sortBy('type_id');\n \treturn $states;\n }",
"public function index()\n {\n //$this->authorize('manage_site');\n\n //$states = State::all();\n $states = State::query()->where('stype_id','=',1)->withCount('constituencies')->get();\n $uts = State::query()->where('stype_id','=',2)->withCount('constituencies')->get();\n\n return view('state.index',compact('states','uts'));\n }",
"public function states()\n {\n return $this->belongsToMany('App\\State');\n }",
"public function getCollection()\n {\n\n $State = State::select('tbl_state.*');\n return $State->get();\n }",
"public function states()\n {\n return $this->hasMany('App\\State');\n }",
"public function getStateList()\r\n\t{\r\n\t\t$this->db->select('*');\r\n\t\t$this->db->from('state');\r\n\t\t$this->db->where('state_status', '1');\r\n\t\t$query = $this->db->get();\r\n\t\treturn $query->result() ;\r\n\t}",
"public function getAll()\n {\n return $this->model->all();\n }",
"public function getAll()\n {\n return $this->model->all();\n }",
"public function getAll()\n {\n return $this->model->all();\n }",
"public function all()\n {\n return $this->model->get();\n }",
"public function GetAll()\n {\n return $this->model->all();\n }",
"public function all()\n {\n return $this->model->get();\n }",
"public function index()\n\t{\n\t\t//custom message if this methods throw an exception\n\t\t\\Session::put('errorOrigin', \" mostrando los estados\");\n\n\t\t//custom route to REDIRECT redirect('x') if there's an error\n\t\t\\Session::put('errorRoute', \"error\");\n\t\t\n\t\t$states = $this->model->paginate();\n\n\t\treturn view('admin/states/index', compact('states'));\n\t}",
"public function getStateList()\n\t{\n\t\t$this->db->select('*');\n\t\t$this->db->from('state');\n\t\t$this->db->where('state_status', '1');\n\t\t$query = $this->db->get();\n\t\treturn $query->result() ;\n\t}",
"public function index()\n {\n return Stores::all();\n }",
"public function getStateList()\r\n\t{\r\n\t\t$this->db->select('*');\r\n\t\t$this->db->from('state');\r\n\t\t$this->db->where('state_status', '1');\r\n\t\t$query = $this->db->get();\r\n\t\treturn $query->result() ;\t\r\n\t}",
"public function all()\n {\n return Model::all();\n }",
"public function all()\n {\n return Model::all();\n }",
"public function index()\n {\n return Entity::all();\n }",
"public function index()\n {\n $states = ProjectState::all();\n return response()->json($states);\n }",
"public function actionIndex() {\n $searchModel = new RealEstateMasterSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n $dataProvider->pagination = ['pageSize' => 40,];\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function state_list(){\n $entity_manager = $this->getEntityManager(); //access entity manager from inside the repository\n try{\n $query = $entity_manager->createQuery('SELECT s.name FROM UsersUserManageBundle:state s ');\n return $query->getArrayResult( ); // array of state objects\n throw new \\Exception( 'Database error in :: _state_list() function in UsermanageController' );\n }catch( \\Exception $e ){\n \n }\n }",
"function index(){\r\n \r\n $all = $this->model->selectAll();\r\n $this->data('all', $all);\r\n $this->loadView();\r\n }",
"protected function state_all() {\n return $this->_views->all_json();\n }",
"public function index()\n {\n $realestates=Realestate::paginate(15);\n return view('realestates.showall')->with('realestates',$realestates);\n }",
"public function all()\n {\n return $this->model->all();\n }",
"public function all()\n {\n return $this->model->all();\n }",
"public function all()\n {\n return $this->model->all();\n }",
"public function all()\n {\n return $this->model->all();\n }",
"public function all()\n {\n return $this->model->all();\n }",
"public function all()\n {\n return $this->model->all();\n }",
"public function all()\n {\n return $this->model->all();\n }",
"public function all()\n {\n return $this->model->all();\n }",
"public function all()\n {\n return $this->model->all();\n }",
"public function all()\n {\n return $this->model->all();\n }",
"public function listModels() {\n\n $config = $this->initConfig($version = AnalyzeModel::VERSION);\n\n $config->setQuery( [ 'version' => $version ] );\n\n $config->setMethod(HttpClientConfiguration::METHOD_GET);\n $config->setType(HttpClientConfiguration::DATA_TYPE_JSON);\n $config->setURL(self::BASE_URL.\"/models\");\n\n return $this->sendRequest($config);\n }",
"public function getStates(Request $request) {\n\n $states = StateModel::where('country_id', $request->country_id)->get();\n\n return response()->json($states);\n }",
"public function indexAction(Request $request)\n {\n $stateCollection = $this->getDoctrine()->getManager()->getRepository('LthrtCCSBundle:State')->findAll();\n\n return [\n 'stateCollection' => $stateCollection,\n ];\n }",
"public function states()\n {\n return $this->hasMany('App\\SelectedState');\n }",
"public function all()\n {\n return $this->getModel()->all();\n }",
"public function all()\n\t{\n\t\treturn $this->model->all();\n\t}",
"public function index()\n {\n //\n $cities = City::withcount('states')->get();\n return view('admin.cities.index', ['cities' => $cities]);\n\n }",
"public function get_all_state()\n\t {\n\t \t $data=(array)json_decode(file_get_contents(\"php://input\"));\n\t \t$id=$data['country_id'];\n\t \t$query=$this->ApiModel->get_all_state($id);\n\t \techo json_encode($query);\n\t }",
"public function getList()\n {\n $this->db->order_by(\"id\", 'desc');\n $this->db->where('status', 1);\n return $this->db->get($this->model);\n }",
"public function index(Request $request)\n {\n $states = $this->stateRepository->all(\n $request->except(['skip', 'limit']),\n $request->get('skip'),\n $request->get('limit')\n );\n\n return $this->sendResponse(\n $states->toArray(),\n __('messages.retrieved', ['model' => __('models/states.plural')])\n );\n }",
"public function states() : HasMany {\n return $this->hasMany(States::class);\n }",
"public function all()\n {\n if (!$this->isLogged()) exit;\n $this->oUtil->getModel('Todo');\n $this->oModel = new \\TestProject\\Model\\Todo;\n\n $this->oUtil->oTodos = $this->oModel->getAll();\n\n $this->oUtil->getView('index');\n }",
"public function index(State $state)\n {\n $cities = $state->cities;\n\n return $this->showAll($cities,Citie::class);\n }",
"public function index(Request $request)\n {\n if (isset($request->q)) {\n $states = State::where('name', 'like', \"%$request->q%\")->paginate(10);\n } else {\n $states = State::paginate(10);\n }\n return view('admin.states.index')->with('states', $states);\n }",
"public function getAll()\n {\n return $this->model->orderBy('id', 'DESC')->get();\n }",
"private function getAllModels()\n {\n return (object)ModelRegistry::getAllObjects();\n }",
"public function findAll()\n {\n return $this->model->all();\n }",
"public function getModels();",
"public function getModels();",
"public function all() {\n return $this->model->orderBy('created_at', 'ASC')->get();\n }",
"public function index()\n {\n return $this->repository->all();\n }",
"public function index()\n {\n return $this->repository->all();\n }",
"public function listAll ()\n {\n return response()\n ->view( 'pages.esp.esp-index' );\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getEntityManager();\n\n $entities = $em->getRepository('INHack20InventarioBundle:Estado')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }",
"public function index() {\n\t\treturn $this->repository->all();\n\t}",
"public function index()\n {\n $sale = Sale::all();\n return $this->showAll($sale);\n }",
"public function all(){\r\n\treturn $this->getRepository()->findAll();\r\n }",
"public function index()\n {\n if( auth()->user()->is_admin ){\n return Enterprise::orderBy('created_at', 'desc')\n ->paginate(10);\n }\n\n return Enterprise::where('is_active', 1)\n ->with(['stores' => function ($query) {\n $query->where('is_active', 1);\n }])\n ->orderBy('name', 'asc')\n ->get();\n }",
"public function index()\n\t{\n /*Create Breadcumb*/\n $this->make_bread->add('State', '', 0);\n $arrData['breadcrumb'] = $this->make_bread->output();\n /*Create Breadcumb*/\n\n $arrData['statelist'] = $this->master->view_record();\n\t\treturn load_view(\"State/view\",$arrData);\n\t}",
"public function index()\n {\n return $this->itemRepo->findAll();\n }",
"function GetStates () {\n\t\t$this->db->order_by('name_long','ASC');\n\t\t$result = $this->db->get('states');\n\n\t\t$states = array();\n\t\tforeach ($result->result_array() as $state) {\n\t\t\t$states[] = array(\n\t\t\t\t\t\t\t'code' => $state['name_short'],\n\t\t\t\t\t\t\t'name' => $state['name_long']\n\t\t\t\t\t\t);\n\t\t}\n\n\t\treturn $states;\n\t}",
"public function index()\n {\n return $this->findModel()->toArray();\n }",
"public function getAll()\n {\n return DB::table('product_models')->get()->all();\n }",
"public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Status::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function index()\n {\n $cities = City::all();\n return $this->showAll($cities);\n }",
"public function index()\n {\n return $this->menu->all();\n }",
"public function models()\n {\n $this->_display('models');\n }",
"public function viewallunitmodelsAction() {\n\n\t\t$model = new Unit_Model_UnitModel();\n\t\t$this->view->records = $model->fetchAll( 'name','ASC' );\n \n\t\tif( $this->view->records ) {\n $attached = $model->getAttachedModels();\n $this->view->attached = $attached;\n\t\t $this->view->paginator = $this->paginate( $this->view->records );\n }\n\t}",
"public function getStateModel() {}",
"public function index()\n {\n return $this->showList(ObjectMuseum::where('deleted','=',ObjectMuseum::ACTIVE)->get());\n }",
"public function index()\n {\n try {\n $states = State::selection()->orderBy('id', 'DESC')->paginate(PAGINATION_COUNT);\n return view('states::index', compact('states'));\n } catch (\\Exception $ex) {\n return redirect()->route('dashboard')->with(['error' => 'لقد حدث خطأ برجاء المحاولة فيما بعد']);\n }\n }",
"public function showAll()\n {\n $objects = $this->repo->showAll();\n return view('admin.showAll', compact('objects') );\n }"
] | [
"0.7283279",
"0.6977766",
"0.68433505",
"0.6832695",
"0.6695995",
"0.66493887",
"0.6639326",
"0.6548357",
"0.6479111",
"0.6472678",
"0.6450991",
"0.6395246",
"0.6392002",
"0.63797766",
"0.63699",
"0.6369236",
"0.63400453",
"0.6296572",
"0.629589",
"0.62736213",
"0.62472576",
"0.6246889",
"0.62366223",
"0.6232469",
"0.6190184",
"0.61894405",
"0.6167681",
"0.614993",
"0.6146862",
"0.61454624",
"0.61454624",
"0.61454624",
"0.61422795",
"0.61243325",
"0.61156434",
"0.61130315",
"0.61124885",
"0.6110605",
"0.6089798",
"0.60758483",
"0.60758483",
"0.6068175",
"0.6054374",
"0.6046613",
"0.6045412",
"0.604109",
"0.6029898",
"0.6026231",
"0.6023365",
"0.6023365",
"0.6023365",
"0.6023365",
"0.6023365",
"0.6023365",
"0.6023365",
"0.6023365",
"0.6023365",
"0.6023365",
"0.60022104",
"0.599367",
"0.5989607",
"0.5988081",
"0.5986838",
"0.59861684",
"0.5971547",
"0.5969502",
"0.5957777",
"0.59567946",
"0.5952503",
"0.5951182",
"0.59506494",
"0.5945759",
"0.5933902",
"0.59336543",
"0.5924887",
"0.59219635",
"0.59219635",
"0.5918644",
"0.59130275",
"0.59130275",
"0.59119564",
"0.59021616",
"0.5876427",
"0.5873121",
"0.58698636",
"0.5846633",
"0.584239",
"0.58312947",
"0.58270365",
"0.58233184",
"0.5818591",
"0.5812444",
"0.5807928",
"0.58071965",
"0.58028126",
"0.5802016",
"0.5800998",
"0.5793692",
"0.5782493",
"0.5780061"
] | 0.66998833 | 4 |
Displays a single States model. | public function actionView($id)
{
return $this->render('view', [
'model' => $this->findModel($id),
]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function show(State $state)\n {\n //\n }",
"public function show($id)\n {\n\t\t$validUser = $this->CheckUser();\n\t\tif($validUser) return\tview('errors.404');\n\n $state = State::findOrFail($id);\n\n return view('state.show', compact('state'));\n }",
"public function show($id)\n {\n if (!empty($id)) {\n $stateDetails = $this->service->getDetailsById($id);\n\n return view('admin.states.show', ['state' => $stateDetails]);\n }\n\n return redirect(route('state.list'));\n }",
"public function show()\n {\n $states = State::all();\n\n return response([ 'data' => $states, 'success' => 1], 200);\n }",
"public function actionIndex()\n\t{ \n\t\t$this->render('states');\n\t}",
"public function index()\n\t{\n /*Create Breadcumb*/\n $this->make_bread->add('State', '', 0);\n $arrData['breadcrumb'] = $this->make_bread->output();\n /*Create Breadcumb*/\n\n $arrData['statelist'] = $this->master->view_record();\n\t\treturn load_view(\"State/view\",$arrData);\n\t}",
"public function show($id)\n {\n //$constituencies = Constituency::where('state_id','=',$state->id)->get();\n //$parties = $state->parties()->get();\n $stateCount = State::all()->count();\n $states = State::all();\n $state = State::where('id','=',$id)->with('languages','ruling','opposition')->first();\n return view('state.show',compact('state','constituencies','parties','states','stateCount'));\n }",
"public function index()\n {\n return view('admin.states.index');\n }",
"public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => CallStates::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function show($id)\n {\n //GET states/$id\n $state = State::find($id);\n\n return JSON_encode(compact('state'));\n }",
"public function index()\n {\n\t\t$validUser = $this->CheckUser();\n\t\tif($validUser) return\tview('errors.404');\n\n $state =\\DB::table('states')->where('states.deleted',0)->groupBy('states.id')\n\t\t->paginate(trans('messages.PAGINATE'));\n\n return view('state.index', compact('state'));\n }",
"public function index()\n {\n //$states = State::orderBy('id','desc')->paginate(10);\n\n $states = State::with('City')->paginate(10);\n\n return view('admin/state/index')->with('states', $states);\n }",
"public function show(ProjectState $projectState)\n {\n //\n }",
"public function actionCreate()\n {\n $model = new States();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function index()\n\t{\n\t\t$states = State::paginate(15);\n\t\treturn View::make('pages.admin.state.index')->with('states',$states);\n\t}",
"public function index()\n {\n //$this->authorize('manage_site');\n\n //$states = State::all();\n $states = State::query()->where('stype_id','=',1)->withCount('constituencies')->get();\n $uts = State::query()->where('stype_id','=',2)->withCount('constituencies')->get();\n\n return view('state.index',compact('states','uts'));\n }",
"public function show(RealEstate $realEstate)\n {\n //\n }",
"public function showAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/show', array(\n\t\t\t'title' => $school->name,\n\t\t\t'entity' => $school,\n\t\t\t'locations' => $school->locations()\n\t\t) ) );\n\t}",
"public function actionIndex()\n {\n $searchModel = new StatesSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n if(Yii::$app->request->isAjax && Yii::$app->request->post('status_token'))\n {\n $id = Yii::$app->request->post('id');\n $model = $this->findModel($id);\n return $this->changeStatus($model);\n }\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function index()\n {\n \n\n Return View::make('real_state.list', array('real_state' => RealState::all()));\n }",
"public function show($id)\n {\n try {\n $state = State::find($id);\n if (!$state) {\n return redirect()->route('countries')->with(['error' => 'هذة المحافظه غير موجودة']);\n }\n return view('states::show', compact('state'));\n } catch (\\Exception $ex) {\n return redirect()->route('countries')->with(['error' => 'لقد حدث خطأ برجاء المحاولة فيما بعد']);\n }\n }",
"public function actionIndex()\n {\n\t\t$id = 1;\n return $this->render('/backend/siteinfo/view', [\n 'model' => $this->findModel($id),\n ]);\n }",
"public function edit($id)\n {\n $state = State::findOrFail($id);\n\n return view('admin/state/edit')->with('state', $state);\n }",
"public function actionViewByStaf($id){\n return $this->render('viewByStaf',[\n 'model' => $this->findModel($id),\n ]);\n }",
"public function edit($id)\n {\n\t\t$validUser = $this->CheckUser();\n\t\tif($validUser) return\tview('errors.404');\n\n $state = State::findOrFail($id);\n\n return view('state.edit', compact('state'));\n }",
"public function show(ZoznamStn $zoznamStn)\n {\n //\n }",
"public function indexAction()\n\t{\n\t\t$this->render( View::make( 'schools/index' , array(\n\t\t\t'title' => 'Mes Écoles',\n\t\t\t'entities' => School::all()\n\t\t) ) );\n\t}",
"public function getState($state)\n {\n $projects = Project::where('state', $state)->get();\n return view('main')->with(['state'=> $state,'projects'=> $projects]);\n }",
"public function show() {\n \n \n }",
"public function showAction() {\n $news = $this->newsRepository->findByUid($GLOBALS['TSFE']->id);\n $this->view->assign('news', $news)\n ->assign('settings', $this->settings);\n }",
"public function index()\n\t{\n\t\t//custom message if this methods throw an exception\n\t\t\\Session::put('errorOrigin', \" mostrando los estados\");\n\n\t\t//custom route to REDIRECT redirect('x') if there's an error\n\t\t\\Session::put('errorRoute', \"error\");\n\t\t\n\t\t$states = $this->model->paginate();\n\n\t\treturn view('admin/states/index', compact('states'));\n\t}",
"public function show(State $departamento)\n {\n return view('admin.states.show')->with('state', $departamento);\n }",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show(NRCState $nRCState)\n {\n //\n }",
"public function create()\n {\n return view('admin.states.create');\n }",
"public function create()\n {\n return view('admin.states.create');\n }",
"public function show(Store $store)\n {\n //\n }",
"public function show(Store $store)\n {\n //\n }",
"public function show(Store $store)\n {\n //\n }",
"public function getStateModel() {}",
"public function show()\n {\n $students = Student::all();\n return view('admin.students.index', compact('students', 'class'));\n }",
"public function show() {\n \n }",
"public function create()\n {\n return view('admin/state/create');\n }",
"public function actionShow()\r\n\t{\r\n\t\t$this->render('show',array('model'=>$this->loadcontent()));\r\n\t}",
"public function show($id)\n {\n return view('models::show');\n }",
"public function actionView()\n\t{\n\t\t$model = $this->loadModel();\n\t\t$this->render('view',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}",
"public function actionView()\n {\n $id=(int)Yii::$app->request->get('id');\n return $this->render('view', [\n 'model' => $this->findModel($id),\n ]);\n }",
"public function actionView()\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel(),\n\t\t));\n\t}",
"public function actionView()\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel(),\n\t\t));\n\t}",
"public function actionView()\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel(),\n\t\t));\n\t}",
"public function actionView()\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel(),\n\t\t));\n\t}",
"public function actionView()\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel(),\n\t\t));\n\t}",
"public function index()\n {\n try {\n $states = State::selection()->orderBy('id', 'DESC')->paginate(PAGINATION_COUNT);\n return view('states::index', compact('states'));\n } catch (\\Exception $ex) {\n return redirect()->route('dashboard')->with(['error' => 'لقد حدث خطأ برجاء المحاولة فيما بعد']);\n }\n }",
"public function show($id)\n {\n return view('show-syllabus');\n }",
"public function locationshowAction()\n {\n $em = $this->getDoctrine()->getManager();\n $countries = $em->getRepository('adminBundle:countries')->findAll();\n return $this->render(':Location:index.html.twig', array(\n 'countries' => $countries,\n ));\n }",
"public function show($id)\n {\n //return view('statuses.index', compact('status'));\n }",
"public function show()\r\n\t{\r\n\t\t\r\n\t\t$model = $this->getProfileView();\r\n\t\t$data = array('model'=> $model);\r\n\t\t\r\n\t\treturn $this->render($data);\r\n\t\t\r\n\t}",
"public function show()\n\t{\n\n\t}",
"public function show(Status $status)\n {\n //\n }",
"public function show(Status $status)\n {\n //\n }",
"public function show(Status $status)\n {\n //\n }",
"public function IndexPage()\n {\n $record = TypesTargetsModel::all(); \n\n return view('TypesTargets', compact('record'));\n\n }",
"public function show()\n {\n //\n }",
"public function edit($id)\n {\n //\n $data = State::find($id);\n return view('admin.state.edit',['data'=>$data]);\n }",
"public function show()\n\t{\n\t\t\n\t}",
"public function actionView()\n {\n $this->render('view', array(\n 'model' => $this->loadModel(),\n ));\n }",
"public function actionView() {\n $this->render('view', array(\n 'model' => $this->loadModel(),\n ));\n }",
"public function show() {\n\t}",
"public function show()\n {\n \n }",
"public function show()\n {\n \n }",
"public function viewAction()\n {\n $id = $this->_getPrimaryId();\n $row = $this->_getRow($id);\n\n $this->view->row = $row;\n }",
"public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}",
"public function show($id)\r\n {\r\n if ($this->StoresRepository->getEdit($id)) {\r\n\r\n $userInfo = $this->UserRepository->getUserInfoByUserId(Auth::user()->id);\r\n if (! $this->checkStoreAdminStatus($id, $userInfo)) {\r\n return redirect()->route('home')->withErrors('Sorry, We have not privileges to go to that page.');\r\n }\r\n $nameOfPage = 'View Store Page';\r\n $storeInfo = $this->StoresRepository->getStoreInfoByIdWithShedule($id);\r\n $this->convertDateToHourMinute($storeInfo->time_shedule);\r\n\r\n return view('admin.stores.store.view', compact(self::viewShareVarsAdminStorePanelStore));\r\n } else {\r\n return redirect()->back()->withErrors('This store does not exist.');\r\n }\r\n }",
"public function show()\n { \n \n }",
"public function actionView()\n\t{\n\t\tif (!($model = $this->loadModel()))\n\t\t\treturn;\n\t\t$this->render('view',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}",
"public function show()\n {\n\n }",
"public function index()\n {\n return $this->render('index', [\n 'model' => $this->model,\n ]);\n }",
"public function edit($id)\n {\n if (!empty($id)) {\n $stateDetails = $this->service->getDetailsById($id);\n\n return view('admin.states.edit', ['state' => $stateDetails]);\n }\n\n return redirect(route('state.list'));\n }",
"public function actionViewByHrdStaf($id){\n return $this->render('viewByHrdStaf',[\n 'model' => $this->findModel($id),\n ]);\n }",
"public function show()\n {\n \n }",
"public function show()\n {\n \n }",
"public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => InsightsDef::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function index()\n {\n $streets = Street::all();\n return view('admin.street.index', compact('streets'));\n }",
"public function show($id)\n\t{\n\t\t//\n\t\t$data=StoreItem::find($id)->first();\n\t\t\n\t\treturn View::make('Items.show')->with('data',$data)->with('title','Show Item');\n\t\n\t}",
"public function show($id)\n {\n $structure = $this->structureRepository->find($id);\n\n if (empty($structure)) {\n Flash::error('Structure not found');\n\n return redirect(route('structures.index'));\n }\n\n return view('structures.show')->with('structure', $structure);\n }",
"public function actionView($id = 1)\n {\n return $this->render('/backend/siteinfo/view', [\n 'model' => $this->findModel($id),\n ]);\n }",
"public function show()\n {\n return view('hirmvc::show');\n }",
"public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Status::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function show($id)\n {\n return view('workflow::show');\n }",
"public function show()\n {\n }",
"public function show()\n {\n }",
"public function show()\n {\n }",
"public function show()\n {\n }",
"public function show()\n {\n }",
"public function show()\n {\n }",
"public function show()\n {\n }",
"public function edit($id)\n {\n $real_state = RealState::find($id);\n return View::make('real_state.edit', array('real_state' => $real_state));\n }",
"public function showAction()\n {\n $this->setPageTitle(sprintf($this->_('Show %s'), $this->getTopic()));\n\n $model = $this->getModel();\n // NEAR FUTURE:\n // $this->addSnippet('ModelVerticalTableSnippet', 'model', $model, 'class', 'displayer');\n $repeater = $model->loadRepeatable();\n $table = $this->getShowTable();\n $table->setOnEmpty(sprintf($this->_('Unknown %s.'), $this->getTopic(1)));\n $table->setRepeater($repeater);\n $table->tfrow($this->createMenuLinks($this->menuShowIncludeLevel), array('class' => 'centerAlign'));\n\n if ($menuItem = $this->findAllowedMenuItem('edit')) {\n $table->tbody()->onclick = array('location.href=\\'', $menuItem->toHRefAttribute($this->getRequest()), '\\';');\n }\n\n $tableContainer = \\MUtil_Html::create('div', array('class' => 'table-container'), $table);\n $this->html[] = $tableContainer;\n }",
"public function show()\n {\n $board = Board::first();\n return view('board', ['board' => $board]);\n }"
] | [
"0.7362048",
"0.70953625",
"0.69689673",
"0.6899548",
"0.6869813",
"0.67824715",
"0.67346084",
"0.6678377",
"0.65433425",
"0.6502715",
"0.6462656",
"0.64348304",
"0.6431584",
"0.6408287",
"0.64033294",
"0.6362452",
"0.63256836",
"0.63177353",
"0.6308643",
"0.6279305",
"0.62758434",
"0.6272014",
"0.61885417",
"0.6147712",
"0.61135423",
"0.60903776",
"0.6075817",
"0.6069562",
"0.6063395",
"0.6049711",
"0.6034974",
"0.60221195",
"0.6018864",
"0.6018864",
"0.6018864",
"0.6013354",
"0.6004323",
"0.6004323",
"0.5957817",
"0.5957817",
"0.5957817",
"0.5955217",
"0.595404",
"0.59487516",
"0.5946607",
"0.5933774",
"0.5928597",
"0.5927793",
"0.5926917",
"0.591354",
"0.591354",
"0.591354",
"0.591354",
"0.591354",
"0.59109485",
"0.5910018",
"0.59095776",
"0.5908146",
"0.5897632",
"0.589655",
"0.58933043",
"0.58933043",
"0.58933043",
"0.58907807",
"0.5889556",
"0.5888994",
"0.58878404",
"0.5886097",
"0.5884629",
"0.5878187",
"0.58676916",
"0.58676916",
"0.58657277",
"0.58542526",
"0.5853232",
"0.5828221",
"0.5821097",
"0.5819407",
"0.58176714",
"0.5812783",
"0.5806846",
"0.57973486",
"0.57973486",
"0.5795113",
"0.57767105",
"0.577418",
"0.5770953",
"0.57708967",
"0.57642716",
"0.5762797",
"0.57614374",
"0.5758679",
"0.5758679",
"0.5758679",
"0.5758679",
"0.5758679",
"0.5758679",
"0.5758679",
"0.5753094",
"0.5749657",
"0.57495195"
] | 0.0 | -1 |
Creates a new States model. If creation is successful, the browser will be redirected to the 'view' page. | public function actionCreate()
{
$model = new States();
if ($model->load(Yii::$app->request->post()) && $model->save()) {
return $this->redirect(['view', 'id' => $model->id]);
} else {
return $this->render('create', [
'model' => $model,
]);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function actionCreate()\n {\n $model = new callStates();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function actionCreate()\n\t{\n\t\t$this->addBreadCrumb(at('Create'));\n\t\t$model=new ReferenceGeoStates;\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['ReferenceGeoStates']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ReferenceGeoStates'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}",
"public function create()\n {\n return view('admin.states.create');\n }",
"public function create()\n {\n return view('admin.states.create');\n }",
"public function create()\n\t{\n\t\t//custom message if this methods throw an exception\n\t\t\\Session::put('errorOrigin', \" accediendo a la creación de estados\");\t\n\n\t\t//custom route to REDIRECT redirect('x') if there's an error\n\t\t\\Session::put('errorRoute', \"states\");\n\n\t\treturn view('admin/states/create');\n\t}",
"public function create()\r\n {\r\n $form=[\r\n \"value\" => \"add\",\r\n \"name\" => \"Add City\",\r\n \"submit\" => \"Save\"\r\n ];\r\n\r\n $States=State::all();\r\n\r\n return view('city/form',compact('form','States'));\r\n }",
"public function actionCreate()\n {\n $model = new Status();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function create()\n {\n $sdata = State::all(); \n return view('admin.create',['sdata'=>$sdata]);\n }",
"public function create()\n {\n return view('admin/state/create');\n }",
"public function create()\n {\n $state=State::all();\n //$location_type=LocationType::all();\n return view('admin.master.ho_details.add',compact('state'));\n }",
"public function create(){\n $states = State::select('id','name')->get();\n return view('dashboard.address.city.create',compact('states'));\n }",
"public function actionCreate()\n {\n $model = new Slaves();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['index']);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function create()\n {\n $state = State::all();\n return view('city.add', compact('state'));\n }",
"public function actionCreate()\n\t{\n\t\t$model=new Store();\n\t\t$model->user_id = Yii::app()->user->id;\n\t\t$model->status = Store::STATUS_ACTIVE;\n\t\t$model->type = Store::TYPE_OFFLINE; // тип по умолчанию\n\t\t$model->save(false);\n\n\t\t$this->redirect($this->createUrl('update', array('id'=>$model->id)));\n\t}",
"public function create(){\n\t\t$title = $this->generaltitle;\n\t\t$arrStatedata = State::where('state_status','=','1')->orderBy('state_name', 'asc')->get();\n\t\tforeach($arrStatedata as $state)\n\t\t{\n\t\t\t$statedata[$state->state_id] = $state->state_name;\n\t\t}\n\t\treturn view('admin.property.addproperty')->with(compact('title','statedata'));\n }",
"public function create()\n {\n\t\t$validUser = $this->CheckUser();\n\t\tif($validUser) return\tview('errors.404');\n\n return view('state.create');\n }",
"public function actionCreate()\n {\n $model = new House();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['index']);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function store(){\n // state\n $state = new State;\n $state->name_en = Input::get('name_en');\n $state->name_jp = Input::get('name_jp');\n $state->region_id = Input::get('region_id');\n $state->rise_year = Input::get('rise_year');\n if(Input::has('is_rise_year_fixed')) $state->is_rise_year_fixed = true;\n $state->fall_year = Input::get('fall_year');\n if(Input::has('is_fall_year_fixed')) $state->is_fall_year_fixed = true;\n $state->explanation_en = Input::get('explanation_en');\n $state->explanation_jp = Input::get('explanation_jp');\n $state->capital_name_en = Input::get('capital_name_en');\n $state->capital_name_jp = Input::get('capital_name_jp');\n $state->save();\n\n //redirect\n Session::flash('message','Success create.');\n return Redirect::to('/admin/state');\n\n\t}",
"public function actionCreate()\n\t{\n\t\t$model=new Solicitudes;\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Solicitudes']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Solicitudes'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}",
"public function actionCreate()\n {\n $model = new StoreTransfer();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function create() {\n $data['states'] = State::all();\n return view('user.create', $data);\n }",
"public function actionCreate()\n {\n\t\t\tif (Yii::$app->user->can('create-countries'))\n\t\t\t{\n\t\t\t\t$model = new Mtprovinces();\n\n if ($model->load(Yii::$app->request->post())) {\n\t\t\t\t\t$model->province_created = date('Y-m-d h:i:s');\n\t\t\t\t\t$model->province_status = 'ACTIVE';\n\t\t\t\t\t$model->province_updated = date('Y-m-d h:i:s');\n\t\t\t\t\t$model->save();\n return $this->redirect(['index']);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthrow new ForbiddenHttpException; \n\t\t\t}\n \n }",
"public function create()\n {\n\n $portal_state = States::all();\n return view('admin.portal.create',compact('portal_list','portal_state'));\n }",
"public function createAction()\n {\n\n if (!$this->request->isPost()) {\n return $this->dispatcher->forward(array(\n \"controller\" => \"mission_user_state\",\n \"action\" => \"index\"\n ));\n }\n\n $mission_user_state = new MissionUserState();\n\n $mission_user_state->mission_id = $this->request->getPost(\"mission_id\");\n $mission_user_state->user_id = $this->request->getPost(\"user_id\");\n $mission_user_state->state = $this->request->getPost(\"state\");\n \n\n if (!$mission_user_state->save()) {\n foreach ($mission_user_state->getMessages() as $message) {\n $this->flash->error($message);\n }\n\n return $this->dispatcher->forward(array(\n \"controller\" => \"mission_user_state\",\n \"action\" => \"new\"\n ));\n }\n\n $this->flash->success(\"mission_user_state was created successfully\");\n\n return $this->dispatcher->forward(array(\n \"controller\" => \"mission_user_state\",\n \"action\" => \"index\"\n ));\n\n }",
"public function create()\n {\n $data=[];\n $data['all_state']= \\App\\Models\\state::orderBy('state_name')->get()->all();\n $data['latestmapapi'] = \\App\\Models\\mapapi::orderBy('created_at', 'DESC')->first();\n return view('admindash.master.locality_add',compact('data'));\n }",
"public function actionCreate() {\n $model = new Region;\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['index']);\n } else {\n $countryList = \\common\\models\\address\\Country::getNameArr();\n return $this->render('create', [\n 'model' => $model,\n 'countryList' => $countryList, \n ]);\n }\n }",
"public function actionCreate()\n {\n $model = new SasaranEs4();\n\n if ($model->load(Yii::$app->request->post())) {\n if ($model->save()){\n flash('success','Data Sasaran Eselon IV Berhasil Disimpan');\n return $this->redirect(['index']);\n }\n \n flash('error','Data Sasaran Eselon IV Gagal Disimpan');\n \n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function create()\n {\n //\nreturn view('counties.create',array('title'=>'Add New County'));\n\n }",
"public function create()\n {\n $arr['states'] = States::all();\n return view('admin.customer.create')->with($arr);\n\n }",
"public function actionCreate() {\n\t\t$model = new Building();\n\n\t\tif ( $model->load( Yii::$app->request->post() ) && $model->save() ) {\n\t\t\treturn $this->redirect( [ 'index', 'id' => $model->id ] );\n\t\t} else {\n\t\t\treturn $this->render( 'create', [\n\t\t\t\t'model' => $model,\n\t\t\t] );\n\t\t}\n\t}",
"public function actionCreate()\n {\n $model = new JetShopDetails();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $model = new City();\n $model->status = 'Active';\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n\n Yii::$app->session->setFlash('success', 'Governorate info created successfully!');\n return $this->redirect(['index']);\n\n } else {\n\n $countries = Country::loadcountry();\n $country = ArrayHelper::map($countries, 'country_id', 'country_name');\n\n return $this->render('create', [\n 'model' => $model, 'country' => $country,\n ]);\n }\n\n }",
"function addstate() {\n $clang = Yii::app()->lang;\n\n if (!Permission::model()->hasGlobalPermission('Regions', 'create')) {\n Yii::app()->setFlashMessage($clang->gT(\"You do not have sufficient rights to access this page.\"), 'error');\n $this->getController()->redirect(array(\"admin/index\"));\n }\n $new_state = flattenText(Yii::app()->request->getPost('new_state'), false, true);\n $country_name = (int) Yii::app()->request->getPost(\"country_name\");\n $zonelist = Yii::app()->request->getPost(\"zonelist\");\n $aData = array();\n if (empty($new_state)) {\n $aViewUrls['message'] = array('title' => $clang->gT(\"Failed to add State\"), 'message' => $clang->gT(\"A state was not supplied or the state is invalid.\"), 'class' => 'warningheader');\n } elseif ($country_name == 0) {\n $aViewUrls['message'] = array('title' => $clang->gT(\"Failed to add State\"), 'message' => $clang->gT(\"A country was not supplied or the country is invalid.\"), 'class' => 'warningheader');\n } elseif ($zonelist == 'zoneselect') {\n $aViewUrls['message'] = array('title' => $clang->gT(\"Failed to add State\"), 'message' => $clang->gT(\"A zone was not supplied or the zone is invalid.\"), 'class' => 'warningheader');\n } elseif ($zonelist == '0') {\n $aViewUrls['message'] = array('title' => $clang->gT(\"Failed to add State\"), 'message' => $clang->gT(\"A zone was not supplied or the zone is invalid.\"), 'class' => 'warningheader');\n } elseif (State::model()->findByAttributes(array('state_Name' => $new_state, 'zone_id' => $zonelist))) {\n $aViewUrls['message'] = array('title' => $clang->gT(\"Failed to add State\"), 'message' => $clang->gT(\"The State already exists.\"), 'class' => 'warningheader');\n } else {\n $iNewUID = State::model()->instState($new_state, $zonelist);\n if ($iNewUID) {\n Yii::app()->setFlashMessage($clang->gT(\"State added successfully\"));\n $this->getController()->redirect(array(\"admin/state/index\"));\n } else {\n $aViewUrls['mboxwithredirect'][] = $this->_messageBoxWithRedirect($clang->gT(\"Failed to add state\"), $clang->gT(\"The state already exists.\"), 'warningheader');\n }\n }\n\n $this->_renderWrappedTemplate('region/state', $aViewUrls, $aData);\n }",
"public function create()\n {\n try {\n $countries = Country::pluck('name', 'id');\n if (!$countries) {\n return redirect()->route('states::index')->with(['error' => 'برجاء التأكد من إضافة الدول اولا ثم اضافة المحافظات']);\n }\n return view('states::create', compact('countries'));\n } catch (\\Exception $ex) {\n return redirect()->route('states::index')->with(['error' => 'لقد حدث خطأ برجاء المحاولة فيما بعد']);\n\n }\n\n }",
"public function actionCreate()\n {\n $model = new Student();\n \n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $model = new CourseSite();\n\n if ($model->load(Yii::$app->request->post())){\n if($model->createCourseSite($model->course)){\n return $this->redirect(['view', 'id' => $model->id]);\n }\n }\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function create()\n\t{\n\t\t$this->load->view('StateOffices/create');\n\t}",
"public function create()\n {\n return view('state.create');\n }",
"public function actionCreate()\n {\n $model = new StandartOne();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function create()\n {\n $countries = Country::orderBy('countryname','ASC')\n ->lists('countryname', 'id');\n $states = State::orderBy('statename','ASC')\n ->lists('statename', 'id');\n return view('city.create')\n ->with('countries', $countries)\n ->with('states', $states);\n }",
"public function create()\n {\n\n //create a new, empty site\n\n $newSiteID = $this->sitemodel->createNew();\n\n redirect('sites/' . $newSiteID);\n }",
"public function store(StateRequest $request){\n try{\n $s = new City();\n $s->create([\n 'name'=>$request->name,\n 'states_id'=>$request->state_id,\n ]);\n return redirect()->route('address.All')->with(['success'=>'تم الإضافة بنجاح']);\n }catch (\\Exception $exception){\n return redirect()->route('address.All')->with(['error'=>'خطأ يرجي المحاولة فيما بعد']);\n }\n }",
"public function create()\n {\n $title = 'City Add';\n $menu = 'Profile Attributes';\n $country = Country::get();\n $state = State::get();\n return view('backend.city.create',compact('title','menu','state','country'));\n }",
"public function create()\n {\n $stores = Store::all();\n\n\n return view('Stores.create', compact('stores'));\n }",
"public function actionCreate()\n {\n $model = new Trees();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function actionCreate()\r\n\t{\r\n\t\t$model=new Study;\r\n\r\n\t\t// Uncomment the following line if AJAX validation is needed\r\n\t\t// $this->performAjaxValidation($model);\r\n\r\n\t\tif(isset($_POST['Study']))\r\n\t\t{\r\n\t\t\t$model->attributes=$_POST['Study'];\r\n\t\t\tif($model->save())\r\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\r\n\t\t}\r\n\r\n\t\t$this->render('create',array(\r\n\t\t\t'model'=>$model,\r\n\t\t));\r\n\t}",
"public function actionCreate()\n {\n $model = new StockLocation();\n\n if(Yii::$app->request->isAjax){\n if($model->load(Yii::$app->request->post()) && $model->save()){\n Yii::$app->response->format = Response::FORMAT_JSON;\n return Json::encode([true,$model->code]);\n }else{\n return Json::encode([false,$model->errors]);\n }\n \n \n }\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n //return $this->redirect(['view', 'code' => $model->code, 'user_id' => $model->user_id]);\n return $this->redirect(['index']);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n \n }\n }",
"public function actionCreate()\n\t{\n\t\t$model = new Post;\n\t\tif ($model->load(Yii::$app->request->post()) && $model->save())\n\t\t{\n\t\t\treturn $this->redirect(['site/index']);\n\t\t}\n\t\t\n\t\techo $this->render('create', array(\n\t\t\t'model' => $model\n\t\t));\n\t}",
"public function create()\n {\n $codes = NRCCode::all();\n return view('admin.nrcstate.create',compact('codes'));\n }",
"public function actionCreate()\n\t{\n\t\t$model = new Route();\n\n\t\tif ($model->load(Yii::$app->request->post())) {\n\t\t\t$model->save();\n\t\t\treturn $this->redirect(['view', 'id' => $model->name]);\n\t\t} else {\n\t\t\treturn $this->render('create', [\n\t\t\t\t'model' => $model,\n\t\t\t]);\n\t\t}\n\t}",
"public function store(Request $request)\n {\n\t\t$validUser = $this->CheckUser();\n\t\tif($validUser) return\tview('errors.404');\n\n $this->validate($request, ['stateName' => 'required|unique:states,stateName,null,id,deleted,0', ]);\n\n State::create($request->all());\n\n Session::flash('flash_message', 'State added!');\n\n return redirect('state');\n }",
"public function actionCreate() {\n $model = new Direction;\n\n // Uncomment the following line if AJAX validation is needed\n // $this->performAjaxValidation($model);\n\n if (isset($_POST['Direction'])) {\n $model->attributes = $_POST['Direction'];\n if ($model->save())\n $this->redirect(array('view', 'id' => $model->id));\n }\n\n $this->render('create', array(\n 'model' => $model,\n ));\n }",
"public function actionCreate()\n {\n $model = new Switchboard();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->switch_id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function actionCreate()\n {\n $model = new Menu();\n\n if ($model->load(Yii::$app->request->post())) {\n if($model->validate()){\n $model->save(false);\n return $this->redirect(['index']);\n }\n }\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function actionCreate() {\r\n $model = new Statements;\r\n\r\n // Uncomment the following line if AJAX validation is needed\r\n // $this->performAjaxValidation($model);\r\n\r\n if (isset($_POST['Statements'])) {\r\n $model->attributes = $_POST['Statements'];\r\n if ($model->save())\r\n $this->redirect(array('view', 'id' => $model->idStatement));\r\n }\r\n\r\n $this->render('create', array(\r\n 'model' => $model,\r\n ));\r\n }",
"public function actionCreate()\n\t{\n\t\t//\n\t\t// if ($model->load(Yii::$app->request->post()) && $model->validate()) {\n\t\t// try {\n\t\t// $model->save();\n\t\t// Yii::$app->session->setFlash('alert', [\n\t\t// 'body' => Yii::$app->params['create-success'],\n\t\t// 'class' => 'bg-success',\n\t\t// ]);\n\t\t// } catch (\\yii\\db\\Exception $exception) {\n\t\tYii::$app->session->setFlash('alert', [\n\t\t\t'body' => Yii::$app->params['create-danger'],\n\t\t\t'class' => 'bg-danger',\n\t\t]);\n\n\t\t// }\n\t\treturn $this->redirect(['index']);\n\t\t// }\n\n\t\t// return $this->render('create', [\n\t\t// 'model' => $model,\n\t\t// ]);\n\t}",
"public function create()\n {\n $province = Province::all();\n $bts_search = Bts_search::all();\n $mrt_search = Mrt_search::all();\n $shoppingMall = ShoppingMall::all();\n $shoppingMallto = ShoppingMallTO::all();\n $bts = Bts::all();\n $mrt = Mrt::all();\n $data = array(\n 'province' => $province,\n 'mrt' => $mrt,\n 'bts' => $bts,\n 'bts_search' => $bts_search,\n 'mrt_search' => $mrt_search,\n 'shoppingMall' => $shoppingMall,\n 'shoppingMallto' => $shoppingMallto,\n\n );\n return view(\"suunto.admin.addStore\",$data);\n }",
"public function actionCreate()\n {\n $model = new Event();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['update', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function create()\n\t{\n \t\treturn View::make('pages.admin.state.create');\n\t}",
"public function actionCreate()\n {\n $model = new StoreKasir();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->KASIR_ID]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function store()\n { \n $real_state = new RealState();\n $real_state->name = Input::get('name');\n $real_state->description = Input::get('description');\n $real_state->save(); \n return Redirect::route('real_state.index');\n }",
"public function actionCreate()\n\t{\n\t\t$model = $this->loadModel();\n\n\t\tif(isset($_POST[get_class($model)]))\n\t\t{\n $model = $this->_prepareModel($model);\n if (Yii::app()->getRequest()->isAjaxRequest) {\n if($model->save())\n echo json_encode($model);\n else\n echo json_encode(array('modelName' => get_class($model),'errors' => $model->getErrors()));\n\n Yii::app()->end();\n }\n\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}",
"public function actionCreate()\n {\n $model = new Orders();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function create()\n {\n $states = CountryState::getStates('US');\n\n $data = array();\n $data['states'] = $states;\n return view('admin.provider.create')->with($data);\n }",
"public function actionCreate()\n {\n $model = new Workplace();\n\n if ($this->request->isPost) {\n if ($model->load($this->request->post()) && $model->save()) {\n return $this->redirect(['cv/view', 'id' => $model->cv_id]);\n }\n } else {\n $model->loadDefaultValues();\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function actionCreate()\n\n {\n\n $model = new Orders();\n\n\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n\n\t\t\t\n\n\t\t\tYii::$app->session->setFlash('orders', 'Orders has been added successfully');\n\n return $this->redirect(['view', 'id' => $model->id]);\n\n } else {\n\n return $this->render('create', [\n\n 'model' => $model,\n\n ]);\n\n }\n\n }",
"public function actionCreate()\n {\n $model = new Data();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->no]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function create()\n {\n\n $states = \\App\\States::get();\n\n return view('backend.library.create', compact('states'));\n }",
"public function create()\n {\n \n $streets = Street::all();\n\n return view('house.create', compact('streets'));\n }",
"public function create()\n {\n //\n // return view('admin.shipmentstatuses.create');\n }",
"public function create()\n {\n $states=State::all();\n $categories = Category::all();\n return view('user.create')->with('states',$states)->with('categories',$categories);\n }",
"public function actionCreate()\n {\n $model = new ListRegionType();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n $getParams = Yii::$app->getRequest()->get();\n $model->generateDefaults($getParams);\n return $this->render('form', ['model' => $model]);\n }\n }",
"public function actionCreate()\n {\n $model=new Seat;\n\n // Uncomment the following line if AJAX validation is needed\n // $this->performAjaxValidation($model);\n\n if(isset($_POST['Seat']))\n {\n $model->attributes=$_POST['Seat'];\n if($model->save())\n $this->redirect(array('view','id'=>$model->id));\n }\n\n $this->render('create',array(\n 'model'=>$model,\n ));\n }",
"public function actionCreate()\n {\n $model = new ListWarehouse();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n $model->generateDefaults(Yii::$app->request->get());\n return $this->render('form', ['model' => $model]);\n }\n }",
"public function actionCreate()\n {\n $model = new Test();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n\t{\n \n $uid = Yii::app()->user->getId(); \n if($uid != 1){\n $value = ComSpry::getUnserilizedata($uid);\n if(empty($value) || !isset($value)){\n throw new CHttpException(403,'You are not authorized to perform this action.');\n }\n if(!in_array(37, $value)){\n throw new CHttpException(403,'You are not authorized to perform this action.');\n }\n }\n\t\t$model=new Stone;\n $models='';\n $priceopt=array('p'=>'Per Pc','c'=>'Per Ct');\n \n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Stone']))\n\t\t{\n if($this->checkDuplicate($_POST['Stone'])){\n\t\t\t\t$model->attributes=$_POST['Stone'];\n\t if($_POST['priceopt']=='c')\n\t $model->curcost=$model->weight*$_POST['Stone']['curcost'];\n\t $model->scountry=Stonem::model()->findByPk($model->idstonem)->scountry;\n\t $model->creatmeth=Stonem::model()->findByPk($model->idstonem)->creatmeth;\n\t $model->treatmeth=Stonem::model()->findByPk($model->idstonem)->treatmeth;\n\n\t\t\t\tif($model->save())\n\t\t\t\t\t Yii::app()->user->setFlash('errormessage', \"Stone created successfully!\");\n\t\t\t\t\t$this->redirect(array('create'));\n } else{\n Yii::app()->user->setFlash('errormessage', \"Cannot create a duplicate stone!\");\n }\n\t\t}\n $models=new Stone('search');\n $models->unsetAttributes(); // clear any default values\n if(isset($_GET['Stone']))\n $models->attributes=$_GET['Stone'];\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,'models'=>$models,'priceopt'=>$priceopt,\n\t\t));\n \n\t}",
"public function actionCreate()\n {\n $model = new SiteLang();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['index', 'id' => $model->code]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function actionCreate()\n {\n $model = new MintaData();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $model = new Rents();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n\t{\n\t\t$model=new Events;\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Events']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Events'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->event_id));\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}",
"public function actionCreate()\n {\n \t /** @var ActiveRecord $model */\n \t $modelClass = static::modelClass();\n \t $model = new $modelClass();\n\n\t$viewFolder = '/';\n\t$viewName = 'create';\n\t$viewExtension = '.php';\n\t$viewFile = $this->getViewPath().$viewFolder.$viewName.$viewExtension;\n\t$viewPath = file_exists($viewFile) ? '' : $this->getDefaultViewPath(false);\n\t\n\tif ($model->load(Yii::$app->request->post()) && $model->save()) {\n\t\t$this->processData($model, 'create');\n\t\treturn $this->redirect(['view', 'id' => $model->getPrimaryKey()]);\n\t} else {\n\t\treturn $this->render($viewPath.$viewName, array_merge($this->commonViewData(), [\n\t\t\t'model' => $model,\n\t]));\n\t}\n }",
"public function actionCreate()\n {\n $model = new TransInfo();\n\n if ($model->loadAll(Yii::$app->request->post(), ['salBasket']) && $model->saveAll(['salBasket'])) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function create()\n {\n $nis = $this->generateNIS();\n $citiesModel = $this->cityModel::orderBy('name','asc')->pluck('name', 'id');\n return view('Admin.pages.Siswa.create', [\n 'pageTitle' => 'Tambah Siswa',\n 'provinces' => $citiesModel,\n 'nis' => $nis\n ]);\n }",
"public function actionCreate() {\r\n $model = new Fltr();\r\n\r\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\r\n return $this->redirect(['view', 'id' => $model->id]);\r\n } else {\r\n return $this->render('create', [\r\n 'model' => $model,\r\n ]);\r\n }\r\n }",
"public function actionCreate()\n {\n\t\t//Generate Code\n\t\t$maxID=Store::find()->max('ID');\n\t\t$newID=str_pad($maxID+1,4,\"0\",STR_PAD_LEFT);\n\t\t\n $model = new Store();\n\t\t\n\t\t$model->OUTLET_BARCODE = $newID;\n\t\t$model->CREATE_BY = Yii::$app->user->identity->username;\n\t\t$model->CREATE_AT = date(\"Y-m-d H:i:s\");\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['index']);\n } else {\n return $this->renderAjax('_form', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $model=new StudentReg;\n\n // Uncomment the following line if AJAX validation is needed\n // $this->performAjaxValidation($model);\n\n if(isset($_POST['StudentReg']))\n {\n $model->attributes=$_POST['StudentReg'];\n if($model->save())\n $this->redirect(array('view','id'=>$model->id));\n }\n\n $this->render('create',array(\n 'model'=>$model,\n ));\n }",
"public function actionCreate()\n {\n $model = new Wallet();\n\n if ($model->loadAll(Yii::$app->request->post()) && $model->saveAll()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $model = new Admin();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function create()\n {\n // if (!auth()->user()->can('model.register')) {\n // abort(401, 'You are not allowed to access this page.');\n // }\n\n // if(!auth()->user()->hasPermissionTo('model.register', 'web')){\n // abort(401, 'You are not allowed to access this page.');\n // }\n\n $data['countries'] = Selector::GetCountries();\n $data['builds'] = Selector::GetBuilds();\n $data['services'] = Selector::GetServices();\n $data['availabilities'] = Selector::GetAvailabilities();\n\n return view('models::create')->with($data);\n }",
"public function create()\n\t{\n\t\treturn view('stafs.create');\n\t}",
"public function actionCreate()\n {\n $model = new Service();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n\n $cities = Yii::$app->getRequest()->post('cities');\n\n $model->attachCities($cities);\n\n $requestTypes = Yii::$app->getRequest()->post('request_types');\n\n $model->attachRequestTypes($requestTypes);\n\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function actionCreate()\n {\n $model = new Tournament();\n\n if ($model->load(Yii::$app->request->post()) && $model->createNewTournament()) {\n\n return $this->redirect(['view', 'id' => $model->id_t]);\n }\n\n return $this->render('create', [\n 'model' => $model\n ]);\n }",
"public function actionCreate()\n {\n $model = new Stock();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id_stock]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function actionCreate()\n {\n $model = new InfoSpares;\n // Uncomment the following line if AJAX validation is needed\n $this->performAjaxValidation($model);\n\n if (isset($_POST['InfoSpares'])) {\n $model->attributes = $_POST['InfoSpares'];\n $model->date_in = date('Y-m-d', strtotime($model->date_in));\n $model->status = \"Approve\";\n if ($model->car_or_spare_status_id == 1) {\n $model->branch_from_share = NULL;\n }\n if ($model->car_or_spare_status_id == 2 && empty($model->branch_from_share)) {\n Yii::app()->user->setFlash('error', \"ກະລຸນາເລືອກສາຂາ\");\n } else {\n if ($model->save())\n $this->redirect(array('index'));\n }\n }\n\n $this->render('create', array(\n 'model' => $model,\n ));\n }",
"public function actionCreate() {\n $model = new Stakeholder();\n\n if ($model->load(Yii::$app->request->post())) {\n $model->datecreated = Date('Y-m-d h:i:sa');\n\n if ($model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $model = new EstudiosIps();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function create() {\n\t\t$model = new $this->model_class;\n\t\t$model->status = 3;\n\t\t$model->author_id = Session::get('wildfire_user_cookie');\n\t\t$model->url = time();\n\t\tif(Request::get(\"title\")) $model->title = Request::get(\"title\");\n\t\telse $model->title = \"Enter Your Title Here\";\n\t\t$this->redirect_to(\"/admin/content/edit/\".$model->save()->id.\"/\");\n\t}",
"public function add()\n {\n /*Create Breadcumb*/\n $this->make_bread->add('State', 'state', 0);\n $this->make_bread->add('Add', '', 1);\n $arrData['breadcrumb'] = $this->make_bread->output();\n /*Create Breadcumb*/\n\n if($this->input->post()){\n $this->form_validation->set_rules('title','State name','trim|required|callback_alphaNumeric');\n if ($this->form_validation->run() == FALSE)\n { $arrData['has_error'] = 'has-error';\n return load_view(\"State/add\",$arrData);\n }else{\n $insert = array(\n 'title' => $this->input->post('title'),\n 'created_by' => loginUserId()\n );\n $this->master->add_record($insert);\n $this->session->set_flashdata('success','State added successfully.');\n redirect('state');\n }\n }else{\n return load_view(\"State/add\",$arrData);\n }\n }",
"public function actionCreate()\n {\n $model = new DsisSystemUserMenu();\n\n if ($model->loadAll(Yii::$app->request->post()) && $model->saveAll()) {\n return $this->redirect(['index']);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $model = new Mylive();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->live_id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }"
] | [
"0.7756728",
"0.7726155",
"0.7225145",
"0.7225145",
"0.70582044",
"0.701823",
"0.69757575",
"0.69082063",
"0.6899653",
"0.6861414",
"0.68595314",
"0.68527156",
"0.6807314",
"0.6777306",
"0.6776655",
"0.6759942",
"0.67380154",
"0.67326474",
"0.66638076",
"0.6638897",
"0.6616319",
"0.66003746",
"0.659298",
"0.6588545",
"0.6582581",
"0.6578688",
"0.6566925",
"0.6559995",
"0.6548829",
"0.65086204",
"0.6495631",
"0.6486622",
"0.64704674",
"0.6468387",
"0.64625245",
"0.644901",
"0.6441886",
"0.64397115",
"0.64302695",
"0.6402264",
"0.6382229",
"0.637833",
"0.63773483",
"0.6374579",
"0.6356908",
"0.63547075",
"0.63493127",
"0.6343349",
"0.6341247",
"0.6339764",
"0.63391876",
"0.63178897",
"0.6313156",
"0.6302375",
"0.62953204",
"0.6291667",
"0.62869096",
"0.6283122",
"0.62758225",
"0.6268025",
"0.6263696",
"0.62599534",
"0.6230161",
"0.62214816",
"0.6220473",
"0.62176573",
"0.62039346",
"0.61886513",
"0.618766",
"0.61868596",
"0.61847585",
"0.61846066",
"0.61774117",
"0.61728275",
"0.6170104",
"0.61691433",
"0.61683095",
"0.61672705",
"0.6163141",
"0.61597633",
"0.6155016",
"0.6153922",
"0.6151801",
"0.61509466",
"0.61412936",
"0.6140308",
"0.61321354",
"0.6129683",
"0.61214256",
"0.6119719",
"0.61196774",
"0.61189854",
"0.6112525",
"0.61115664",
"0.610414",
"0.61023754",
"0.6095258",
"0.6091054",
"0.60892147",
"0.6081705"
] | 0.8731533 | 0 |
Updates an existing States model. If update is successful, the browser will be redirected to the 'view' page. | public function actionUpdate($id)
{
$model = $this->findModel($id);
if ($model->load(Yii::$app->request->post()) && $model->save()) {
return $this->redirect(['view', 'id' => $model->id]);
} else {
return $this->render('update', [
'model' => $model,
]);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function actionUpdate($id)\n\t{\n\t\t$this->addBreadCrumb(at('Update').' #'.$id);\n\t\t$model=$this->loadModel($id);\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['ReferenceGeoStates']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ReferenceGeoStates'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t}\n\n\t\t$this->render('update',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}",
"Public function update()\n\t{ $data['store_id']= $this->input->post('store_id');\n\t $data['store_name']= $this->input->post('store_name');\n\t\t $data['user_id']= $this->input->post('user_id');\n\t\t $data['created_date']= $this->input->post('created_date');\n\t\t $data['updated_date']= $this->input->post('updated_date');\n\t\t $data['address_id']= $this->input->post('address_id');\n\t\t $result=$this->store->modify_store($data['store_id'], $data);\n\t\t if($result){\n\t\t \t redirect(base_url('store/storelist'));\n\t\t }else{\n echo\"<b>update failed</b>\";\n\t\t }\n\t\t\n\t}",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->US_ID]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function update($id)\n {\n //\n $real_state = RealState::find($id);\n $real_state->name = Input::get('name');\n $real_state->description = Input::get('description');\n $real_state->save();\n return Redirect::route('real_state.index');\n }",
"public function actionUpdate()\n {\n\t\t\t$id=7;\n $model = $this->findModel($id);\n $model->slug = \"asuransi\";\n $model->waktu_update = date(\"Y-m-d H:i:s\");\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['update']);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function update(Request $request, $id)\n\t{\n\t\t//custom message if this methods throw an exception\n\t\t\\Session::put('errorOrigin', \" actualizando el estado\");\t\n\n\t\t//custom route to REDIRECT redirect('x') if there's an error\n\t\t\\Session::put('errorRoute', \"states\");\n\t\t\n\t\t$inputs = $request->all();\n\t\tDB::beginTransaction();//starts database transaction. If there´s no commit no transaction\n\t\t\t//will be made. Also, all transactions can be rollbacked.\n\t\t\t\n\t\t$state = $this->model->find($id);\n\t\tif($state==null){\n\t\t\tthrow new \\Exception('Error en actualizar el estado con el id:' .$id\n\t\t\t\t. \" en el método StateController@update\");\n\t\t} else {\n\t\t\t$state->update($inputs);\n\t\t\tDB::commit();//commits to database \n\t\t\treturn redirect('states')->with('success', '¡Estado actualizado satisfactoriamente!');\n\t\t}\n\t}",
"public function update(StateRequest $request, $id)\n {\n $state = $this->service->saveOrUpdateDetails($request, $id);\n if ($state) {\n return redirect(route('state.edit',['state' => $state]))->with('success', 'State has been updated successfully!');\n }\n\n return back()->withInput();\n }",
"public function update(StateRequest $request,$id){\n try{\n $state = City::find($id);\n $state->update([\n 'name'=>$request->name,\n 'states_id'=>$request->state_id]);\n return redirect()->route('address.All')->with(['success'=>'تم التعديل بنجاح']);\n }catch (\\Exception $exception){\n return redirect()->route('address.All')->with(['error'=>'خطأ يرجي المحاولة فيما بعد']);\n }\n }",
"public function actionUpdate($id)\r\n {\r\n $model = $this->findModel($id);\r\n\r\n\t\tif(isset($_REQUEST['state_tax_add']))\r\n\t\t{\r\n\t\t\t$state_tax = new StateTax();\r\n\t\t\t\r\n\t\t\t$state_tax->tax_id = $model->id;\r\n\t\t\t$state_tax->country_id = $_REQUEST['country_id'];\r\n\t\t\t$state_tax->state_id = $_REQUEST['state_id'];\r\n\t\t\t$state_tax->tax_percentage = $_REQUEST['tax_percentage'];\r\n\t\t\t$state_tax->added_at = time();\r\n\r\n\t\t\tif($state_tax->save())\r\n\t\t\t{\r\n\t\t\t\tYii::$app->session->setFlash('success', Yii::t('app', 'Tax value added successfully!'));\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tYii::$app->session->setFlash('error', Yii::t('app', 'Error trying to add state tax'));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn $this->render('update', [\r\n 'model' => $model,\r\n ]);\r\n\t\t}\r\n\r\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\r\n //return $this->redirect(['update', 'id' => $model->id]);\r\n\r\n\t\t\treturn $this->redirect(['index']);\r\n } else {\r\n return $this->render('update', [\r\n 'model' => $model,\r\n ]);\r\n }\r\n }",
"public function update(StateRequest $request, $id)\n {\n $state = State::find($id);\n\n $state->update([\n 'name' => $request->name,\n ]);\n\n return redirect()->route('state.index')->with(['success' => 'تم تعديل المحلية بنجاح']);\n\n\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n $model->status = Status::STATUS_ACTIVE;\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n\n ]);\n }\n }",
"public function actionUpdate($id) {\n\t\t$model = $this->findModel ( $id );\n\t\t\n\t\tif ($model->load ( Yii::$app->request->post () ) && $model->save ()) {\n\t\t\treturn $this->redirect ( [ \n\t\t\t\t\t'view',\n\t\t\t\t\t'id' => $model->id \n\t\t\t] );\n\t\t}\n\t\t\n\t\treturn $this->render ( 'update', [ \n\t\t\t\t'model' => $model \n\t\t] );\n\t}",
"public function update(Request $request, $id)\n {\n State::findOrFail($id);\n\n $state = $request->input('state');\n\n DB::table('state')->where('id', $id)->update(['name' => $state]);\n\n return redirect('admin/state/');\n }",
"public function actionUpdate($id){\n //$id=getOrganisationID();\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n Yii::$app->session->setFlash('success', 'Saved successfully.');\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('update', [\n 'model' => $model,\n ]);\n }",
"public function actionUpdate($id)\r\n {\r\n $model = $this->findModel($id);\r\n\t\t//print_r(\"update mode\");exit;\r\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\r\n // return $this->redirect(['view', 'id' => $model->id]);\r\n\t\t return $this->redirect(['index']);\r\n }\r\n\r\n return $this->renderAjax('update', [\r\n 'model' => $model,\r\n ]);\r\n }",
"public function update($id, Request $request)\n {\t \n\t\t$validUser = $this->CheckUser();\n\t\tif($validUser) return\tview('errors.404');\n\n\t\t$state = State::findOrFail($id);\n $this->validate($request, ['stateName' => 'required|unique:states,stateName,'.$state->id.',id,deleted,0', ]);\n\t\t$updateCounters=Input::get ('updateCounter')+1;\n\t\t$updateCounterdata = DB::table('states')->where('id',$id)->value('updateCounter');\n\t\tif($updateCounterdata < $updateCounters)\n\t\t{\n $state->update($request->all());\n\t\tDB::table('states')->where('id', $id)->update(['updateCounter' => $updateCounters]);\n\n Session::flash('flash_message', 'State updated!');\n return redirect('state');\n\t\t}\n\t\telse\n\t {\n\t\tSession::flash('concurrency_message', 'Data has been changed by some other user');\n\t\treturn redirect('state');\n\t } \n }",
"public function actionUpdate($id) {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirectToPreviousUrl($model->id);\n } else {\n $this->rememberUrl($model->backURL, $id); \n \n $countryList = \\common\\models\\address\\Country::getNameArr();\n return $this->render('update', [\n 'model' => $model,\n 'countryList' => $countryList, \n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save())\n {\n return $this->redirect(['index']);\n }\n else\n {\n //var_dump($model);\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['index', 'id' => $model->code]);\n }\n\n return $this->render('update', [\n 'model' => $model,\n ]);\n }",
"public function actionUpdate($order_id, $item_id, $shipping_id)\n{\n$model = $this->findModel($order_id, $item_id, $shipping_id);\n\nif ($model->load(Yii::$app->request->post()) && $model->save()) {\nreturn $this->redirect(['view', 'order_id' => $model->order_id, 'item_id' => $model->item_id, 'shipping_id' => $model->shipping_id]);\n} else {\nreturn $this->render('update', [\n'model' => $model,\n]);\n}\n}",
"public function update(Request $request, $id)\n {\n //\n // $data = Admin::find($id);\n $data = $this->validate(request(),[\n 'state_name_ar'=>'required',\n 'state_name_en'=>'required',\n 'contries_id'=>'required',\n 'cites_id'=>new ExistRow,\n ]);\n \n\n \n State::find($id)->update($data);\n session()->flash('success',trans(\"admin.edit_been_admin\"));\n return redirect(aurl(\"state\"));\n \n }",
"public function actionUpdate()\n {\n if (!$model = $this->findModel()) {\n Yii::$app->session->setFlash(\"error\", Yii::t('modules/user', \"You are not logged in.\"));\n $this->goHome();\n } else if ($model->load(Yii::$app->request->post()) && $model->save()) {\n Yii::$app->session->setFlash(\"success\", Yii::t('modules/user', \"Changes has been saved.\"));\n $this->refresh();\n } else {\n return $this->render('update', ['model' => $model,]);\n }\n }",
"public function update(){\n\n if ($_POST[\"idSite\"] == \"\") {\n $site =new DiveSite();\n }else{\n $site = DiveSite::find($_POST[\"idSite\"]);\n }\n $site->name = $_POST[\"name\"];\n $site->description = $_POST[\"description\"];\n $site->difficulty = $_POST[\"difficulty\"];\n $site->latitude = $_POST[\"lat\"];\n $site->longitude = $_POST[\"lng\"];\n $site->save();\n\n return redirect()->route('showSite', array('site' => $_POST[\"name\"]));\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->code]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function update(StateRequest $request, $id)\n {\n try {\n $this->admin_id = auth()->user()->id;\n $state = State::find($id);\n $input = $request->all();\n if (!$state) {\n return redirect()->route('states.edit', $id)->with(['error' => 'هذه المحافظة غير موجودة']);\n }\n $this->statusRequest($request);\n $state->update($input);\n return redirect()->route('states')->with(['success' => 'تم تعديل البيانات بنجاح']);\n } catch (\\Exception $ex) {\n return redirect()->route('states.edit', $id)->with(['error' => 'لقد حدث خطأ برجاء المحاولة فيما بعد']);\n }\n }",
"public function actionUpdate($id) {\n\t\t$model = $this->findModel ( $id );\n\t\t\n\t\tif ($model->load ( Yii::$app->request->post () ) && $model->save ()) {\n\t\t\treturn $this->redirect ( [ \n\t\t\t\t\t'view','id' => $model->weid \n\t\t\t] );\n\t\t} else {\n\t\t\treturn $this->render ( 'update', [ \n\t\t\t\t\t'model' => $model \n\t\t\t] );\n\t\t}\n\t}",
"public function actionUpdate($id)\n {\n if (Yii::$app->request->post('_asnew') == '1') {\n $model = new Branch();\n }else{\n $model = $this->findModel($id);\n }\n\n if ($model->loadAll(Yii::$app->request->post()) && $model->saveAll()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['index', 'id' => $_SESSION['switch_id']]);\n }\n\n return $this->render('update', [\n 'model' => $model,\n ]);\n }",
"public function update(Request $request, $id)\n {\n $nrcstates=NRCState::find($id);\n $nrcstates=$nrcstates->update($request->all());\n return redirect()->route('nrcstate.index')->with('success','NRCState updated successfully');;\n }",
"public function actionUpdate($id)\n {\n $this->layout = 'project';\n \n $model = $this->findModel($id);\n $location = $model->location;\n\n if ($model->load(Yii::$app->request->post()) && $model->save() and $location->load(Yii::$app->request->post()) and $location->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n 'location' => $location,\n ]);\n }\n }",
"public function actionUpdate($id)\r\n {\r\n $model = $this->findModel($id);\r\n\r\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\r\n return $this->redirect(['view', 'id' => $model->id]);\r\n } else {\r\n return $this->render('up-date', [\r\n 'model' => $model,\r\n ]);\r\n }\r\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n //return $this->redirect(['view', 'id' => $model->id]);\n\t return $this->redirect(['index']);\n }\n\n return $this->render('update', [\n 'model' => $model,\n ]);\n }",
"public function actionUpdate($id)\n\t{\n\t\t$model = $this->findModel($id);\n\n\t\tif ($model->load(Yii::$app->request->post()) && $model->save()) {\n\t\t\treturn $this->redirect(['view', 'id' => $model->name]);\n\t\t} else {\n\t\t\treturn $this->render('update', [\n\t\t\t\t'model' => $model,\n\t\t\t]);\n\t\t}\n\t}",
"function edit_stav() {\n include_once(\"app/class/DBClass.php\");\n $myModel = new DBClass;\n $myModel->updateState($_POST[\"id\"], $_POST[\"stav\"]);\n header('Location: index.php?action=stavy');\n}",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n// return $this->redirect(['view', 'id' => $model->id]);\n return $this->redirect('/content-menu');\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n\t{\n\t\t$model = $this->findModel($id);\n\n\t\tif ($model->load(Yii::$app->request->post()) && $model->save()) {\n\t\t\treturn $this->redirect(['view', 'id' => $model->id]);\n\t\t} else {\n\t\t\treturn $this->render('update', [\n\t\t\t\t\t'model' => $model,\n\t\t\t]);\n\t\t}\n\t}",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n $model->setScenario('update');\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => (string)$model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n\t{\n\t\t$model = $this->findModel($id);\n\n\t\tif ($model->load(Yii::$app->request->post()) && $model->save()) {\n\t\t\treturn $this->redirect(['view', 'id' => $model->id]);\n\t\t} else {\n\t\t\treturn $this->render('update', [\n\t\t\t\t'model' => $model,\n\t\t\t]);\n\t\t}\n\t}",
"public function actionUpdate($id)\n\t{\n\t\t$model=$this->loadModel($id);\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Post']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Post'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t}\n\n\t\t$this->render('update',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n // check active diet\n if($model->status_del) throw new NotFoundHttpException('The requested page does not exist.');//return $this->redirect(['index']);\n \n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n\t{\n\t\t$model=$this->loadModel($id);\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Solicitudes']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Solicitudes'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t}\n\n\t\t$this->render('update',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}",
"public function actionUpdate($id) {\r\n $model = $this->findModel($id);\r\n\r\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\r\n return $this->redirect(['view', 'id' => $model->id]);\r\n } else {\r\n return $this->render('update', [\r\n 'model' => $model,\r\n ]);\r\n }\r\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->No_]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->no]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n\n {\n \n $model = new Main();\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n\n return $this->redirect(['view', 'id' => $model->id]);\n\n } else {\n\n return $this->render('update', [\n\n 'model' => $model,\n\n ]);\n\n }\n \n \n\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['index' ,'id' => $model->inmueble_id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required',\n ]);\n $findState= States::find($request->state);\n\n Cities::find($id)->update([\n 'name' => $request->get('name'),\n 'state_id'=> $findState->id\n ]);\n return redirect()->route('cities.index')\n ->with('success','City updated successfully');\n }",
"public function actionUpdate($id)\r\n {\r\n $model = $this->findModel($id);\r\n\r\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\r\n return $this->redirect(['view', 'id' => $model->id]);\r\n } else {\r\n return $this->render('update', [\r\n 'model' => $model,\r\n ]);\r\n }\r\n }",
"public function actionUpdate($id) {\n $model = $this->loadModel($id);\n\n // Uncomment the following line if AJAX validation is needed\n // $this->performAjaxValidation($model);\n\n if (isset($_POST['InternshipPosition'])) {\n $model->attributes = $_POST['InternshipPosition'];\n\n if ($model->save())\n $this->redirect(array('view', 'id' => $model->id));\n //var_dump(CHtml::errorSummary($model)); die();\n }\n\n $this->render('update', array(\n 'model' => $model,\n ));\n }",
"public function actionUpdate() {\n $data = $this->data;\n $model = $this->findModel($data['employee_id']);\n if ($model) {\n $model->employee_code = $data['employee_code'];\n $model->employee_name = $data['employee_name'];\n $model->employee_email = $data['employee_email'];\n $model->status = $data['status'];\n $model->department_id = $data['department_id'];\n\n $errors = $this->EmpDetailsvalidate($data['address']);\n if ($model->validate() && empty($errors)) {\n $model->save();\n $this->InsertUpdateEmpAddress($model->id, $data['address']);\n echo $this->messageReturn(\"success\", 200);\n exit;\n } else {\n $error = $model->getErrors();\n echo $this->messageReturn(\"error\", 404, \"\", $error);\n exit;\n }\n } else {\n echo $this->messageReturn(\"failed\", 201, \"\", \"Please sent correct parameter\");\n exit;\n }\n }",
"public function update(Request $request, State $state)\n {\n $this->validator($request->all())->validate();\n $state->update($request->all());\n //Flash Message\n Session::flash('message', 'State updated successfully!');\n return back();\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n $this->layout=\"main\";\n return $this->render('update', [\n 'model' => $model,\n ]);\n }",
"public function actionUpdate($id)\n { \n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->a_id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate()\n {\n $model = $this->findModel(Yii::$app->request->post('id'));\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $model;\n }\n return $model->errors;\n }",
"public function actionUpdate($id)\r\n\t{\r\n\t\t$model=$this->loadModel($id);\r\n\r\n\t\t// Uncomment the following line if AJAX validation is needed\r\n\t\t// $this->performAjaxValidation($model);\r\n\r\n\t\tif(isset($_POST['ApplyLeaves']))\r\n\t\t{\r\n\t\t\t$model->attributes=$_POST['ApplyLeaves'];\r\n\t\t\tif($model->save())\r\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\r\n\t\t}\r\n\r\n\t\t$this->render('update',array(\r\n\t\t\t'model'=>$model,\r\n\t\t));\r\n\t}",
"public function actionUpdate($id) {\n $model = $this->findModel($id);\n\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id) {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n\t{\n\t\t$model=$this->loadModel($id);\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Events']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Events'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->event_id));\n\t\t}\n\n\t\t$this->render('update',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['index']);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['index']);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['index']);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['index']);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['index']);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['index']);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['index']);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->loadAll(Yii::$app->request->post()) && $model->saveAll()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->loadAll(Yii::$app->request->post()) && $model->saveAll()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n \n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('update', [\n 'model' => $model,\n ]);\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\t\t\n\t\t$idInstitucion = $_SESSION['instituciones'][0]; \n\t\t\n\t\t\n\t\t$sedes = $this->obtenerSedes($idInstitucion);\n\t\t$estados = $this->obtenerEstados();\n\t\t\n\t\t\n\t\t\n return $this->render('update', [\n 'model' => $model,\n\t\t\t'sedes'=> $sedes,\n\t\t\t'estados'=>$estados,\n\t\t\t'idInstitucion'=>$idInstitucion,\n ]);\n }",
"public function actionUpdate($id)\n {\n\n // p($id);die;\n $model = $this->findModel($id);\n // p($model);die;\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->ID]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->ID]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()))\n {\n if($model->save())\n return $this->redirect(['view', 'id' => $model->id]);\n else\n var_dump($model->errors); die;\n }\n return $this->render('update', [\n 'model' => $model,\n ]);\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->live_id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ( $model->load(Yii::$app->request->post()) && $model->save() ) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n\t{\n\t\t$model=$this->loadModel($id);\n\n\t\tif(isset($_POST['buttonCancel']))\n {\n $this->redirect(Yii::app()->homeUrl);\n }\n\t\t\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Organisation']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Organisation'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->orgId));\n\t\t}\n\n\t\t$this->render('update',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}",
"public function actionUpdate($id)\n\n {\n\n $model = $this->findModel($id);\n\n\t\t\t\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n\n\t\t\t\n\n\t\t\tYii::$app->session->setFlash('orders', 'Orders has been updated successfully');\n\n return $this->redirect(['view', 'id' => $model->id]);\n\n } else {\n\n return $this->render('update', [\n\n 'model' => $model,\n\n ]);\n\n }\n\n }",
"public function actionUpdate(string $id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post())) {\n\n $model->save();\n return $this->redirect(['index', 'id' => $model->smartgroup_code]);\n } else {\n return $this->renderAjax('update', [\n 'model' => $model,\n 'valStt'=>self::aryStatus(),\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(Url::toRoute('index'));\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($this->request->isPost && $model->load($this->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('update', [\n 'model' => $model,\n ]);\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->name]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->U_ID]);\n }\n\n return $this->render('update', [\n 'model' => $model,\n ]);\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->Id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post())) {\n\n $model->status = 'in-making';\n $model->save(); \n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n if ($model->load(Yii::$app->getRequest()->post(),'') && $model->save()) {\n return $this->redirect(['view', 'id' => $model->name]);\n }\n\n return $this->render('update', ['model' => $model]);\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['index']);\n }\n\n return $this->render('update', [\n 'model' => $model,\n ]);\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['index']);\n }\n\n return $this->render('update', [\n 'model' => $model,\n ]);\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['index']);\n }\n\n return $this->render('update', [\n 'model' => $model,\n ]);\n }",
"public function actionUpdate($id) {\n $model = $this->findModel($id);\n $estado = (Yii::$app->request->get(\"estado\"))?Yii::$app->request->get(\"estado\"):\"\";\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['index', 'id_operacion' => $model->id_operacion]);\n } else {\n return $this->render('update', [\n 'model' => $model,'estado'=>$estado\n ]);\n }\n }"
] | [
"0.70003664",
"0.656805",
"0.65471405",
"0.64909405",
"0.64526284",
"0.6431694",
"0.6364638",
"0.6346686",
"0.63202477",
"0.63178647",
"0.629842",
"0.62715554",
"0.6222383",
"0.62068325",
"0.6199387",
"0.6197443",
"0.6195178",
"0.6171616",
"0.6164162",
"0.6147175",
"0.61471033",
"0.613321",
"0.61292285",
"0.6128815",
"0.6128075",
"0.61264753",
"0.6119945",
"0.61162543",
"0.61117154",
"0.6091878",
"0.60876137",
"0.6082123",
"0.6071919",
"0.60714924",
"0.6067068",
"0.60638154",
"0.6057612",
"0.6057104",
"0.6055262",
"0.60533476",
"0.6051277",
"0.6047769",
"0.60476536",
"0.60434675",
"0.6042775",
"0.6040791",
"0.60367477",
"0.6028768",
"0.60282916",
"0.6027089",
"0.6027042",
"0.6025601",
"0.60244197",
"0.6022151",
"0.6012991",
"0.6010832",
"0.6010376",
"0.6008776",
"0.600824",
"0.600824",
"0.600824",
"0.600824",
"0.600824",
"0.600824",
"0.600824",
"0.60064465",
"0.60064465",
"0.60042757",
"0.60036856",
"0.60009086",
"0.6000044",
"0.6000044",
"0.5998512",
"0.599781",
"0.5995632",
"0.5994239",
"0.5988644",
"0.5987671",
"0.59863245",
"0.5984055",
"0.5983648",
"0.5983648",
"0.5982565",
"0.5982498",
"0.59816813",
"0.5979305",
"0.59763485",
"0.59761626",
"0.59761626",
"0.59761626",
"0.59752053"
] | 0.0 | -1 |
Deletes an existing States model. If deletion is successful, the browser will be redirected to the 'index' page. | public function actionDelete($id)
{
$this->findModel($id)->delete();
return $this->redirect(['index']);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function actionDelete()\n\t{\n\t\t// using the default layout 'protected/views/layouts/main.php'\n\t\t\n\t\t\n\t\t$this->checkUser();\n\t\t$this->checkActivation();\n\t//\t$model = new Estate;\n\t\t\n\t\tif($model===null)\n\t\t{\n\t\t\tif(isset($_GET['id']))\n\t\t\t\t$model=Estate::model()->findbyPk($_GET['id']);\n\t\t\tif($model===null)\n\t\t\t\tthrow new CHttpException(404, Yii::t('app', 'The requested page does not exist.'));\n\t\t}\n\t\t\n\t\tEstateImage::deleteAllImages($model->id);\t\n\t\t@unlink(dirname(Yii::app()->request->scriptFile).$model->tour);\n\t\t@unlink(dirname(Yii::app()->request->scriptFile).$model->image);\n\t\t\n\t\t$model->delete();\n\t\t\n\t\t\n\t\tModeratorLogHelper::AddToLog('deleted-estate-'.$model->id,'Удален объект #'.$model->id.' '.$model->title,null,$model->user_id);\n\t\t$this->redirect('/cabinet/index');\n\t\t\n\t}",
"public function actionDelete()\n {\n $id = Yii::$app->request->post('id');\n try {\n $this->findModel($id)->delete();\n } catch (StaleObjectException $e) {\n } catch (NotFoundHttpException $e) {\n } catch (\\Throwable $e) {\n }\n\n return $this->redirect(['index']);\n }",
"public function actionDelete()\n {\n if ($post = Template::validateDeleteForm()) {\n $id = $post['id'];\n $this->findModel($id)->delete();\n }\n return $this->redirect(['index']);\n }",
"function delete_stav() {\n include_once(\"app/class/DBClass.php\");\n $myModel = new DBClass;\n $myModel->deleteState($_GET[\"id\"]);\n header('Location: index.php?action=stavy');\n}",
"public function destroy($id)\n {\n $state = State::findOrFail($id);\n\n $state->delete();\n\n return redirect('admin/state/');\n }",
"public function destroy($id)\n {\n\t\t$validUser = $this->CheckUser();\n\t\tif($validUser) return\tview('errors.404');\n\n \\DB::table('states')->where('id', $id)->update(['deleted' => 1]);\n\n Session::flash('flash_message', 'State deleted!');\n\n return redirect('state');\n }",
"public function delete()\n {\n $this->model->deleteStations($_GET['id']);\n $this->model->deleteZone($_GET['id']);\n header(\"Location: /resabike/zone\");\n }",
"public function actionDelete()\n {\n $id= @$_POST['id'];\n if($this->findModel($id)->delete()){\n echo 1;\n }\n else{\n echo 0;\n }\n\n return $this->redirect(['index']);\n }",
"public function actionDelete()\n {\n if (!$this->isAdmin()) {\n $this->getApp()->action403();\n }\n\n $request = $this->getApp()->getRequest();\n $id = $request->paramsNamed()->get('id');\n $model = $this->findModel($id);\n if (!$model) {\n $this->getApp()->action404();\n }\n\n $model->delete();\n\n return $this->back();\n }",
"public function deleteAction()\n\t{\n\t\t$message = 'Une erreur est survenue. Votre école n\\'a pas été supprimé.';\n\n\t\t$school = School::find( (int) $this->getRequest()->post('id') );\n\t\t$deleted = $school->delete();\n\n\t\tif ( $deleted ) {\n\t\t\t$message = 'Votre é a correctement été supprimé.';\n\t\t}\n\t\t$this->render( View::make( 'schools/index' , array(\n\t\t\t'status' => $deleted,\n\t\t\t'message' => $message,\n\t\t\t'title' => 'Mes Écoles',\n\t\t\t'entities' => School::all()\n\t\t) ) );\n\t}",
"public function actionDelete($id){\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }",
"public function actionDelete($id)\n {\n\t\t$model = $this->findModel($id);\n\n\t\t$model->delete();\n\n return $this->redirect(['index']);\n }",
"public function delete() {\n $flg = $this->Seatmodel->delete();\n\n if (!empty($flg)) {\n $this->session->set_flashdata('successmessage', 'Data deleted successfully');\n } else {\n $this->session->set_flashdata('errormessage', 'Oops! Something went wrong');\n }\n\n redirect(base_url('admin-seat-list'));\n }",
"public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']); \n }",
"public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']); \n }",
"public function actionDelete($id) {\r\n $this->findModel($id)->delete();\r\n\r\n return $this->redirect(['index']);\r\n }",
"public function actionDelete($id) {\n\t\t$this->findModel($id)->delete();\n\t\treturn $this->redirect(['index']);\n\t}",
"public function actionDelete($id)\n {\n $model=$this->findModel($id);\n $model->status=0;\n $model->save();\n\n return $this->redirect(['index']);\n }",
"public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }",
"public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }",
"public function delete($id){\n $soft_deleted = $this->master->delete_record($id);\n if($soft_deleted > 0){\n $this->session->set_flashdata('success','State deleted successfully.');\n redirect('state');\n }\n }",
"public function actionDelete($id)\n {\n $model = $this->findModel($id);\n $model->delete();\n\n\n return $this->redirect(['index']);\n }",
"public function actionDelete($id)\n {\n $model = $this->findModel($id);\n $model->delete();\n return $this->redirect(['index']);\n }",
"public function actionDelete($id)\n {\n $model = $this->findModel($id);\n $model->delete();\n return $this->redirect(['index']);\n }",
"public function actionDelete($id)\n\t{\n\t\t$this->findModel($id)->delete();\n\n\t\treturn $this->redirect(['index']);\n\t}",
"public function actionDelete($id)\n\t{\n\t\t$this->findModel($id)->delete();\n\n\t\treturn $this->redirect(['index']);\n\t}",
"public function actionDelete($id)\n\t{\n\t\t$this->findModel($id)->delete();\n\n\t\treturn $this->redirect(['index']);\n\t}",
"public function actionDelete($id)\n\t{\n\t\t$this->findModel($id)->delete();\n\n\t\treturn $this->redirect(['index']);\n\t}",
"public function actionDelete($id) {\n\t\t$this->findModel($id)->delete();\n\n\t\treturn $this->redirect(['index']);\n\t}",
"public function actionDelete($id) {\n\t\t$this->findModel($id)->delete();\n\n\t\treturn $this->redirect(['index']);\n\t}",
"public function actionDelete($id)\n {\n $model=$this->findModel ( $id );\n\t\t$model->is_delete=1;\n\t\t$model->save ();\n\n return $this->redirect(['index']);\n }",
"public function actionDelete($id)\r\n {\r\n $this->findModel($id)->delete();\r\n return $this->redirect(['index']);\r\n }",
"public function actionDelete($id) {\n $this->findModel($id)->delete();\n return $this->redirect(['index']);\n }",
"public function actionDelete($id)\n {\n $model = $this->findModel($id);\n $model->status = '0';\n $model->save();\n return $this->redirect(['index']);\n }",
"public function actionDelete($id)\n {\n #$this->findModel($id)->delete();\n $model = $this->findModel($id);\n $model->status=0;\n $model->save();\n return $this->redirect(['index']);\n }",
"public function actionDelete($id)\r\n {\r\n $this->findModel($id)->delete();\r\n\r\n return $this->redirect(['index']);\r\n }",
"public function actionDelete($id)\r\n {\r\n $this->findModel($id)->delete();\r\n\r\n return $this->redirect(['index']);\r\n }",
"public function actionDelete($id)\r\n {\r\n $this->findModel($id)->delete();\r\n\r\n return $this->redirect(['index']);\r\n }",
"public function actionDelete($id)\r\n {\r\n $this->findModel($id)->delete();\r\n\r\n return $this->redirect(['index']);\r\n }",
"public function actionDelete($id)\r\n {\r\n $this->findModel($id)->delete();\r\n\r\n return $this->redirect(['index']);\r\n }",
"public function actionDelete($id)\r\n {\r\n $this->findModel($id)->delete();\r\n\r\n return $this->redirect(['index']);\r\n }",
"public function actionDelete($id)\r\n {\r\n $this->findModel($id)->delete();\r\n\r\n return $this->redirect(['index']);\r\n }",
"public function actionDelete($id)\n {\n $model = $this->findModel($id);\n\n $model->delete();\n\n return $this->redirect(['index']);\n }",
"public function actionDelete($id)\n {\n $model = $this->findModel($id);\n\n $model->delete();\n\n return $this->redirect(['index']);\n }",
"public function actionDelete($id) {\n\t\t$this->findModel ( $id )->delete ();\n\t\t\n\t\treturn $this->redirect ( [ \n\t\t\t\t'index' \n\t\t] );\n\t}",
"public function actionDelete($id) {\n\t\t$this->findModel ( $id )->delete ();\n\t\t\n\t\treturn $this->redirect ( [ \n\t\t\t\t'index' \n\t\t] );\n\t}",
"public function actionDelete($id)\n {\n // $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }",
"public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }",
"public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }",
"public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }",
"public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }",
"public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }",
"public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }",
"public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }",
"public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }",
"public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }",
"public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }",
"public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }",
"public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }",
"public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }",
"public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }",
"public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }",
"public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }",
"public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }",
"public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }",
"public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }",
"public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }",
"public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }",
"public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }",
"public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }",
"public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }",
"public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }",
"public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }",
"public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }",
"public function actionDelete($id)\n {\n $model = $this->findModel($id);\n $model->isDelete = 1;\n $model->save();\n return $this->redirect(['index']);\n }",
"public function actionDelete($id) {\r\n\t\t$this->findModel ( $id )->delete ();\r\n\t\t\r\n\t\treturn $this->redirect ( [ \r\n\t\t\t\t'index' \r\n\t\t] );\r\n\t}",
"public function destroy($id)\n {\n $state = State::find($id);\n\n\n $state->delete();\n return redirect()->route('state.index')->with(['success' => 'تم حذف المحلية بنجاح']);\n\n }",
"public function actionDelete($id)\n {\n $this->_findModel($id)->delete();\n return $this->redirect(['index']);\n }",
"public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n return $this->redirect(['index']);\n }",
"public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n return $this->redirect(['index']);\n }",
"public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n return $this->redirect(['index']);\n }",
"public function actionDelete($id)\n {\n $model = $this->findModel($id);\n \n $model->delete();\n return $this->redirect([\n 'index'\n ]);\n }",
"public function deleteAction() {\n\t\t\t$this->_forward('index');\n\t\t}",
"public function actionDelete($id)\n {\n // var_dump($id);die();\n $model = $this->findModel($id);\n // var_dump($model); die();\n $address = Address::find()->where(['id'=>$model->work_address_id])->one();\n $address->delete();\n $model->delete();\n\n return $this->redirect(['index']);\n }"
] | [
"0.7323108",
"0.6855333",
"0.6803719",
"0.6726623",
"0.66806775",
"0.6647382",
"0.65186155",
"0.64857334",
"0.64601755",
"0.64239126",
"0.6373411",
"0.6368543",
"0.6357057",
"0.6349683",
"0.6349683",
"0.63431084",
"0.63117504",
"0.6309615",
"0.630731",
"0.630731",
"0.62974644",
"0.6297266",
"0.62836933",
"0.62836933",
"0.62773436",
"0.62773436",
"0.62773436",
"0.62773436",
"0.62746626",
"0.62746626",
"0.62722176",
"0.62678164",
"0.62662107",
"0.62551117",
"0.62526566",
"0.6246494",
"0.6246494",
"0.6246494",
"0.6246494",
"0.6246494",
"0.6246494",
"0.6246494",
"0.62437105",
"0.62437105",
"0.62408066",
"0.62408066",
"0.6240734",
"0.6237219",
"0.6237219",
"0.6237219",
"0.6237219",
"0.6237219",
"0.6237219",
"0.6237219",
"0.6237219",
"0.6237219",
"0.6237219",
"0.6237219",
"0.6237219",
"0.6237219",
"0.6237219",
"0.6237219",
"0.6237219",
"0.6237219",
"0.6237219",
"0.6237219",
"0.6237219",
"0.6237219",
"0.6237219",
"0.6237219",
"0.6237219",
"0.6237219",
"0.6223015",
"0.6223015",
"0.6222734",
"0.62103784",
"0.62090445",
"0.620515",
"0.6196568",
"0.6196568",
"0.6196568",
"0.6189084",
"0.61868817",
"0.6173608"
] | 0.0 | -1 |
Determine if the user is authorized to make this request. | public function authorize()
{
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function authorize()\n {\n if ($this->user() !== null) {\n return true;\n }\n return false;\n }",
"public function authorize()\n {\n return $this->user() !== null;\n }",
"public function authorize()\n {\n return $this->user() !== null;\n }",
"public function authorize()\n {\n return $this->user() != null;\n }",
"public function authorize(): bool\n {\n return $this->user() !== null;\n }",
"public function authorize(): bool\n {\n return $this->isUserAuthorised();\n }",
"public function authorize()\n {\n return !is_null($this->user());\n }",
"public function authorize()\n {\n return request()->user() != null;\n }",
"public function authorize()\n\t{\n\t\t// if user is updating his profile or a user is an admin\n\t\tif( $this->user()->isSuperAdmin() || !$this->route('user') ){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public function authorize()\n {\n // this was my best guess\n return $this->user()->id === $this->route('user')->id;\n }",
"public function isAuthorized()\n {\n return $this->cookieHelper->requestCookieExists('auth');\n }",
"public function authorize()\n {\n return !empty(Auth::user()) && ($this->user()->isAnAdmin() || $this->user()->hasRole('user'));\n }",
"public function authorize()\n {\n $originAccount = Account::find($this->get('origin_account_id'));\n return $originAccount->user_id == auth()->id();\n }",
"public function authorize()\n {\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n case 'PUT':\n case 'PATCH':\n case 'DELETE':\n default:\n return $this->user()->type == 'App\\\\Staff' ? true : false;\n break;\n }\n\n return false;\n }",
"public function authorize()\n {\n if($this->user()->role == \"admin\" || $this->user()->id == $this->request->get('author_id')) return true;\n else return false;\n }",
"public function authorize()\n {\n if(\\Auth::guest())\n {\n return false;\n } else {\n // Action 1 - Check if authenticated user is a superadmin\n if(\\Auth::User()->hasRole('superadmin'))\n return true;\n\n // Action 2 - Find UUID from request and compare to authenticated user\n $user = User::where('uuid', $this->user_uuid)->firstOrFail();\n if($user->id == \\Auth::User()->id)\n return true;\n\n // Action 3 - Fail request\n return false;\n }\n }",
"public function authorize()\n {\n $this->model = $this->route('user');\n\n $this->model = is_null($this->model) ? User::class : $this->model;\n\n return $this->isAuthorized();\n }",
"public function isAuthorized(): bool\n {\n // TODO: implement authorization check\n\n return true;\n }",
"public function isAuthorized() {}",
"public function authorize()\n {\n return request()->loggedin_role === 1;\n }",
"public function authorize()\n {\n $this->model = $this->route('user');\n\n if ($this->isEdit() && !is_null($this->model)) {\n if (!user()->hasPermissionTo('Administrations::admin.user') && $this->model->id != user()->id) {\n return false;\n }\n }\n\n $this->model = is_null($this->model) ? User::class : $this->model;\n\n return $this->isAuthorized();\n }",
"public function authorize()\n {\n $accessor = $this->user();\n\n return $accessor->isAdmin() || $accessor->hasKey('post-users');\n }",
"public function authorize()\n {\n $user = \\Auth::getUser();\n\n return $user->user_type == 1;\n }",
"public function authorize()\n {\n return auth()->check() ? true : false;\n }",
"public function authorize()\n {\n return auth()->check() ? true : false;\n }",
"public function authorize()\n {\n /**\n * @var User $user\n * @var Document $document\n */\n $user = Auth::user();\n $document = $this->route('document');\n\n return (int)$user->id === (int)$document->user_id;\n }",
"public function authorize()\n {\n switch (true) {\n case $this->wantsToList():\n case $this->wantsToShow():\n if ($this->hasRoles(['owner', 'administrator'])) {\n return true;\n }\n break;\n case $this->wantsToStore():\n case $this->wantsToUpdate():\n case $this->wantsToDestroy():\n if ($this->hasRoles(['owner'])) {\n return true;\n }\n break;\n }\n\n return false;\n }",
"public function authorize()\n {\n $user = JWTAuth::parseToken()->authenticate();\n $organisation = Organization::findOrFail($this->route('organizations'));\n return $organisation->admin_id == $user->id;\n }",
"public function authorize()\n {\n if($this->user()->isAdmin())\n return true;\n\n return false;\n }",
"function isAuthorized()\n {\n $authorized = parent::isAuthorized();\n return $authorized;\n }",
"public function authorize()\n {\n $user = auth('web')->user();\n if ($user && $user->active) {\n return true;\n }\n\n return false;\n }",
"public function authorize()\n {\n $this->user = User::query()->find($this->route()->parameter('user'));\n $this->merge(['verified' => $this->get('verified') ? 1 : 0]);\n\n return true;\n }",
"public function authorize()\n {\n $user = request()->user('api');\n return $user->isSenior();\n }",
"public function authorize()\n {\n return is_client_or_staff();\n }",
"public function isAuthorized() {\n\t\treturn true;\n\t}",
"public function authorize()\n {\n switch ($this->method()) {\n case 'POST':\n return true;\n case 'GET':\n default:\n {\n return false;\n }\n }\n }",
"public function authorize()\n {\n switch ($this->method()) {\n case 'POST':\n return true;\n case 'GET':\n default:\n {\n return false;\n }\n }\n }",
"public function authorize()\n {\n //Check if user is authorized to access this page\n if($this->user()->authorizeRoles(['admin'])) {\n return true;\n } else {\n return false;\n }\n }",
"public function isAuthorized()\n\t{\n\t\t$sessionVal = Yii::$app->session->get($this->sessionParam);\n\t\treturn (!empty($sessionVal));\n\t}",
"public function authorize() {\n\n return auth()->user() && auth()->user()->username === $this->user->username;\n }",
"public function authorize()\n {\n return session('storefront_key') || request()->session()->has('api_credential');\n }",
"public function authorize()\n {\n if ($this->user()->isAdmin($this->route('organization'))) {\n return true;\n }\n\n return false;\n\n }",
"public function authorize()\n {\n return $this->user() && $this->user()->role === Constants::USER_ROLE_ADMIN;\n }",
"public function authorized()\n {\n return $this->accepted && ! $this->test_mode;\n }",
"public function authorize()\n {\n if (!auth()->check()) {\n return false;\n }\n return true;\n }",
"public function hasAuthorized() {\n return $this->_has(1);\n }",
"public function authorize()\n {\n $resource = Resource::find($this->route('id'));\n\n if (!$resource) {\n return true;\n }\n\n return $resource && $this->user()->can('access', $resource);\n }",
"public function authorize()\n {\n /*\n if ($this->loan_id && is_numeric($this->loan_id) && $loan = Loan::whereId($this->loan_id)->first()) {\n // loan_id belongs to requesting user\n return $loan && $this->user()->id == $loan->user_id;\n }\n */\n return true; // let rules handle it\n }",
"public function authorize()\n {\n //TODO Authorice Request (without Controller)\n return auth()->user()->role_id === 1;\n }",
"public function authorize(): bool\n {\n return $this->user()->id === $this->article->user->id;\n }",
"public function authorize()\n {\n return $this->user()->rol == 'admin' ? true : false;\n }",
"public function isAuth()\n {\n return $this->session->hasAuthorisation();\n }",
"public function authorize()\n {\n if(Auth::user())\n {\n return true;\n }\n else\n {\n return false;\n }\n }",
"public function authorize()\n {\n //Check if user is authorized to access this page\n if($this->user()->authorizeRoles(['admin', 'hrmanager', 'hruser'])) {\n return true;\n } else {\n return false;\n }\n }",
"public function authorize()\n {\n return \\Auth::check() ? true : false;\n }",
"public function authorize()\n\t{\n\t\treturn true; //no user checking\n\t}",
"public function authorize()\n {\n return $this->user()->id === $this->route('report')->user_id;\n }",
"public function authorize()\n {\n return $this->user()->id === $this->route('report')->user_id;\n }",
"public function authorize()\n {\n return !empty(Auth::user());\n }",
"public function authorize()\n {\n return $this->groupHasUser() || $this->hasSeller();\n }",
"public function authorize()\n\t{\n\t\t//@todo check with perissions\n\t\treturn (request()->user()->user_type == ADMIN_USER);\n\t}",
"public function authorize()\n\t{\n\t\t//@todo check with perissions\n\t\treturn (request()->user()->user_type == ADMIN_USER);\n\t}",
"public function isAuthorized() {\n\t\t\n\t}",
"public function authorize()\n {\n if(Auth::check())\n {\n return (Auth::user()->has_world_admin_access);\n }\n return false;\n }",
"public function authorize()\n {\n if (!\\Auth::guest()) {\n $user = \\Auth::getUser();\n if ($user->type == User::USER_TYPE_ADMIN) {\n return true;\n }\n }\n\n return false;\n }",
"public function authorize()\n {\n if (auth()->user()->is_admin) {\n return true;\n }\n return false;\n }",
"public function authorize()\n {\n if ($this->user()->is_admin){\n return true;\n }\n else if ($this->method == \"PUT\"){\n if ($this->user()->id == $this->input('id')){\n return true;\n }\n }\n return false;\n }",
"public function authorize(): bool\n {\n return parent::authorize() && (int)$this->playList->user_id === auth()->user()->id;\n }",
"public function authorize() {\n\t\treturn $this->user()->is_admin;\n\t}",
"public function authorize()\n {\n if (Auth::check()) {\n \n return true;\n \n }\n return false;\n }",
"public function authorize()\n {\n $user = Auth::user();\n return $user && $user->rol == 'admin';\n }",
"public function authorize()\n\t{\n\t\t// Nutzern akzeptiert werden\n\t\tif(Auth::check())\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public function authorize()\n {\n // TODO: Check if has business\n return session()->has('id');\n }",
"public function authorize()\n {\n if (auth()->check() && auth()->user()->isAdmin()) {\n return true;\n }\n\n return false;\n }",
"public function authorize()\n {\n return $this->auth->check();\n }",
"public function authorize() {\n\t\t$user = \\Auth::user();\n\n\t\tif ( $user->isAdmin() ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}",
"public function authorize()\n {\n if (auth()->user()->isAdmin() || auth()->user()->isCustomer()) {\n return true;\n }\n return false;\n }",
"public function authorize()\n {\n return $this->container['auth']->check();\n }",
"function isAuthorized($request) {\n return true;\n }",
"public function authorize()\n {\n return Auth::guest() || isMember();\n }",
"public function authorize()\n {\n return auth()->user() && auth()->user()->isCeo();\n }",
"public function authorize(): bool\n {\n $deckId = $this->request->get('deck_id');\n $userId = Deck::whereKey($deckId)->value('user_id');\n\n return $userId === user()->id;\n }",
"public function authorize()\n {\n return Auth::check() && Auth::user()->is_contractor;\n }",
"public function authorize()\n {\n return TRUE;\n }",
"public function authorize()\n {\n $user = User::find($this->id);\n\n if (!$user) {\n $user = User::where('no_ahli', $this->no_ahli)->first();\n }\n if ($user && $user->id == auth()->user()->id) return true;\n if (auth()->user()->is('admin')) return true;\n\n return false;\n }",
"public function authorize()\n {\n # if it's false, it will rejected\n return true;\n }",
"public function authorize()\n {\n $isValid = auth()->user()->is($this->route('task')->attempt->checklist->owner);\n\n return $isValid;\n }",
"public function authorize()\n {\n $user = Auth::user();\n\n return ($user->getRole() == 'admin');\n }",
"public function is_authorized() {\n\t\t$authorized = true;\n\t\tif ( $this->is_access_token_expired() ) {\n\t\t\t$authorized = false;\n\t\t}\n\n\t\treturn $authorized;\n\t}",
"public function authorize()\n {\n $user = User::findOrFail($this->route('id'));\n\n return $user->hasRole('admin') || $user->hasRole('teacher');\n }",
"public function authorize()\n {\n $project = \\App\\Project::find($this->request->get('project'));\n return $project && $project->isManager($this->user()->name);\n }",
"public function isAuthorized() {\n\t\treturn (bool)$this->_storage->hasData();\n\t}",
"public function authorize()\n {\n $idExpense = $this->input('expense');\n $expense = Expense::find($idExpense);\n\n return $expense && $this->user()->id == $expense->user_id;\n }",
"public function authorize()\n {\n // User system not implemented\n return true;\n }",
"public function authorize() : bool\n {\n // TODO check request to xhr in middleware\n return true;\n }",
"public function authorize()\n {\n $organizationId = (string) $this->route('id');\n\n $this->organization = Organization::findByUuidOrFail($organizationId);\n\n return $this->user()->can('show', [Organization::class, $this->organization]);\n }",
"public function authorize()\n {\n $user = $this->findFromUrl('user');\n return $this->user()->can('update', $user);\n }",
"public function authorize()\n {\n $user = Auth::user();\n $orderElement = OrderElement::find($this->input(\"order_element_id\"));\n $order = $orderElement->order;\n\n if ($user->id == $order->user_id) {\n return true;\n } else {\n return false;\n }\n }",
"public function authorize()\n {\n $current_user = auth()->user();\n $convention = Convention::find($this->route('convention_id'));\n\n // Use ClientPolicy here to authorize before checking the fields\n return $current_user->can('store', Convention::class)\n || $current_user->can('update', $convention);\n }",
"public function authorize()\n {\n if (session()->has('user'))\n {\n $participantController = new ParticipantController();\n\n return !$participantController->isParticipating($this->input('id_user'), $this->input('id_event'));\n }\n else\n {\n return false;\n }\n }",
"public function authorize()\n {\n return (Auth::user()->allowSuperAdminAccess || Auth::user()->allowAdminAccess);\n }"
] | [
"0.8401071",
"0.8377486",
"0.8377486",
"0.8344406",
"0.8253731",
"0.824795",
"0.8213121",
"0.8146598",
"0.81115526",
"0.8083369",
"0.7991986",
"0.79907674",
"0.79836637",
"0.79604936",
"0.79516214",
"0.79494005",
"0.79265946",
"0.7915068",
"0.79001635",
"0.7894822",
"0.7891453",
"0.7890965",
"0.7862504",
"0.78414804",
"0.78414804",
"0.7837965",
"0.78248763",
"0.7812292",
"0.7809632",
"0.77928597",
"0.7788316",
"0.7781619",
"0.77815884",
"0.7763308",
"0.7754035",
"0.7717961",
"0.7717961",
"0.77171147",
"0.77138597",
"0.7705001",
"0.7693082",
"0.7692783",
"0.76915383",
"0.76909506",
"0.76733255",
"0.7667128",
"0.7665592",
"0.7656238",
"0.7650853",
"0.764326",
"0.76431626",
"0.76431614",
"0.7635147",
"0.76311624",
"0.76294273",
"0.7627076",
"0.76207024",
"0.76207024",
"0.76139116",
"0.76036394",
"0.76035625",
"0.76035625",
"0.76032084",
"0.7602515",
"0.76007926",
"0.75971127",
"0.7588128",
"0.7586303",
"0.7581912",
"0.7563037",
"0.7554785",
"0.75526226",
"0.755171",
"0.75436753",
"0.75432944",
"0.7540682",
"0.7538806",
"0.75280696",
"0.751548",
"0.75149626",
"0.7501161",
"0.74959517",
"0.74956346",
"0.74911124",
"0.7489147",
"0.74858016",
"0.748033",
"0.7478443",
"0.7472642",
"0.7472576",
"0.7465409",
"0.7464371",
"0.74630046",
"0.7462218",
"0.7461453",
"0.7449168",
"0.74399257",
"0.74358094",
"0.7433247",
"0.7432659",
"0.74248093"
] | 0.0 | -1 |
Get the validation rules that apply to the request. | public function rules()
{
return [
'closes_at' => 'required|date_format:"d/m/Y"',
'limit' => 'required|numeric|min:500',
];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function rules()\n {\n $commons = [\n\n ];\n return get_request_rules($this, $commons);\n }",
"public function getRules()\n {\n return $this->validator->getRules();\n }",
"public function getValidationRules()\n {\n $rules = [];\n\n // Get the schema\n $schema = $this->getSchema();\n\n return $schema->getRules($this);\n }",
"public function rules()\n {\n return $this->validationRules;\n }",
"public function rules()\n {\n $rules = [];\n switch ($this->getMethod()):\n case \"POST\":\n $rules = [\n 'course_id' => 'required|numeric',\n 'questions' => 'required|array',\n ];\n break;\n case \"PUT\":\n $rules = [\n 'id' => 'required|numeric',\n 'course_id' => 'required|numeric',\n 'questions' => 'required|array',\n ];\n break;\n case \"DELETE\":\n $rules = [\n 'id' => 'required|numeric'\n ];\n break;\n endswitch;\n return $rules;\n }",
"public static function getRules()\n {\n return (new static)->getValidationRules();\n }",
"public function getRules()\n {\n return $this->validation_rules;\n }",
"public function getValidationRules()\n {\n return [];\n }",
"public function getValidationRules() {\n return [\n 'email' => 'required|email',\n 'name' => 'required|min:3',\n 'password' => 'required',\n ];\n }",
"public function rules()\n {\n if($this->isMethod('post')){\n return $this->post_rules();\n }\n if($this->isMethod('put')){\n return $this->put_rules();\n }\n }",
"public function rules()\n {\n $rules = [];\n\n // Validation request for stripe keys for stripe if stripe status in active\n if($this->has('stripe_status')){\n $rules[\"api_key\"] = \"required\";\n $rules[\"api_secret\"] = \"required\";\n $rules[\"webhook_key\"] = \"required\";\n }\n\n if($this->has('razorpay_status')){\n $rules[\"razorpay_key\"] = \"required\";\n $rules[\"razorpay_secret\"] = \"required\";\n $rules[\"razorpay_webhook_secret\"] = \"required\";\n }\n\n // Validation request for paypal keys for paypal if paypal status in active\n if($this->has('paypal_status')){\n $rules[\"paypal_client_id\"] = \"required\";\n $rules[\"paypal_secret\"] = \"required\";\n $rules[\"paypal_mode\"] = \"required_if:paypal_status,on|in:sandbox,live\";\n }\n\n\n return $rules;\n }",
"protected function getValidationRules()\n {\n $rules = [\n 'title' => 'required|min:3|max:255',\n ];\n\n return $rules;\n }",
"public function getRules()\n\t{\n\t\t$rules['user_id'] = ['required', 'exists:' . app()->make(User::class)->getTable() . ',id'];\n\t\t$rules['org_id'] = ['required', 'exists:' . app()->make(Org::class)->getTable() . ',id'];\n\t\t$rules['role'] = ['required', 'string', 'in:' . implode(',', Static::ROLES)];\n\t\t$rules['scopes'] = ['nullable', 'array'];\n\t\t$rules['ended_at'] = ['nullable', 'date'];\n\t\t$rules['photo_url'] = ['nullable', 'string'];\n\n\t\treturn $rules;\n\t}",
"public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n 'username' => 'required|max:255',\n 'user_id' => 'required',\n 'mobile' => 'required|regex:/^1[34578][0-9]{9}$/',\n 'birthday' => 'required',\n 'cycle_id' => 'required',\n 'expired_at' => 'required',\n 'card_price' => 'required',\n ];\n case 'PUT':\n return [\n 'username' => 'required|max:255',\n 'user_id' => 'required',\n 'mobile' => 'required|regex:/^1[34578][0-9]{9}$/',\n 'birthday' => 'required',\n 'cycle_id' => 'required',\n 'expired_at' => 'required',\n 'card_price' => 'required',\n ];\n }\n }",
"public function rules()\n {\n\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users',\n 'password' => 'required|min:6|confirmed',\n 'password_confirmation' => 'min:6|same:password',\n 'role_id' => 'required'\n ];\n break;\n case 'PUT':\n case 'PATCH':\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users,email,'.$this->id,\n ];\n break;\n\n default:\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users,email,'.$this->id,\n ];\n break;\n }\n return $rules;\n }",
"public function rules()\n {\n return $this->rules;\n }",
"public function rules()\n {\n return $this->rules;\n }",
"public function rules()\n {\n return $this->rules;\n }",
"public function rules()\n {\n return $this->rules;\n }",
"public function rules()\n {\n return $this->rules;\n }",
"public function rules()\n {\n return $this->rules;\n }",
"public function rules()\n {\n switch($this->method()) {\n case 'GET':\n return [];\n case 'POST':\n return [\n 'name' => 'required|max:50',\n 'company' => 'required|max:100',\n 'position' => 'required|max:50',\n 'email' => 'required|email|max:150',\n 'phone' => 'required|max:25',\n 'description' => 'nullable|max:500',\n ];\n case 'PUT':\n case 'PATCH':\n return [\n 'name' => 'required|max:50',\n 'company' => 'required|max:100',\n 'position' => 'required|max:50',\n 'email' => 'required|email|max:150',\n 'phone' => 'required|max:25',\n 'description' => 'nullable|max:500',\n ];\n case 'DELETE':\n return [];\n default:break;\n }\n \n }",
"public function rules($request) {\n $function = explode(\"@\", $request->route()[1]['uses'])[1];\n return $this->getRouteValidateRule($this->rules, $function);\n // // 获取请求验证的函数名\n // // ltrim(strstr($a,'@'),'@')\n // if (count(explode(\"@\", Request::route()->getActionName())) >= 2) {\n // $actionFunctionName = explode(\"@\", Request::route()->getActionName()) [1];\n // }\n\n // // 取配置并返回\n // if (isset($this->rules[$actionFunctionName])) {\n // if (is_array($this->rules[$actionFunctionName])) {\n // return $this->rules[$actionFunctionName];\n // }\n // else {\n // return $this->rules[$this->rules[$actionFunctionName]];\n // }\n // }\n // else {\n // return [];\n // }\n }",
"function getValidationRules() {\n\t\treturn array(\n\t\t\t'_MovieID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_UserID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CountryID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_BroadCastDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t\t'_CreatedDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t);\n\t}",
"public function rules()\n {\n if ($this->method() === 'POST') {\n return $this->rulesForCreating();\n }\n\n return $this->rulesForUpdating();\n }",
"public function rules()\n {\n $validation = [];\n if ($this->method() == \"POST\") {\n $validation = [\n 'name' => 'required|unique:users',\n 'email' => 'required|unique:users|email',\n 'password' => 'required|min:6|confirmed',\n 'password_confirmation' => 'required|min:6',\n 'roles' => 'required',\n ];\n } elseif ($this->method() == \"PUT\") {\n $validation = [\n 'name' => 'required|unique:users,name,' . $this->route()->parameter('id') . ',id',\n 'email' => 'required|unique:users,email,' . $this->route()->parameter('id') . ',id|email',\n 'roles' => 'required',\n ];\n\n if ($this->request->get('change_password') == true) {\n $validation['password'] = 'required|min:6|confirmed';\n $validation['password_confirmation'] = 'required|min:6';\n }\n }\n\n return $validation;\n }",
"public function rules()\n {\n $data = $this->request->all();\n $rules['username'] = 'required|email';\n $rules['password'] = 'required'; \n\n return $rules;\n }",
"protected function getValidationRules()\n {\n $class = $this->model;\n\n return $class::$rules;\n }",
"public function rules()\n {\n $rules = $this->rules;\n\n $rules['fee'] = 'required|integer';\n $rules['phone'] = 'required|min:8|max:20';\n $rules['facebook'] = 'required|url';\n $rules['youtube'] = 'required|url';\n $rules['web'] = 'url';\n\n $rules['requestgender'] = 'required';\n $rules['serviceaddress'] = 'required|max:150';\n $rules['servicetime'] = 'required|max:150';\n $rules['language'] = 'required|max:150';\n $rules['bust'] = 'required|max:100|integer';\n $rules['waistline'] = 'required|max:100|integer';\n $rules['hips'] = 'required|max:100|integer';\n $rules['motto'] = 'max:50';\n\n return $rules;\n }",
"protected function getValidRules()\n {\n return $this->validRules;\n }",
"public function rules()\n {\n switch($this->method())\n {\n case 'GET':\n case 'DELETE':\n {\n return [];\n }\n case 'POST':\n case 'PUT':\n {\n return [\n 'name' => 'required',\n ];\n }\n default:break;\n }\n }",
"public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n {\n return [\n 'mobile' => ['required','max:11','min:11'],\n 'code' => ['required','max:6','min:6'],\n 'avatar' => ['required'],\n 'wx_oauth' => ['required'],\n 'password' => ['nullable','min:6','max:20']\n ];\n }\n case 'PUT':\n case 'PATCH':\n case 'DELETE':\n default: {\n return [];\n }\n }\n }",
"public function rules()\n {\n switch ($this->getRequestMethod()) {\n case 'index':\n return [\n 'full_name' => 'nullable|string',\n 'phone' => 'nullable|string',\n ];\n break;\n case 'store':\n return [\n 'crm_resource_id' => 'required|exists:crm_resources,id',\n 'channel' => 'required|in:' . get_validate_in_string(CrmResourceCallLog::$channel),\n 'call_status' => 'required|in:' . get_validate_in_string(CrmResourceCallLog::$call_statuses),\n ];\n break;\n default:\n return [];\n break;\n }\n }",
"public function rules()\n {\n //With password\n if(request('password') || request('password_confirmation')) {\n return array_merge($this->passwordRules(), $this->defaultRules());\n }\n //Without password\n return $this->defaultRules();\n }",
"public function rules()\n {\n $rules = [\n '_token' => 'required'\n ];\n\n foreach($this->request->get('emails') as $key => $val) {\n $rules['emails.'.$key] = 'required|email';\n }\n\n return $rules;\n }",
"function getValidationRules() {\n\t\treturn array(\n\t\t\t'_ID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CoverImageID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_TrackID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_Status' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_Rank' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CreateDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t);\n\t}",
"public function rules()\n { \n return $this->rules;\n }",
"public function getValidationRules()\n {\n if (method_exists($this, 'rules')) {\n return $this->rules();\n }\n\n $table = $this->getTable();\n $cacheKey = 'validate.' . $table;\n\n if (config('validate.cache') && Cache::has($cacheKey)) {\n return Cache::get($cacheKey);\n }\n\n // Get table info for model and generate rules\n $manager = DB::connection()->getDoctrineSchemaManager();\n $details = $manager->listTableDetails($table);\n $foreignKeys = $manager->listTableForeignKeys($table);\n\n $this->generateRules($details, $foreignKeys);\n\n if (config('validate.cache')) {\n Cache::forever($cacheKey, $this->rules);\n }\n\n return $this->rules;\n }",
"public function rules()\n {\n $rules = [];\n if ($this->isMethod('post')) {\n $rules = [\n 'vacancy_name' => 'required|string|min:4|max:20',\n 'workers_amount' => 'required|integer|min:1|max:10',\n 'organization_id'=> 'required|integer|exists:organizations,id',\n 'salary' => 'required|integer|min:1|max:10000000',\n ];\n } elseif ($this->isMethod('put')) {\n $rules = [\n 'vacancy_name' => 'required|string|min:4|max:20',\n 'workers_amount' => 'required|integer|min:1|max:10',\n 'organization_id'=> 'required|integer|exists:organizations,id',\n 'salary' => 'required|integer|min:1|max:10000000',\n ];\n }\n return $rules;\n }",
"public function getValidationRules()\n {\n $rules = $this->getBasicValidationRules();\n\n if (in_array($this->type, ['char', 'string', 'text', 'enum'])) {\n $rules[] = 'string';\n if (in_array($this->type, ['char', 'string']) && isset($this->arguments[0])) {\n $rules[] = 'max:' . $this->arguments[0];\n }\n } elseif (in_array($this->type, ['timestamp', 'date', 'dateTime', 'dateTimeTz'])) {\n $rules[] = 'date';\n } elseif (str_contains(strtolower($this->type), 'integer')) {\n $rules[] = 'integer';\n } elseif (str_contains(strtolower($this->type), 'decimal')) {\n $rules[] = 'numeric';\n } elseif (in_array($this->type, ['boolean'])) {\n $rules[] = 'boolean';\n } elseif ($this->type == 'enum' && count($this->arguments)) {\n $rules[] = 'in:' . join(',', $this->arguments);\n }\n\n return [$this->name => join('|', $rules)];\n }",
"public function validationRules()\n {\n return [];\n }",
"public function rules()\n {\n $rules = $this->rules;\n if(Request::isMethod('PATCH')){\n $rules['mg_name'] = 'required|min:2,max:16';\n }\n return $rules;\n }",
"function getValidationRules() {\n\t\treturn array(\n\t\t\t'_ID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_EventID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_SourceID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_UserID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_HasEvent' => array(\n\t\t\t\t'inArray' => array('values' => array(self::HASEVENT_0, self::HASEVENT_1),),\n\t\t\t),\n\t\t);\n\t}",
"public function rules()\n {\n $rules = [];\n switch ($this->method()){\n case 'GET':\n $rules['mobile'] = ['required', 'regex:/^1[3456789]\\d{9}$/'];\n break;\n case 'POST':\n if($this->route()->getActionMethod() == 'sms') {\n $rules['area_code'] = ['digits_between:1,6'];\n if(in_array($this->get('type'), ['signup', 'reset_pay_pwd'])) {\n $rules['mobile'] = ['required', 'digits_between:5,20'];\n if($this->get('type') == 'signup' && !$this->get('area_code')) {\n $this->error('请选择区号');\n }\n }\n $rules['type'] = ['required', Rule::in(\\App\\Models\\Captcha::getSmsType())];\n }\n break;\n }\n return $rules;\n }",
"public function rules()\n {\n if ($this->isMethod('post')) {\n return $this->createRules();\n } elseif ($this->isMethod('put')) {\n return $this->updateRules();\n }\n }",
"public function rules()\n {\n $rules = [\n 'first_name' => ['required'],\n 'birthdate' => ['required', 'date', 'before:today'],\n ];\n\n if (is_international_session()) {\n $rules['email'] = ['required', 'email'];\n }\n\n if (should_collect_international_phone()) {\n $rules['phone'] = ['phone'];\n }\n\n if (is_domestic_session()) {\n $rules['phone'] = ['required', 'phone'];\n }\n\n return $rules;\n }",
"public function rules()\n {\n dd($this->request->get('answer'));\n foreach ($this->request->get('answer') as $key => $val)\n {\n $rules['answer.'.$key] = 'required';\n }\n\n return $rules;\n }",
"public function rules()\n {\n return static::$rules;\n }",
"function getRules() {\n\t\t$fields = $this->getFields();\n\t\t$allRules = array();\n\n\t\tforeach ($fields as $field) {\n\t\t\t$fieldRules = $field->getValidationRules();\n\t\t\t$allRules[$field->getName()] = $fieldRules;\n\t\t}\n\n\t\treturn $allRules;\n\t}",
"public static function getValidationRules(): array\n {\n return [\n 'name' => 'required|string|min:1|max:255',\n 'version' => 'required|float',\n 'type' => 'required|string',\n ];\n }",
"public function rules()\n {\n $rules = [\n 'name' => 'required',\n 'phone' => 'required|numeric',\n 'subject' => 'required',\n 'message' => 'required',\n 'email' => 'required|email',\n ];\n\n return $rules;\n }",
"public function getValidationRules(): array\n {\n return [\n 'email_address' => 'required|email',\n 'email_type' => 'nullable|in:html,text',\n 'status' => 'required|in:subscribed,unsubscribed,cleaned,pending',\n 'merge_fields' => 'nullable|array',\n 'interests' => 'nullable|array',\n 'language' => 'nullable|string',\n 'vip' => 'nullable|boolean',\n 'location' => 'nullable|array',\n 'location.latitude' => ['regex:/^[-]?(([0-8]?[0-9])\\.(\\d+))|(90(\\.0+)?)$/'], \n 'location.longitude' => ['regex:/^[-]?((((1[0-7][0-9])|([0-9]?[0-9]))\\.(\\d+))|180(\\.0+)?)$/'],\n 'marketing_permissions' => 'nullable|array',\n 'tags' => 'nullable|array'\n ];\n }",
"public function rules()\n {\n // get 直接放行\n if( request()->isMethod('get') ){\n return []; // 规则为空\n }\n\n // 只在post的时候做验证\n return [\n 'username' => 'required|min:2|max:10', \n 'password' => 'required|min:2|max:10', \n 'email' => 'required|min:2|max:10|email', \n 'phoneNumber' => 'required|min:2|max:10', \n\n ];\n }",
"protected function getValidationRules()\n {\n return [\n 'first_name' => 'required|max:255',\n 'last_name' => 'required|max:255',\n 'email' => 'required|email|max:255',\n 'new_password' => 'required_with:current_password|confirmed|regex:' . config('security.password_policy'),\n ];\n }",
"public function rules()\n {\n\n $rules = [\n 'id_tecnico_mantenimiento' => 'required',\n 'id_equipo_mantenimiento' => 'required'\n ];\n\n if ($this->request->has('status')) {\n $rules['status'] = 'required';\n }\n\n if ($this->request->has('log_mantenimiento')) {\n $rules['log_mantenimiento'] = 'required';\n }\n\n return $rules;\n }",
"public function rules()\n {\n $this->buildRules();\n return $this->rules;\n }",
"public function rules()\n {\n switch (true) {\n case $this->wantsToList():\n $rules = $this->listRules;\n break;\n case $this->wantsToStore():\n $rules = $this->storeRules;\n break;\n case $this->wantsToUpdate():\n $this->storeRules['email'] = 'required|email|between:5,100|unique:users,email,' . $this->route('administrators');\n\n $rules = $this->storeRules;\n break;\n default:\n $rules = [];\n }\n\n return $rules;\n }",
"public function rules()\n {\n $rules = [];\n\n if ($this->isUpdate() || $this->isStore()) {\n $rules = array_merge($rules, [\n 'name' => 'required|string',\n 'email' => 'email',\n 'password' => 'confirmed|min:6',\n\n ]);\n }\n\n if ($this->isStore()) {\n $rules = array_merge($rules, [\n\n ]);\n }\n\n if ($this->isUpdate()) {\n $rules = array_merge($rules, [\n ]);\n }\n\n return $rules;\n }",
"public function rules()\n {\n if($this->isMethod('post')) {\n return $this->storeRules();\n }\n else if($this->isMethod('put') || $this->isMethod('patch')){\n return $this->updateRules();\n }\n }",
"abstract protected function getValidationRules();",
"public function rules()\n\t{\n\t\treturn ModelHelper::getRules($this);\n\t}",
"public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return $this->getPostRules();\n case 'PUT':\n return $this->getPutRules();\n }\n }",
"public function rules()\n {\n $rules = [\n 'name' => 'required|string|min:2',\n 'email' => \"required|email|unique:users,email, {$this->request->get('user_id')}\",\n 'role_id' => 'required|numeric',\n 'group_id' => 'required|numeric',\n ];\n\n if ($this->request->has('password')){\n $rules['password'] = 'required|min:6';\n }\n\n return $rules;\n }",
"public function rules()\n {\n if($this->method() == 'POST')\n {\n return [\n 'reason'=>'required',\n 'date_from'=>'required',\n 'date_to'=>'required',\n 'attachment'=>'required',\n ];\n }\n }",
"public function rules()\n {\n $method = $this->method();\n if ($this->get('_method', null) !== null) {\n $method = $this->get('_method');\n }\n // $this->offsetUnset('_method');\n switch ($method) {\n case 'DELETE':\n case 'GET':\n break; \n case 'POST':\n $mailRules = \\Config::get('database.default').'.users';\n break;\n case 'PUT':\n $user = $this->authService->authJWTUserForm();\n $mailRules = \\Config::get('database.default').'.users,email,'.$user->getKey();\n break;\n case 'PATCH':\n break;\n default:\n break;\n }\n \n return [\n 'name' => 'required|string|max:256',\n 'email' => 'required|string|email|max:255|unique:'.$mailRules,\n 'password' => 'required|string|min:3',\n ];\n }",
"public function rules() {\n $rule = [\n 'value' => 'bail|required',\n ];\n if ($this->getMethod() == 'POST') {\n $rule += ['type' => 'bail|required'];\n }\n return $rule;\n }",
"public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE': {\n return [];\n }\n case 'POST': {\n return [\n 'from' => 'required|max:100',\n 'to' => 'required|max:500',\n 'day' => 'required|max:500',\n ];\n }\n case 'PUT':\n case 'PATCH': {\n return [\n 'from' => 'required|max:100',\n 'to' => 'required|max:500',\n 'day' => 'required|max:500',\n ];\n }\n default:\n break;\n }\n\n return [\n //\n ];\n }",
"public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE': {\n return [];\n }\n case 'POST':\n case 'PUT':\n case 'PATCH': {\n return [\n 'name' => 'required|string|max:255',\n 'iso_code_2' => 'required|string|size:2',\n 'iso_code_3' => 'required|string|size:3',\n ];\n }\n default:\n return [];\n }\n }",
"public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE':\n return [];\n case 'POST':\n return [\n 'name' => 'required|string',\n 'lastName' => 'string',\n 'gender' => 'boolean',\n 'avatar' => 'sometimes|mimes:jpg,png,jpeg|max:3048'\n ];\n case 'PUT':\n case 'PATCH':\n return [\n 'oldPassword' => 'required|string',\n 'newPassword' => 'required|string',\n ];\n default:\n break;\n }\n }",
"public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE':\n {\n return [\n 'validation' => [\n 'accepted'\n ]\n ];\n }\n case 'POST':\n {\n return [\n 'title' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250'\n ],\n 'body' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250000'\n ],\n 'online' => [\n 'required',\n ],\n 'indexable' => [\n 'required',\n ],\n 'published_at' => [\n 'required',\n ],\n 'published_at_time' => [\n 'required',\n ],\n 'unpublished_at' => [\n 'nullable',\n ],\n 'unpublished_time' => [\n 'nullable',\n ],\n ];\n }\n case 'PUT':\n {\n return [\n 'title' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250'\n ],\n 'body' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250000'\n ],\n 'online' => [\n 'required',\n ],\n 'indexable' => [\n 'required',\n ],\n 'published_at' => [\n 'required',\n ],\n 'unpublished_at' => [\n 'nullable',\n ],\n ];\n }\n case 'PATCH':\n {\n return [];\n }\n default:\n break;\n }\n }",
"public function rules()\n {\n if (in_array($this->method(), ['PUT', 'PATCH'])) {\n $user = User::findOrFail(\\Request::input('id'))->first();\n\n array_forget($this->rules, 'email');\n $this->rules = array_add($this->rules, 'email', 'required|email|max:255|unique:users,email,' . $user->id);\n }\n\n return $this->rules;\n }",
"public function rules()\n {\n $method = explode('@', $this->route()->getActionName())[1];\n return $this->get_rules_arr($method);\n }",
"public function rules()\n {\n $rules = parent::rules();\n $extra_rules = [];\n $rules = array_merge($rules, $extra_rules);\n return $rules;\n }",
"public function rules()\n {\n\t\tswitch($this->method()) {\n\t\t\tcase 'POST':\n\t\t\t\t{\n\t\t\t\t\treturn [\n\t\t\t\t\t\t'field_id' => 'integer|required',\n\t\t\t\t\t\t'label' => 'string|required',\n\t\t\t\t\t\t'value' => 'alpha_dash|required',\n\t\t\t\t\t\t'selected' => 'boolean',\n\t\t\t\t\t\t'actif' => 'boolean',\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\tcase 'PUT':\n\t\t\t\t{\n\t\t\t\t\treturn [\n\t\t\t\t\t\t'field_id' => 'integer|required',\n\t\t\t\t\t\t'label' => 'string|required',\n\t\t\t\t\t\t'value' => 'alpha_dash|required',\n\t\t\t\t\t\t'selected' => 'boolean',\n\t\t\t\t\t\t'actif' => 'boolean',\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\tdefault:break;\n\t\t}\n }",
"public function rules()\n {\n $this->rules['email'] = ['required', 'min:6', 'max:60', 'email'];\n $this->rules['password'] = ['required', 'min:6', 'max:60'];\n\n return $this->rules;\n }",
"public function rules()\n {\n $this->sanitize();\n return [\n 'event_id' => 'required',\n 'member_id' => 'required',\n 'guild_pts' => 'required',\n 'position' => 'required',\n 'solo_pts' => 'required',\n 'league_id' => 'required',\n 'solo_rank' => 'required',\n 'global_rank' => 'required',\n ];\n }",
"public function getValidatorRules()\n {\n if ($validator = $this->getValidator()) {\n return $validator->getRulesForField($this->owner);\n }\n \n return [];\n }",
"public function rules()\n {\n switch ($this->route()->getActionMethod()) {\n case 'login': {\n if ($this->request->has('access_token')) {\n return [\n 'access_token' => 'required',\n 'driver' => 'required|in:facebook,github,google',\n ];\n }\n return [\n 'email' => 'required|email',\n 'password' => 'required|min:6',\n ];\n }\n case 'register': {\n return [\n 'email' => 'required|email|unique:users,email',\n 'password' => 'required|min:6',\n 'name' => 'required',\n ];\n }\n default: return [];\n }\n }",
"public function getValidationRules() : array;",
"public function rules()\n {\n Validator::extend('mail_address_available', function($attribute, $value, $parameters, $validator){\n return MailAddressSpec::isAvailable($value);\n });\n Validator::extend('password_available', function($attribute, $value, $parameters, $validator){\n return PassWordSpec::isAvailable($value);\n });\n\n return [\n 'mail_address' => [\n 'required',\n 'mail_address_available'\n ],\n 'password' => [\n 'required',\n 'password_available',\n ],\n ];\n }",
"public function rules()\n {\n switch (strtolower($this->method())) {\n case 'get':\n return $this->getMethodRules();\n case 'post':\n return $this->postMethodRules();\n case 'put':\n return $this->putMethodRules();\n case 'patch':\n return $this->patchMethodRules();\n case 'delete':\n return $this->deleteMethodRules();\n }\n }",
"public function rules()\n {\n /**\n * This is the original way, expecting post params for each user value\n */\n return [\n 'firstName' => 'required|min:2|max:255',\n 'lastName' => 'required|min:2|max:255',\n 'phone' => 'min:9|max:25',\n 'gender' => 'in:M,V',\n 'dateOfBirth' => 'before:today|after:1890-01-01',\n 'email' => 'email|min:12|max:255',\n ];\n }",
"public function getValidationRules(): array {\n\t\t$result = [];\n\t\t\n\t\tforeach ($this->getSections() as $section) {\n\t\t\t$result = array_merge($result, $section->getValidationRules());\n\t\t}\n\t\t\n\t\treturn $result;\n\t}",
"public function rules()\n\t{\n\t\t$rule = [];\n\t\tif(Request::path() == 'api/utility/upload-image'){\n\t\t\t$rule = [\n\t\t\t\t'imagePath' => 'required',\n\t\t\t];\n\t\t}else if(Request::path() == 'api/utility/check-transaction'){\n\t\t\t$rule = [\n\t\t\t\t'countNumber' => 'required',\n\t\t\t];\n\t\t}\n\t\treturn $rule;\n\t}",
"public function rules()\n {\n $rules = array();\n return $rules;\n }",
"public function rules()\n {\n $this->setValidator($this->operation_type);\n return $this->validator;\n }",
"public function rules()\n {\n switch($this->method()){\n case 'POST':\n return [\n 'name' => 'required',\n 'app_id' => 'required',\n 'account_id' => 'required',\n 'start_at' => 'required',\n 'end_at' => 'required',\n 'content' => 'required',\n ];\n break;\n default:\n return [];\n break;\n }\n\n }",
"public function rules()\n {\n $rules = [\n 'users' => 'required|array',\n ];\n\n foreach($this->request->get('users') as $key => $user) {\n $rules['users.'. $key . '.name'] = 'required|string|min:3|max:255';\n $rules['users.'. $key . '.phone'] = 'required|regex:/^[0-9\\+\\s]+$/|min:10|max:17';\n $rules['users.'. $key . '.country'] = 'required|string|min:2:max:3';\n }\n\n return $rules;\n }",
"protected function get_validation_rules()\n {\n }",
"public function rules()\n {\n $rules = [\n 'mail_driver' => 'required',\n 'mail_name' => 'required',\n 'mail_email' => 'required',\n ];\n\n $newRules = [];\n\n if($this->mail_driver == 'smtp') {\n $newRules = [\n 'mail_host' => 'required',\n 'mail_port' => 'required|numeric',\n 'mail_username' => 'required',\n 'mail_password' => 'required',\n 'mail_encryption' => 'required',\n ];\n }\n\n return array_merge($rules, $newRules);\n }",
"public function rules()\n {\n $rules['name'] = 'required';\n $rules['poa'] = 'required';\n $rules['background'] = 'required';\n $rules['tester_name'] = 'required';\n $rules['location'] = 'required';\n $rules['end_recruit_date'] = 'required';\n $rules['time_taken'] = 'required';\n $rules['payment'] = 'required';\n $rules['objective'] = 'required';\n $rules['method_desc'] = 'required';\n $rules['health_condition'] = 'required';\n $rules['required_applicant'] = 'required|integer';\n $rules['applicant'] = 'nullable';\n $rules['datetime'] = 'required';\n\n return $rules;\n }",
"public function rules()\n {\n switch($this->method()) {\n\n case 'PUT':\n {\n return [\n 'company_name' => 'required',\n 'status' => 'required|integer',\n 'notify_url' => 'required',\n 'name' => 'required'\n ];\n }\n case 'POST':\n {\n return [\n 'company_name' => 'required',\n 'status' => 'required|integer',\n 'notify_url' => 'required',\n 'name' => 'required'\n ];\n }\n default:\n return [];\n }\n\n }",
"public function rules()\n {\n $rules['name'] = 'required';\n $rules['poa'] = 'required';\n $rules['background'] = 'required';\n $rules['tester_name'] = 'required';\n\n return $rules;\n }",
"public function rules()\n {\n switch(Route::currentRouteName()){\n case 'adminBinding' :\n return [\n 'order_id' => 'required|integer',\n 'money' => 'required|numeric',\n ];\n case 'adminUnbinding' :\n return [\n 'order_id' => 'required|integer',\n 'pivot_id' => 'required|integer',\n ];\n case 'adminReceiptSave' :\n case 'adminReceiptUpdate' :\n return [\n 'customer_id' => 'required',\n 'receiptcorp' => 'required',\n 'account' => 'required',\n 'account_id' => 'required',\n 'bank' => 'required',\n 'currency_id' => 'required',\n 'advance_amount' => 'required|numeric',\n 'picture' => 'required',\n 'business_type' => 'required|in:1,2,3,4,5',\n 'exchange_type' => 'required_unless:currency_id,354|in:1,2',\n 'expected_received_at' => 'required|date_format:Y-m-d',\n ];\n case 'adminReceiptExchange' :\n return [\n 'rate' => 'required|numeric',\n ];\n default :\n return [];\n }\n }",
"public function rules()\n {\n $rules = [];\n $method = $this->getMethod();\n switch ($method) {\n case 'GET':\n if (Route::currentRouteName() === 'schoolActivity.getSchoolActivity') {\n $rules = [\n ];\n }\n break;\n }\n return $rules;\n }",
"public function rules()\n {\n $rules = new Collection();\n\n if (!$this->user() or !$this->user()->addresses()->count()) {\n $rules = $rules->merge($this->addressRules('billing'));\n if ($this->has('different_shipping_address')) {\n $rules = $rules->merge($this->addressRules('shipping'));\n }\n\n return $rules->toArray();\n }\n\n return $rules->merge([\n 'billing_address_id' => 'required|numeric',\n 'shipping_address_id' => 'required|numeric',\n ])->toArray();\n }",
"public function rules(): array\n {\n switch ($this->method()) {\n case 'POST':\n return $this->__rules() + $this->__post();\n case 'PUT':\n return $this->__rules() + $this->__put();\n default:\n return [];\n }\n }",
"public function rules(Request $request)\n {\n return Qc::$rules;\n }",
"public function defineValidationRules()\n {\n return [];\n }",
"public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n 'user_name' => 'nullable|string',\n 'excel' => 'nullable|file|mimes:xlsx',\n 'category' => 'required|int|in:' . implode(',', array_keys(UserMessage::$categories)),\n 'content' => 'required|string|max:500',\n 'member_status' => 'required|int|in:' . implode(',', array_keys(User::$statuses)),\n ];\n break;\n }\n }",
"public function rules()\n {\n return [\n 'lead_id' => [\n 'required', 'string',\n ],\n 'api_version' => [\n 'required', 'string',\n ],\n 'form_id' => [\n 'required', 'int',\n ],\n 'campaign_id' => [\n 'required', 'int',\n ],\n 'google_key' => [\n 'required', 'string', new GoogleKeyRule,\n ],\n ];\n }"
] | [
"0.83426243",
"0.8012348",
"0.79353446",
"0.79247683",
"0.79231435",
"0.7902978",
"0.7858349",
"0.7789196",
"0.7782927",
"0.7761698",
"0.77361906",
"0.7731824",
"0.7709204",
"0.7691742",
"0.7685366",
"0.7681417",
"0.7681417",
"0.7681417",
"0.7681417",
"0.7681417",
"0.7681417",
"0.76754737",
"0.7674785",
"0.76646733",
"0.7656743",
"0.76418096",
"0.7629168",
"0.7628573",
"0.76167774",
"0.7608448",
"0.7607339",
"0.76022124",
"0.7598928",
"0.7596537",
"0.75924236",
"0.7589575",
"0.7586535",
"0.7579887",
"0.7555371",
"0.7554899",
"0.75503033",
"0.75459224",
"0.7539773",
"0.7536362",
"0.7535477",
"0.7529284",
"0.7518078",
"0.75138915",
"0.75067383",
"0.7506334",
"0.75051826",
"0.74988616",
"0.74944454",
"0.7494358",
"0.74924415",
"0.74899584",
"0.7489058",
"0.7488967",
"0.74857205",
"0.7484027",
"0.74778455",
"0.7477776",
"0.74692357",
"0.7463252",
"0.74620026",
"0.7460839",
"0.746006",
"0.74547005",
"0.74531174",
"0.7453086",
"0.7450301",
"0.7447546",
"0.7440528",
"0.7440457",
"0.7434615",
"0.74345005",
"0.7432707",
"0.7428905",
"0.7428608",
"0.7422895",
"0.74183965",
"0.74147075",
"0.74128366",
"0.74128187",
"0.74117863",
"0.74100554",
"0.74055547",
"0.74038035",
"0.74027956",
"0.7401089",
"0.7390051",
"0.7383736",
"0.73724806",
"0.73704654",
"0.7368362",
"0.73603517",
"0.7355616",
"0.7346631",
"0.7344011",
"0.734237",
"0.73346883"
] | 0.0 | -1 |
Get custom messages for validator errors. | public function messages()
{
return [
'closes_at.required' => 'Informe o próximo fechamento do cartão',
'closes_at.date_format' => 'A data de fechamento deve estar no formato "d/m/Y"',
'limit.required' => 'Informe o limite do cartão',
'limit.numeric' => 'O limite deve conter apenas números',
'limit.min' => 'O limite mínimo do cartão deve ser de R$ 500',
];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getValidationErrorMessages() {}",
"public function customValidationMessages()\n {\n return [\n 'role_id.required' => 'The role ID is required.',\n 'role_id.exists' => 'The role ID provided does not exist.',\n 'staff_code.required' => 'The staff code is required.',\n 'name.required' => 'The name field is required.',\n 'name.max' => 'The name field exceeds the maximum length of 255.',\n 'email.email' => 'Please provide an email address.',\n ];\n }",
"public function errorMessages()\n {\n return [\n self::RULE_REQUIRED => 'This field is required',\n self::RULE_EMAIL => 'This field must be a valid email address',\n self::RULE_MIN => 'Min length of this field must be {min}',\n self::RULE_MAX => 'Max length of this field must be {max}',\n self::RULE_MATCH => 'This field must be the same as {match}',\n self::RULE_UNIQUE => 'Record with this {field} already exists'\n ];\n }",
"protected function validationErrorMessages()\n {\n return [];\n }",
"protected function validationErrorMessages()\n {\n return [];\n }",
"public function getValidationMessages();",
"public function getErrorMessages() {}",
"public function get_error_messages();",
"protected function validationErrorMessages()\n {\n return [\n 'password.required' => trans('strings.request_password_required'),\n 'password.confirmed' => trans('strings.request_password_confirmed'),\n 'password.min' => trans('strings.request_password_min', ['chars' => config('db_limits.users.minPasswordLength')]),\n ];\n }",
"public function messages()\n {\n return array_merge(trans('news::validation'), trans('news::validation.custom'));\n }",
"public function errorMessages() : array\n {\n return [\n self::RULE_REQUIRED => 'Required.',\n self::RULE_EMAIL => 'Must be a valid email address.',\n self::RULE_MIN => 'Must be at least {min} characters.',\n self::RULE_MAX => 'Must be less than {max} characters.',\n self::RULE_MATCH => 'Must match {match}.',\n self::RULE_UNIQUE => '{column} is already in use.'\n ];\n }",
"public function messages()\n {\n return [\n 'name.required' => __('The name field is required'),\n 'locale.required' => __('The code field is required'),\n 'locale.min' => __('The code must be at least :max characters', ['min' => 1]),\n 'locale.max' => __('The code may not be greater than :max characters', ['max' => 5]),\n 'locale.unique' => __('The code has already been taken'),\n ];\n }",
"public function getValidatorMessages()\n {\n $messages = [];\n \n foreach ($this->owner->getValidatorRules() as $rule) {\n \n if ($rule->hasMessage()) {\n $messages[$rule->getType()] = $rule->getMessage();\n }\n \n }\n \n return $messages;\n }",
"public function messages() {\n\t\treturn [\n\t\t\t'form_submit.in' => trans('exception.something_wrong.message'),\n\t\t\t'date_from.date_format' => trans('report::content-user-report.errors.date_format'),\n\t\t\t'date_to.date_format' => trans('report::content-user-report.errors.date_format')\n\t\t];\n\t}",
"public function getErrorMessages()\n {\n $translator = Mage::helper('importexport');\n $messages = array();\n\n foreach ($this->_errors as $errorCode => $errorRows) {\n if (isset($this->_messageTemplates[$errorCode])) {\n $errorCode = $translator->__($this->_messageTemplates[$errorCode]);\n }\n foreach ($errorRows as $errorRowData) {\n $key = $errorRowData[1] ? sprintf($errorCode, $errorRowData[1]) : $errorCode;\n $messages[$key][] = $errorRowData[0];\n }\n }\n return $messages;\n }",
"public function messages()\n {\n return [\n 'name.required' => 'Please enter service name.',\n 'name.max' => 'Service name should not be greater than 50 character.',\n 'provider_name.required' => 'Please enter provider name.',\n 'provider_name.max' => 'Provider name should not be greater than 50 character.',\n 'mobile_no.required' => 'Please enter mobile no.',\n 'mobile_no.min' => 'The mobile number must be at least 10 digit.',\n 'mobile_no.regex' => 'Please enter valid mobile number.',\n 'email.email' => 'Please enter valid email address.'\n ];\n }",
"public function messages() \n {\n return[\n 'name.required' => ['code' => 'ERROR-1', 'title' => 'Unprocessable Entity'],\n 'price.required' => ['code' => 'ERROR-1', 'title' => 'Unprocessable Entity'],\n 'price.numeric' => ['code' => 'ERROR-1', 'title' => 'Unprocessable Entity'],\n 'price.major' => ['code' => 'ERROR-1', 'title' => 'Unprocessable Entity']\n ];\n }",
"public function messages()\n {\n return [\n 'name.required' => 'A name is required.',\n 'color.required' => 'Please select a color.'\n ];\n }",
"public function messages()\n {\n return [\n 'name.required' => 'Full Name is required',\n 'name.min' => 'Name must be of minimum 3 characters',\n 'name.max' => 'Name can be of maximum 190 characters',\n 'support_pin.required' => 'Support PIN is required',\n 'support_pin.numeric' => 'Support PIN can only be numeric',\n 'support_pin.digits' => 'Only 4 digit Support PIN is accepted',\n 'rng_level.required' => 'Random Generator Difficutly is required',\n 'rng_level.numeric' => 'Invalid Random Generator Setting',\n 'rng_level.digits' => 'Invalid Random Generator Setting',\n 'dob.required' => 'Date of Birth is required',\n 'mobile.required' => 'Mobile Number is required',\n 'mobile.numeric' => 'Mobile Number can only be numeric',\n 'country' => 'Country is required',\n ];\n }",
"protected function validationErrorMessages()\n {\n return [\n 'password.regex' => 'Password must contain at least 1 uppercase letter and 1 number.',\n ];\n }",
"public function messages()\n {\n return VALIDATION_MESSAGE;\n }",
"public function messages()\n {\n return VALIDATION_MESSAGE;\n }",
"public function messages()\n {\n return [\n 'style.required' => 'Please the style is required',\n 'service.required' => 'Please select service type',\n 'session.required' => 'Please select session'\n ];\n }",
"protected function messages()\n {\n return [\n 'id.required' => HttpAttributeInvalidCode::ID_REQUIRED,\n 'password.required' => HttpAttributeInvalidCode::PASSWORD_REQUIRED,\n 'password.same' => HttpAttributeInvalidCode::CONFIRM_PASSWORD_NOT_SAME,\n 'display_name.required' => HttpAttributeInvalidCode::DISPLAY_NAME_REQUIRED,\n 'role_id.required' => HttpAttributeInvalidCode::ROLE_REQUIRED,\n 'status.required' => HttpAttributeInvalidCode::STATUS_REQUIRE\n ];\n }",
"protected function formatValidationErrors(Validator $validator)\n {\n return $validator->errors()->getMessages();\n }",
"public function messages()\n {\n return [\n 'email.required' => __('The email field is required'),\n 'email.email' => __('The email must be a valid email address'),\n 'email.max' => __('The email may not be greater than :max characters', ['max' => 255]),\n ];\n }",
"public function messages()\n {\n return [\n 'logo.dimensions' => 'Invalid logo - should be minimum 226*48',\n 'favicon.dimensions' => 'Invalid icon - should be 16*16',\n 'logo.required' => 'The logo field is required in seo settings.',\n 'favicon.required' => 'The favicon field is required in seo settings.',\n 'from_name.required' => 'The from name field is required in mail settings.',\n 'from_email.required' => 'The from email field is required in mail settings.',\n ];\n }",
"public function messages()\n {\n return [\n 'file.required' => trans('validation.downloadable_required'),\n 'category_list.required' => trans('validation.category_list_required'),\n ];\n }",
"public function messages()\n {\n return [\n 'required' => ':attribute field must be filled',\n 'email' => ':attribute field must be an email',\n 'unique' => ':attribute field already registered',\n ];\n }",
"public function messages()\n {\n return [\n 'curp.required' => 'Falta la C.U.R.P.',\n 'curp.unique' => 'Esta C.U.R.P. ya existe',\n 'curp.min' => 'C.U.R.P. incorrecta',\n 'curp.max' => 'C.U.R.P. incorrecta',\n 'nombre1.required' => 'Falta el nombre',\n 'nombre1.min' => 'Nombre incorrecto',\n 'nombre1.max' => 'Nombre incorrecto',\n 'apellido1.required' => 'Falta el apellido',\n 'apellido1.min' => 'Apellido incorrecto',\n 'apellido1.max' => 'Apellido incorrecto',\n 'fechanacimiento.required' => 'Falta la fecha de nac.',\n 'genero.required' => 'Obligatorio'\n ];\n }",
"public function getValidationMessages()\n {\n return $this->validationMessages;\n }",
"public function messages()\n {\n return [\n 'required' => 'El campo :attribute es obligatorio.',\n 'min' => 'Debe introducir al menos :min caracteres en el campo :attribute',\n 'max' => 'Debe introducir menos de :max caracteres en el campo :attribute',\n 'email' => 'El campo :attribute debe ser un correo electrónico',\n 'telefono.regex' => 'Debe introducir 9 dígitos en el campo :attribute'\n ];\n }",
"public function messages()\n {\n return [\n 'first_name.required' => 'First name cannot be blank.',\n 'first_name.string' => 'First name must be formatted as a string.',\n 'first_name.max' => 'First name exceeded the max number of characters.',\n 'last_name.required' => 'Last name cannot be blank.',\n 'last_name.string' => 'Last name must be formatted as a string.',\n 'last_name.max' => 'Last name exceeded the max number of characters.',\n 'email.required' => 'Email cannot be blank.',\n 'email.string' => 'Email name must be formatted as a string.',\n 'email.email' => 'Email must be formatted as a valid email address',\n 'email.max' => 'Email exceeded the max number of characters.',\n ];\n }",
"public function messages()\n {\n return [\n 'started_at.required_if' => __('validation.required'),\n 'ended_at.required_if' => __('validation.required'),\n 'subject_id.required_if' => __('validation.required'),\n 'competency.required_if' => __('validation.required'),\n 'learning_goals.required_if' => __('validation.required'),\n 'behavior.required_if' => __('validation.required'),\n ];\n }",
"public function getMessages()\n {\n return $this->_errorMessages;\n }",
"public function messages()\n {\n return [\n 'first_name.required' => 'First Name is required',\n 'first_name.string' => 'First Name must be a string type',\n 'last_name.required' => 'Last Name is required',\n 'last_name.string' => 'Last Name must be a string type',\n 'email_address.required' => 'Email Address is required',\n 'email_address.email' => 'Not a valid email address',\n 'message.required' => 'Message is required',\n 'message.string' => 'Message must be a string type',\n ];\n }",
"public function messages() {\n return [\n 'name.required' => 'Please enter name',\n 'name.string' => 'Name must be string',\n 'password.min' => 'Your password must at least 6 characters',\n 'password_confirm.same' => 'Password confirm is not available',\n 'birthday.date_format' => 'Birthday format is wrong',\n 'gender_id.required' => 'Please choose gender',\n 'gender_id.numeric' => 'Gender value is wrong',\n 'phone.alpha_num' => 'Phone must be numeric alpha',\n ];\n }",
"public function getErrorMessages() {\n\t\t$errorMessages = '';\n\t\tforeach ($this->errorMessages as $index => $error) {\n\t\t\t$errorMessages .= \"[Error:\" . $index . '] ' . $error . \"\\n<br />\";\n\t\t}\n\t\treturn $errorMessages;\n\t}",
"public function messages()\n {\n return [\n 'code_day.required' => 'Code day must required!',\n 'name.required' => 'Name must required!',\n ];\n }",
"public function messages()\n {\n return [\n 'status_id.not_in' => 'The selected status is invalid.',\n 'status_id.in' => 'The selected status is invalid.',\n ];\n }",
"public function messages()\n {\n return $messages = [\n 'source_funds.required' => trans('common.error_messages.req_this_field'),\n 'jurisdiction_funds.required' => trans('common.error_messages.req_this_field'),\n 'annual_income.required' => trans('common.error_messages.req_this_field'),\n 'other_source.required' => trans('common.error_messages.req_this_field'),\n 'estimated_wealth.required' => trans('common.error_messages.req_this_field'),\n 'wealth_source.required' => trans('common.error_messages.req_this_field'),\n 'other_wealth_source.required' => trans('common.error_messages.req_this_field'),\n 'tin_code.required' => trans('common.error_messages.req_this_field'),\n 'is_abandoned.required' => trans('common.error_messages.req_this_field'),\n 'date_of_abandonment.required' => trans('common.error_messages.req_this_field'),\n 'abandonment_reason.required' => trans('common.error_messages.req_this_field'),\n 'justification.required' => trans('common.error_messages.req_this_field'),\n 'tin_country_name.required' => trans('common.error_messages.req_this_field'),\n 'tin_number.required' => trans('common.error_messages.req_this_field'),\n ];\n }",
"public function messages()\n {\n /*\n return [\n 'bio.required' => 'Bio is required',\n 'state.required' => 'State is required',\n 'city.required' => 'City name is required',\n 'postalcode.required' => 'Postal Code is required',\n 'gender.required' => 'Gender is required',\n 'seeking_gender.requred' => 'Gender you are searching for is required',\n ];\n */\n }",
"public function messages()\n {\n return [\n 'description.required' => 'Description required!',\n 'customer_id.required' => 'Customer Not an existing ID',\n ];\n }",
"public function messages()\n {\n return [\n 'name.required' => 'Email is required!',\n 'year.required' => 'Year is required!',\n 'artist_id.required' => 'Artist is required!'\n ];\n }",
"private function errorMessages()\n {\n return [\n 'name.unique' => 'A category with the same name exists',\n ];\n }",
"public function getErrorMessages()\n {\n return $this->errorMessages;\n }",
"public function messages()\n {\n return [\n 'title.required' => 'A title is required',\n 'title.max' => 'Title is too long',\n 'image.required' => 'An image is required',\n ];\n }",
"public function messages()\n {\n return [\n// 'value_vi.max' => __('admin::validation.config.value_vi_max'),\n// 'value_en.max' => __('admin::validation.config.value_en_max'),\n ];\n }",
"public function messages()\n {\n return [\n 'code_area.required' => 'Code area cannot be blank',\n 'name.required' => 'Name area cannot be blank'\n ];\n }",
"private function getErrorMessages(): array\n {\n return [\n 'notEmpty' => 'Campo {{name}} obligatorio',\n 'date' => '{{name}} debe tener una fecha valida. Ejemplo de formato: {{format}}\\'',\n 'intVal' => '',\n 'between' => '',\n 'in' => '',\n 'floatVal' => '',\n 'length' => '',\n 'stringType' => '',\n 'objectType' => '',\n 'cantidadRegistros' => 'dsfsdfsd',\n 'periodo.notEmpty' => 'Campo Periodo: es obligatorio',\n 'periodo' => 'Campo Periodo: Debe tener el formato AAAAMM, donde AAAA indica el año y MM el mes en números',\n 'orden.notEmpty' => 'Campo Orden: es obligatorio',\n 'orden' => 'Campo Orden: Debe ser igual a 1 ó 2.',\n 'codigoComprobante.notEmpty' => 'Campo Codigo de Comprobante: es obligatorio',\n 'codigoComprobante' => 'Campo Codigo de Comprobante: Debe debe estar comprendido entre 1 y 9998.',\n 'numeroComprobante.notEmpty' => 'Campo Numero de Comprobante: es obligatorio',\n 'numeroComprobante' => 'Campo Numero de Comprobante: Debe debe estar comprendido entre 1 y 99999999.',\n 'puntoVenta.notEmpty' => 'Punto de venta: es obligatorio',\n 'puntoVenta' => 'Punto de venta: Debe debe estar comprendido entre 1 y 9998.',\n ];\n }",
"public function messages() {\n return [\n 'first_name.required' => 'First name is required.',\n 'middle_name.required' => 'Middle name is required.',\n 'surname.required' => 'Surname is required.',\n\n 'email.required' => 'Email is required.',\n 'email.email' => 'Email is invalid.',\n 'email.unique' => 'Email already registered.',\n\n 'password.required' => 'Password is required.',\n 'password.min' => 'Password is too weak.',\n 'password.max' => 'Password is too long.',\n\n 'password_again.required' => 'Enter your password again.',\n 'password_again.same' => 'Passwords do not match.'\n ];\n }",
"public function getErrorMessages() : array\n {\n return $this->errors_messages;\n }",
"public function messages()\n {\n return [\n 'path.required' => 'We need to know your image address!',\n 'same' => 'The :attribute and :other must match.',\n 'size' => 'The :attribute must be exactly :size.',\n 'between' => 'The :attribute value :input is not between :min - :max.',\n 'in' => 'The :attribute must be one of the following types: :values',\n ];\n }",
"public function messages()\n {\n return [\n 'baskets.required' => trans('validation.recipe baskets'),\n 'steps.required' => trans('validation.recipe steps'),\n 'ingredients.required' => trans('validation.recipe ingredients'),\n ];\n }",
"public function messages()\n {\n return [\n 'firstname.required' => 'Please select firstname.',\n 'email.required' => 'Please enter email address.',\n 'email.email' => 'Please enter valid email address.',\n 'email.unique' => 'Email address already exists.',\n 'mobile.required' => 'Please enter mobile number.',\n 'mobile.unique' => 'Mobile number address already exists.',\n 'password.required' => 'Please enter password.',\n 'cpassword.required' => 'Please enter confirm password.',\n 'cpassword.same' => 'Confirm password does not match with password.'\n ];\n }",
"public function messages()\n {\n return [\n 'title.required' => 'Title is required',\n 'title.min' => 'Title should have minimum 3 characters',\n 'title.max' => 'Title can have maximum 35 characters',\n 'link.max' => 'Website Link can have maximum 155 characters',\n 'login_id.required' => 'Login ID is required to add an account to the vault',\n 'login_id.min' => 'Login ID should contain minimum 3 characters',\n 'login_id.max' => 'Login ID can have maximum 155 characters',\n 'login_password.required' => 'Password for the Account is required',\n 'login_password.min' => 'Login Password needs to be of minimum 3 characters',\n 'login_password.max' => 'Login Password cannot exceed 155 character limit',\n 'additional_info.max' => 'Additional Info cannot exceed 255 character limit',\n ];\n }",
"public function messages()\n {\n return [\n 'document.required' => 'Nome do documento é requerido mas não foi informado',\n 'status.required' => 'Status é requerido mas não foi informado',\n ];\n }",
"public function messages()\n {\n return $messages = [\n 'country_id.required' => trans('error_messages.req_country'),\n 'country_id.numeric' => trans('error_messages.invalid_country'),\n 'first_name.required' => trans('error_messages.req_first_name'),\n 'first_name.regex' => trans('error_messages.invalid_first_name'),\n 'first_name.max' => trans('error_messages.first_name_max_length'),\n \n \n 'last_name.required' => trans('error_messages.req_last_name'),\n 'last_name.regex' => trans('error_messages.invalid_last_name'),\n 'last_name.max' => trans('error_messages.last_name_max_length'),\n 'dob.required' => trans('error_messages.req_dob_name'),\n 'email.required' => trans('error_messages.req_email'),\n 'email.max' => trans('error_messages.email_max_length'),\n 'email.email' => trans('error_messages.invalid_email'),\n 'email.unique' => trans('error_messages.email_already_exists'),\n 'email.unique' => trans('error_messages.email_already_exists'),\n 'country_code.required' => trans('forms.Corperate_Reg.client_error.req_country_code'),\n\n 'phone.min'=>trans('error_messages.phone_minlength'),\n 'phone.max'=>trans('error_messages.phone_maxlength'),\n 'phone.numeric'=>trans('error_messages.invalid_phone'),\n ];\n }",
"public function messages()\n {\n return [\n 'firstname.required' => Lang::get(\"Le prénom est obligatoire\"),\n 'lastname.required' => Lang::get(\"Le nom est obligatoire\"),\n 'adress.required' => Lang::get(\"Veuillez indiquer votre adresse.\"),\n 'zip_code.required' => Lang::get(\"Veuillez indiquer votre code postal.\"),\n 'city.required' => Lang::get(\"Veuillez indiquer votre ville.\"),\n 'state.required' => Lang::get(\"Veuillez indiquer votre région.\"),\n 'country_id.required' => Lang::get(\"Veuillez indiquer votre pays de résidence.\"),\n ];\n }",
"public function messages()\n {\n return [\n 'fileuploader-list-file.required' => 'Фото не выбрано',\n 'color.required' => 'Цвет не выбран',\n 'number.required' => 'Номер не выбран',\n 'rent_price_per_day.required' => 'Цена не выбран',\n 'year.required' => 'Год не выбран',\n 'model.gt' => 'Модель не выбрана',\n 'transmission.gt' => 'Коробка передач не выбрана',\n ];\n }",
"public function messages()\n {\n return [\n 'name.required' => 'Name is required!',\n 'category.required' => 'category is required!',\n 'price.required' => 'price is required!',\n 'price.regex' => 'invalid price!',\n 'weight.required' => 'weight is required!',\n 'stock.required' => 'stock is required!',\n 'stock.integer' => 'invalid stock!',\n 'files.mimes' => 'invalid File(s)!',\n 'files.max' => 'File size must be 2MB or lesser !',\n ];\n }",
"public function messages()\n {\n return [\n 'code.required' => 'El campo código es requerido',\n 'code.unique' => 'Ya existe un registro con este código',\n 'name.required' => 'Debe proporcionar un nombre para este concepto',\n 'taxable_type.numeric' => 'Debe proporcionar una gravabilidad para este concepto',\n ];\n }",
"public function messages()\n {\n return [\n 'supplier_id.required' => trans('product.supplierRequired'),\n 'import_price.required' => trans('product.importPriceRequired'),\n 'category_id.required' => trans('product.categoryRequired'),\n 'selling_price.required' => trans('product.sellingPriceRequired'),\n 'unit_id.required' => trans('product.unitRequired'),\n ];\n }",
"public function messages()\n {\n return [\n 'truck_id.required' => 'The truck field is required.',\n 'truck_id.exists' => 'Invalid data.',\n 'account_id.required' => 'The supplier field is required.',\n 'account_id.exists' => 'Invalid data.'\n ];\n }",
"public function get_validation_messages() {\n\t\t$field = $this->field;\n\t\t$id = $this->get_id( $field );\n\t\t$is_required = $this->is_required( $field );\n\t\t$messages = '';\n\n\t\t$post_title = self::get_property( 'post_title', $field, '' );\n\t\t$post_content = self::get_property( 'post_content', $field, '' );\n\t\t$post_excerpt = self::get_property( 'post_excerpt', $field, '' );\n\t\t$post_image = self::get_property( 'post_image', $field, '' );\n\t\t$setting_required_message = self::get_property( 'required_message', $field, '' );\n\t\t$post_type = self::get_property( 'post_type', $field, 'post' );\n\n\t\t$post_title_enabled = ! empty( $post_title );\n\t\t$post_content_enabled = ! empty( $post_content );\n\t\t$post_excerpt_enabled = ! empty( $post_excerpt );\n\t\t$post_image_enabled = ! empty( $post_image );\n\t\t$category_list = forminator_post_categories( $post_type );\n\n\t\tif ( $is_required ) {\n\t\t\tif ( $post_title_enabled ) {\n\t\t\t\t$messages .= '\"' . $id . '-post-title\": {' . \"\\n\";\n\n\t\t\t\t$required_message = apply_filters(\n\t\t\t\t\t'forminator_postdata_field_post_title_validation_message',\n\t\t\t\t\t( ! empty( $setting_required_message ) ? $setting_required_message : __( 'This field is required. Please enter the post title', Forminator::DOMAIN ) ),\n\t\t\t\t\t$id,\n\t\t\t\t\t$field\n\t\t\t\t);\n\t\t\t\t$messages = $messages . '\"required\": \"' . forminator_addcslashes( $required_message ) . '\",' . \"\\n\";\n\n\t\t\t\t$messages .= '},' . \"\\n\";\n\t\t\t}\n\t\t\tif ( $post_content_enabled ) {\n\t\t\t\t$messages .= '\"' . $id . '-post-content\": {' . \"\\n\";\n\n\t\t\t\t$required_message = apply_filters(\n\t\t\t\t\t'forminator_postdata_field_post_content_validation_message',\n\t\t\t\t\t( ! empty( $setting_required_message ) ? $setting_required_message : __( 'This field is required. Please enter the post content', Forminator::DOMAIN ) ),\n\t\t\t\t\t$id,\n\t\t\t\t\t$field\n\t\t\t\t);\n\t\t\t\t$messages = $messages . '\"required\": \"' . forminator_addcslashes( $required_message ) . '\",' . \"\\n\";\n\n\t\t\t\t$messages .= '},' . \"\\n\";\n\t\t\t}\n\t\t\tif ( $post_excerpt_enabled ) {\n\t\t\t\t$messages .= '\"' . $id . '-post-excerpt\": {' . \"\\n\";\n\n\t\t\t\t$required_message = apply_filters(\n\t\t\t\t\t'forminator_postdata_field_post_excerpt_validation_message',\n\t\t\t\t\t( ! empty( $setting_required_message ) ? $setting_required_message : __( 'This field is required. Please enter the post excerpt', Forminator::DOMAIN ) ),\n\t\t\t\t\t$id,\n\t\t\t\t\t$field\n\t\t\t\t);\n\t\t\t\t$messages = $messages . '\"required\": \"' . forminator_addcslashes( $required_message ) . '\",' . \"\\n\";\n\n\t\t\t\t$messages .= '},' . \"\\n\";\n\t\t\t}\n\t\t\tif ( $post_image_enabled ) {\n\t\t\t\t$messages .= '\"' . $id . '-post-image\": {' . \"\\n\";\n\n\t\t\t\t$required_message = apply_filters(\n\t\t\t\t\t'forminator_postdata_field_post_image_validation_message',\n\t\t\t\t\t( ! empty( $setting_required_message ) ? $setting_required_message : __( 'This field is required. Please upload a post image', Forminator::DOMAIN ) ),\n\t\t\t\t\t$id,\n\t\t\t\t\t$field\n\t\t\t\t);\n\t\t\t\t$messages = $messages . '\"required\": \"' . forminator_addcslashes( $required_message ) . '\",' . \"\\n\";\n\n\t\t\t\t$messages .= '},' . \"\\n\";\n\t\t\t}\n\t\t\tif( ! empty( $category_list ) ) {\n\t\t\t\tforeach ( $category_list as $category ) {\n\t\t\t\t\t$post_category_enabled = self::get_property( $category['value'], $field, '' );\n\t\t\t\t\tif ( $post_category_enabled ) {\n\t\t\t\t\t\t$post_category_multiple = self::get_property( $category['value'].'_multiple', $field, '' );\n\t\t\t\t\t\tif( $post_category_multiple ){\n\t\t\t\t\t\t\t$messages .= '\"' . $id . '-' . $category['value'] . '[]\": {' . \"\\n\";\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$messages .= '\"' . $id . '-' . $category['value'] . '\": {' . \"\\n\";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$required_message = apply_filters(\n\t\t\t\t\t\t\t'forminator_postdata_field_' . $category['value'] . '_validation_message',\n\t\t\t\t\t\t\t( ! empty( $setting_required_message ) ? $setting_required_message : __( 'This field is required. Please select a '. $category['singular'], Forminator::DOMAIN ) ),\n\t\t\t\t\t\t\t$id,\n\t\t\t\t\t\t\t$field\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$messages = $messages . '\"required\": \"' . forminator_addcslashes( $required_message ) . '\",' . \"\\n\";\n\n\t\t\t\t\t\t$messages .= '},' . \"\\n\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $messages;\n\t}",
"public function getMessages()\n {\n foreach (parent::getMessages() as $message) {\n switch ($message->getType()) {\n case 'PresenceOf':\n $message->setMessage('The field ' . $message->getField() . ' is required');\n break;\n case 'Uniqueness':\n $message->setMessage('The field ' . $message->getField() . ' must be unique');\n break;\n case 'Email':\n $message->setMessage('The field ' . $message->getField() . ' must contain a valid email');\n break;\n case 'Url':\n $message->setMessage('The field ' . $message->getField() . ' must contain a valid url');\n break;\n case 'InclusionIn':\n $message->setMessage('The field ' . $message->getField() . ' must contain a value in [' . implode(',', $message->getDomain()) . ']');\n break;\n case 'DateValidator':\n $message->setMessage('The field ' . $message->getField() . ' must contain a valid date.');\n break;\n case 'TimestampValidator':\n $message->setMessage('The field ' . $message->getField() . ' must contain a valid timestamps.');\n break;\n }\n }\n\n return parent::getMessages();\n }",
"public function messages()\n {\n\n return [\n \"address_1.required\" => \"Address 1 is required\",\n \"address_2.required\" => \"Address 2 is required\",\n \"city.required\" => \"City is required\",\n \"region.required\" => \"Region is required\",\n \"postal_code.required\" => \"Postal Code is required\",\n \"shipping_region_id.required\" => \"Shipping Region is required\",\n \"shipping_region_id.numeric\" => \"Shipping Region supplied must be numeric\",\n ];\n }",
"public function messages()\n {\n return [\n 'zipcode.required' => 'A Zipcode is required',\n 'publicPlace.required' => 'A Public Place is required',\n 'neighbordhood.required' => 'A Neighbordhood is required',\n 'complement.required' => 'A Complement Name is required',\n 'number.required' => 'A Number is required',\n 'city.required' => 'A City is required',\n 'state.required' => 'A State is required',\n\n 'zipcode.max' => 'A Zipcode max 255 characteres required.',\n 'publicPlace.max' => 'A Public Place max 255 characteres required.',\n 'neighbordhood.max' => 'A Neighbordhood max 255 characteres required.',\n 'complement.max' => 'A Complementmax 255 characteres required.',\n 'number.max' => 'A Number max 255 characteres required.',\n 'city.max' => 'A City max 255 characteres required.',\n 'state.max' => 'A State max 255 characteres required.',\n ];\n }",
"public function messages()\n {\n return [\n 'sku.required' => 'Product sku must is required',\n 'vol_weight.required' => 'Merchant ID must is required',\n 'weight.required' => 'Merchant Sku must is required',\n 'length.required' => 'Merchant Sku must is required',\n 'width.required' => 'Merchant Sku must is required',\n 'height.required' => 'Merchant Sku must is required',\n ];\n }",
"public function messages()\n {\n return [\n 'first_name.required' => 'Enter First Name.',\n 'first_name.max' => 'First Name may be up to :max characters in length.',\n 'last_name.max' => 'Last Name may be up to :max characters in length.',\n 'email.required' => 'Enter Email.',\n 'email.max' => 'Email may be up to :max characters in length.',\n 'email.email' => 'Enter valid Email.',\n 'email.unique' => 'Email already exists. Please enter a different Email.',\n 'contact_info.max' => 'Contact Information may be up to :max characters in length.',\n 'role_id.required' => 'Select Role.',\n 'role_id.not_in' => 'Select Role',\n 'agency_id.not_in' => 'Select Agency',\n 'schedule_color.required' => 'Select Color',\n ];\n }",
"public function messages()\n {\n return [\n 'name.required' => 'Product name is required',\n 'price.required' => 'Please describe your selling price',\n 'phone.required' => 'Please describe your contact number',\n 'phone.regex' => 'Please enter real phone number',\n 'phone.ends_with' => 'Please enter real phone number',\n 'phone.min' => 'Please enter real phone number',\n 'address.required' => 'Please describe your product location',\n ];\n }",
"public function messages()\n {\n $serviceId = trans('company.lbl_service_name');\n $startDate = trans('company.lbl_contract_start_date');\n $endDate = trans('company.lbl_contract_end_date');\n\n return [\n 'service-id.required' => trans('error.e003_required', ['field' => $serviceId]),\n 'service-id.numeric' => trans('error.e008_numeric', ['field' => $serviceId]),\n 'start-date.required' => trans('error.e003_required', ['field' => $startDate]),\n 'start-date.date_format' => trans('error.e005_format_date', ['field' => $startDate, 'format' => 'Y/m/d']),\n 'start-date.after_or_equal' => trans('error.e020_greater_than_or_equal', ['field' => $startDate]),\n 'end-date.required' => trans('error.e003_required', ['field' => $endDate]),\n 'end-date.date_format' => trans('error.e005_format_date', ['field' => $endDate, 'format' => 'Y/m/d']),\n 'end-date.after' => trans('error.e012_start_date_less_than_end_date'),\n ];\n }",
"public function messages()\n {\n return [\n 'new_number.required' => \"Please enter a number\",\n 'new_number.integer' => \"Please enter a valid number\",\n 'new_number_title.required' => \"Please enter a title\",\n 'new_number_description.required' => \"Please enter a description\"\n ];\n }",
"public function messages()\n {\n return [\n 'cc_email.email' => 'L\\'cc-mail non è valida',\n 'bcc_email.email' => 'L\\'bcc-mail non è valida',\n 'soggetto.required' => 'Il campo soggetto e richiesto',\n 'descrizione.required' => 'Il campo descrizione e richiesto'\n ];\n }",
"public function messages()\n {\n return [\n 'first_name.required' => 'O campo Nome é obrigatório.',\n 'first_name.min' => 'O campo Nome precisa ter no mínimo 2 caracteres.',\n 'first_name.max' => 'O campo Nome precisa ter no máximo 100 caracteres.',\n 'last_name.required' => 'O campo Sobrenome é obrigatório.',\n 'last_name.min' => 'O campo Sobrenome precisa ter no mínimo 2 caracteres.',\n 'last_name.max' => 'O campo Sobrenome precisa ter no máximo 100 caracteres.',\n 'email.required' => 'O campo E-mail é obrigatório.',\n 'email.email' => 'O campo E-mail não é válido.',\n 'phone.required' => 'O campo Telefone é obrigatório.',\n 'phone.min' => 'O campo Telefone precisa ter no mínimo 10 caracteres com o DDD.',\n 'phone.max' => 'O campo Telefone precisa ter no máximo 11 caracteres com o DDD.',\n ];\n }",
"public function messages()\n {\n $key = $this->csvHeader();\n\n return [\n sprintf('%s.required', $key) => trans('validation.required', ['attribute' => trans('element.activity_status')]),\n sprintf('%s.size', $key) => trans('validation.multiple_values', ['attribute' => trans('element.activity_status')]),\n sprintf('%s.in', $key) => trans('validation.code_list', ['attribute' => trans('element.activity_status')])\n ];\n }",
"public function messages()\n {\n return [\n 'namaPengirim.required' => 'Nama Pengirim harus diisi',\n 'namaPelangganDrop.required' => 'Nama pelanggan harus diisi',\n 'telpPelanggan.required' => 'HP pelanggan harus diisi',\n 'alamatPelanggan.required' => 'Alamat pelanggan harus diisi',\n 'propinsiPelanggan.required' => 'Propisnsi pelanggan harus diisi',\n 'kabupatenPelanggan.required' => 'Kabupaten pelanggan harus diisi',\n 'ongkosKirim.required' => 'Ongkis Kirim harus diisi',\n 'ongkosKirimService.required' => 'Layanan Kirim harus diisi',\n 'courier.required' => 'Kurir pelanggan harus diisi',\n ];\n }",
"public function messages()\n {\n return [\n 'email.required' => 'A email is required',\n 'email.exists' => 'No user found by this email',\n 'email.email' => 'Email used is invalid',\n 'password.required' => 'A password is required',\n ];\n }",
"public function messages()\n {\n return [\n 'name.required' => 'A name is required',\n 'email.required' => 'A email is required',\n 'role_id.required' => 'Role is required',\n 'password.required' => 'A password is required',\n 'password.min' => 'Password must have minimum 4 character'\n ];\n }",
"public function messages()\n {\n return [\n 'model_no.required' => 'Model Name Is Required',\n 'registration_no.required.unique:add_vehicles' => 'Register Name Is Required',\n 'chassis_no.required' => 'Chassis Name Is Required',\n 'engine_no.required' => 'Engine Name Is Required',\n 'vehicle_type.required' => 'Vehicle Name Is Required',\n 'owner.required' => 'Owner Name Is Required',\n\n ];\n }",
"public function messages()\n {\n return [\n 'email.required' => 'Email is required!',\n 'email.regex' => 'Invalid email! Please enter a valid one',\n 'name.required' => 'Name is required!',\n 'password.required' => 'Password is required!',\n 'email.unique' => 'The email you have entered is already registered!',\n 'birth_date.required' => 'Birth date is required!',\n 'image.mimes' => 'The allowed image types are jpg and png only!'\n ];\n }",
"public function messages()\n {\n return [\n 'name.required' => 'A Team Name is required',\n 'filename.required' => 'A Team Logo is required',\n 'club_state.required' => 'A Club state is required',\n ];\n }",
"public function messages()\n {\n return [\n 'title.required' => 'Заглавие цвета не может быть пустым',\n 'title.min' => 'Минимальная длина заглавия 3 символов',\n 'title.max' => 'Максимальная длина заглавия 100 символов',\n 'title.unique' => 'Цвет с таким заглавием уже существует',\n 'code.required' => 'Код цвета не может быть пустым',\n 'code.min' => 'Минимальная длина кода цвета 3 символов',\n 'code.max' => 'Максимальная длина кода цвета 100 символов',\n ];\n }",
"public function messages()\n {\n return [\n 'contractor_account_id.exists' => 'Invalid data.',\n 'truck_id.exists' => 'Invalid data.',\n 'source_id.exists' => 'Invalid data.',\n 'destination_id.exists' => 'Invalid data.',\n 'driver_id.exists' => 'Invalid data.',\n 'material_id.exists' => 'Invalid data.',\n ];\n }",
"public function getErrorMessage()\n {\n return $this->validator->errors()->all();\n }",
"public function messages()\n {\n return [\n 'title.required' => ':attribute is required',\n 'title.min' => ':attribute atleast 5 character',\n 'title.regex' => ':attribute must be alpha numeric',\n 'title.unique' => ':attribute can not be duplicate',\n 'description.required'=> ':attribute is required',\n 'price.required'=> ':attribute is required',\n 'price.numeric'=> ':attribute must be number',\n 'image.required' => ':attribute is required',\n 'image.mimes' => 'Invalid :attribute type',\n 'image.max'=>':attribute can be maximum 1mb'\n ];\n }",
"public function messages() {\n \n $messages['group_name.unique'] ='No';\n $messages['student.required'] = trans('admin/voucher.discount_error');\n// $messages['password.required'] = trans('admin/admin.password_error');\n// $messages['confirm_password.required'] = trans('admin/admin.confirm_password_error');\n return $messages;\n }",
"public function messages()\n {\n return [\n 'required' => 'O campo :attribute é obrigatório',\n 'integer' => 'O campo :attribute deve ser um número inteiro',\n 'exists' => 'O usuário (ID :input) deve existir no banco de dados'\n ];\n }",
"public function messages()\n {\n return [\n 'txt_username.required' => 'Username field is required.'\n ,'txt_password.required' => 'Password field is required.'\n ,'txt_password.min' => 'Password must be at least 6 characters.'\n ,'txt_password.max' => 'Password must not be greater than 15 characters.'\n ];\n }",
"public function messages()\n {\n return array(\n 'name.required' => '商品名称是必须的',\n 'price.required' => '商品价格是必须的',\n 'price.numeric' => '商品价格必须是数字',\n 'storeNum.required' => '商品库存是必须的',\n 'storeNum.numeric' => '商品库存必须是数字',\n 'barCode.required' => '条形码是必须的',\n 'supplyCompany.required' => '生产厂商是必须的',\n 'goodsImg.required' => '商品图片是必须的'\n );\n }",
"public function messages()\n {\n return [\n 'created_by_id.required' => 'Employer Id is required',\n 'created_by_id.numeric' => 'Employer Id must be an integer type',\n 'team_name.required' => 'Team Name is required',\n 'team_name.string' => 'Team Name must be a string type',\n 'company_id.required' => 'Company Id is required',\n 'company_id.numeric' => 'Company Id must be an integer',\n ];\n }",
"public function messages()\n {\n return [\n 'first_name.required' => 'A first name is required',\n 'last_name.required' => 'A last name is required',\n 'avatar.required' => 'An avatar is required',\n 'avatar.dimensions' => 'Minimum avatar dimention has to be 100x100',\n 'email.required' => 'A valid email is required',\n ];\n }",
"public function messages()\n {\n return [\n 'file.mimes' => trans('common.file.ext.error')\n ];\n }",
"public function messages()\n {\n return [\n 'old_password.required' => 'old password is required',\n 'new_password.required' => 'new password is required',\n ];\n }",
"public function messages()\n {\n return [\n 'origin.required' => 'INVALID_PARAMETERS',\n 'destination.required' => 'INVALID_PARAMETERS',\n ];\n }",
"public function messages()\n {\n return [\n 'query.string' => \"Query given must be a string\",\n 'page.integer' => \"Page given must be an integer\",\n 'page.min' => \"page given must be equal or higher than 0\",\n ];\n }",
"public function messages()\n {\n return [\n 'salon.name.required' => 'Salon name is required',\n 'user.name.required' => 'Director name is required',\n 'salon.phone_number.required' => 'Phone number is required',\n 'user.email.required' => 'Email number is required',\n 'salon.phone_number.numeric' => 'Phone number may only contain numbers.',\n 'salon.phone_number.digits' => 'Phone number must be 8 digits.',\n 'user.email.email' => 'Email must be a valid email address.',\n 'user.email.unique' => 'Email has already been taken.',\n 'salon.phone_number.unique' => 'Phone number has already been taken.',\n ];\n }",
"public function getMessage(): array\n {\n return [\n self::RULE_REQUIRED => 'This Field is required',\n self::RULE_EMAIL => 'Please input valid email address',\n self::RULE_MATCH => 'The Passwords must match',\n self::RULE_UNIQUE => 'This record exists in the database',\n self::RULE_VALID_START_DATE => 'Project start date cannot be before today',\n self::RULE_VALID_END_DATE => 'Project end date cannot be before start date'\n\n ];\n }",
"public function getErrorMessages(){\n return $this->arr_msg; \n }",
"protected function messages()\n {\n return [\n 'id.required' => HttpAttributeInvalidCode::ID_REQUIRED\n ];\n }",
"private function errorMessages()\n {\n return [\n 'question_category_id.required' => 'Atleast one question-category '.\n 'is required',\n ];\n }"
] | [
"0.7999786",
"0.79715955",
"0.7780957",
"0.774656",
"0.774656",
"0.7706091",
"0.77023476",
"0.7665299",
"0.76568407",
"0.7629212",
"0.7562246",
"0.7557946",
"0.7420745",
"0.73959243",
"0.73619086",
"0.7361463",
"0.7348927",
"0.73398817",
"0.7322716",
"0.73136944",
"0.7311983",
"0.7311983",
"0.7284742",
"0.7270678",
"0.7253788",
"0.7232164",
"0.7229094",
"0.7228621",
"0.7219989",
"0.72060066",
"0.7197507",
"0.7196515",
"0.719509",
"0.71788245",
"0.71773696",
"0.71751964",
"0.7175078",
"0.7165248",
"0.71629083",
"0.7151273",
"0.7149466",
"0.7149287",
"0.71369517",
"0.7134834",
"0.7134495",
"0.7132284",
"0.7131668",
"0.712792",
"0.7110283",
"0.7097811",
"0.7094968",
"0.7094869",
"0.7093007",
"0.70878184",
"0.70844966",
"0.7082581",
"0.70823014",
"0.7082009",
"0.7068138",
"0.7067084",
"0.7062533",
"0.70621705",
"0.705804",
"0.7054403",
"0.705408",
"0.7050621",
"0.7050457",
"0.7046188",
"0.70403236",
"0.70367104",
"0.7035579",
"0.7024042",
"0.7022676",
"0.70220107",
"0.7017097",
"0.7015175",
"0.70134383",
"0.7007017",
"0.699821",
"0.69971323",
"0.6996611",
"0.69937867",
"0.69920844",
"0.69906145",
"0.698973",
"0.6983275",
"0.6979407",
"0.69781435",
"0.69756603",
"0.6975345",
"0.6969459",
"0.6969191",
"0.6967778",
"0.69669664",
"0.69653493",
"0.69599694",
"0.6956447",
"0.69526935",
"0.69495887",
"0.6947181",
"0.69423056"
] | 0.0 | -1 |
Returns the content set to this page | public function getContent()
{
return $this->_content;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getContent(){\n return $this->getPage();\n }",
"public function get_content()\n\t\t{\n\t\t\tif (!$this->is_cached()) {\n\t\t\t\t$this->load();\n\t\t\t}\n\n\t\t\treturn $this->content;\n\t\t}",
"public function getAllContent()\n {\n return $this->content;\n }",
"public function getContent()\n {\n return $this->get(self::_CONTENT);\n }",
"public function getContent()\n {\n return $this->get(self::_CONTENT);\n }",
"public function getContent()\n {\n return $this->get(self::_CONTENT);\n }",
"function get_content() {\r\n\t\treturn $this->content;\r\n\t}",
"public function getContent()\n {\n \t$content = $this->content;\n return $content;\n }",
"public function content()\n {\n return $this->cache->get('content');\n }",
"public function getContent()\n {\n if (!$this->retrieved && !$this->new) {\n $this->retrieve();\n }\n\n return $this->content;\n }",
"public function contents()\n\t{\n\t\treturn $this->contents;\n\t}",
"public function contents() { return $this->_m_contents; }",
"public function getContent() {\r\n\t\treturn $this->content;\r\n\t}",
"public function getContents()\n {\n $this->load();\n\n return $this->_contents;\n }",
"protected function getContent() {\n return $this->content;\n }",
"public function get_content() {\n return $this->content;\n }",
"public function getContent() {\n\t\treturn $this->content;\n\t}",
"public function getContent() {\n\t\treturn $this->content;\n\t}",
"public function getContent() {\n\t\treturn $this->content;\n\t}",
"public function getContent()\n {\n return $this->content;\n }",
"public function getContent() {\n if (empty($this->content)) {\n $this->refreshContent();\n }\n\n return $this->content;\n }",
"public final function get_content()\n {\n }",
"public function getContent () {\r\n\t\treturn $this->content;\r\n\t}",
"public final function get_content()\n {\n }",
"public final function get_content()\n {\n }",
"public static function getContent() {\n\t\treturn self::$_content;\n\t}",
"public function getContent(){\n\t\treturn $this->content;\n\t}",
"public function getContent() { return $this->content; }",
"public function getContent()\n\t{\n\t\treturn $this->content;\n\t}",
"public function getContent()\n\t{\n\t\treturn $this->content;\n\t}",
"public function getContent()\n\t{\n\t\treturn $this->content;\n\t}",
"public function getContent() {\n return $this->content;\n }",
"public function getContent()\n {\n return $this->content;\n }",
"public function getContent()\n {\n return $this->content;\n }",
"public function getContent()\n {\n return $this->content;\n }",
"public function getContent()\n {\n return $this->content;\n }",
"public function getContent()\n {\n return $this->content;\n }",
"public function getContent()\n {\n return $this->content;\n }",
"public function getContent()\n {\n return $this->content;\n }",
"public function getContent()\n {\n return $this->content;\n }",
"public function getContent()\n {\n return $this->content;\n }",
"public function getContent()\n {\n return $this->content;\n }",
"public function getContent()\n {\n return $this->content;\n }",
"public function getContent()\n {\n return $this->content;\n }",
"public function getContent()\n {\n return $this->content;\n }",
"public function getContent()\n {\n return $this->content;\n }",
"public function getContent()\n {\n return $this->content;\n }",
"public function getContent()\n {\n return $this->content;\n }",
"public function getContent()\n {\n return $this->content;\n }",
"public function getContent()\n {\n return $this->content;\n }",
"public function getContent()\n {\n return $this->content;\n }",
"public function getContent()\n {\n return $this->content;\n }",
"public function getContent()\n {\n return $this->content;\n }",
"public function getContent()\n {\n return $this->content;\n }",
"function getContent()\n {\n return $this->content;\n }",
"function getContent()\n {\n return $this->content;\n }",
"public function getContent()\n {\n return $this->_content;\n }",
"public function getContent()\n\t{\n\t\treturn $this->content_;\n\t}",
"public function getContent()\r\n {\r\n return $this->content;\r\n }",
"public function getContents()\n {\n return $this->contents;\n }",
"public function getContents()\n {\n return $this->contents;\n }",
"public function getContent()\r\n {\r\n return $this->_content;\r\n }",
"function getContent()\n {\n return $this->content;\n\n }",
"public function content()\n {\n return $this->content;\n }",
"public function content()\n {\n return $this->content;\n }",
"public function content()\n {\n return $this->content;\n }",
"public function getPageInfo(){\n\n $content = array();\n\n return $content;\n }",
"public function getContents(): array\n {\n return $this->content;\n }",
"public function getMainContentOfPage()\n {\n return $this->mainContentOfPage;\n }",
"public function content() {\n\n if(isset($this->cache['content'])) {\n return $this->cache['content'];\n } else {\n $inventory = $this->inventory();\n return $this->cache['content'] = new Content($this, $this->root() . DS . array_shift($inventory['content']));\n }\n\n }",
"public function getContents() \r\n { \r\n return $this->_contents; \r\n }",
"protected function getContentCollect()\n {\n return collect($this->getContentObject());\n }",
"public function currentPageContent()\n {\n return $this->pageGuide->getParsedContent($this->currentPage);\n }",
"public function content()\n {\n return $this->regions['content'];\n }",
"public function get()\n {\n return $this->contents;\n }",
"public function getContent() {\n\t\treturn $this->current_content;\n\t}",
"public function Content()\n {\n return $this->content;\n }",
"public function getContents()\n {\n return $this->getContents();\n }",
"private function getContent()\n {\n return file_get_contents($this->category_dir.'/'.$this->htmlfile);\n }",
"public function getContent()\n {\n return $this->data;\n }",
"protected function getContents()\n {\n $contents = $this->crawler->filter('.page.group');\n if (!$contents->count()) {\n return;\n }\n\n $contents = $contents->html();\n\n // I'll have my own syntax highlighting, WITH BLACKJACK AND HOOKERS\n $this->crawler->filter('pre')->each(function ($code) use (&$contents) {\n $unformatted = htmlentities($code->text());\n $unformatted = '<pre><code class=\"php\">'.$unformatted.'</code></pre>';\n $contents = str_replace('<pre class=\"code php\">'.$code->html().'</pre>', $unformatted, $contents);\n });\n\n return $contents;\n }",
"public function showContent()\r\n {\r\n $this->preparePage();\r\n /**\r\n * @todo do code refactoring\r\n */\r\n if (clsSysCommon::isAjax()) {\r\n $content = $this->getContent();\r\n } else {\r\n $content = $this->getContent();\r\n }\r\n return $content;\r\n }",
"public function content()\n {\n return $this->morphedByMany('App\\Content', 'assetable');\n }",
"public function getContent()\n {\n $content = $this->get()->post_content;\n $content = apply_filters('the_content', $content);\n $content = str_replace(']]>', ']]>', $content);\n\n return $this->content = $content;\n }",
"public function getContent() : array\n {\n return $this->content;\n }",
"public function getContents();",
"public function getContents();",
"public function getContents();",
"public function getContents();",
"public function getContents();",
"public function getContent()\n {\n /** @var WebApplication|ConsoleApplication $this */\n return $this->get('content');\n }",
"public function getContentElements()\n\t{\n\t\treturn $this->getOptionData('tl_content');\n\t}",
"public function getContent()\n {\n return $this->objOutput->getObjectRender()->overrideContent($this->output);\n }",
"public function getContent()\n {\n return $this->objOutput->getObjectRender()->overrideContent($this->output);\n }",
"public function getPageContent() {\n\t\tif ($this->url) {\n\t\t\t// Get content\n\t\t\t$sql = \"\n\t\t\tSELECT *\n\t\t\tFROM VContent\n\t\t\tWHERE\n\t\t\t type = 'page' AND\n\t\t\t url = ? AND\n\t\t\t published <= NOW(); AND\n\t\t\t deleted IS NULL;\n\t\t\t\";\n\t\t\t$res = $this->getContent($sql, array($this->url));\n\n\t\t\tif ($res[0]) {\n\t\t\t\t$c = $res[0];\n\t\t\t\t// Filter content before using it.\n\t\t\t\t$c->data = $this->textfilter->doFilter($c->data, \"{$c->filter},purify,typography\");\n\t\t\t\t\n\t\t\t\treturn array('id' => $c->id,\n\t\t\t\t\t\t'title' => $c->title,\n\t\t\t\t\t\t'data' => $c->data,\n\t\t\t\t\t\t'link' => $c->link,\n\t\t\t\t\t\t'name' => $c->UserName,\n\t\t\t\t\t'acronym' => $this->acronym);\n\t\t\t} else {\n\t\t\t\treturn $this->emptypage;\n\t\t\t}\n\t\t} else {\n\t\t\treturn $this->emptypage;\n\t\t}\n\t}",
"public function getPageContent(): string {\n\t\treturn $this->m_pageContent;\n\t}",
"public function getContentList() {\r\n\t\tif (!$this->read) {\r\n\t\t\t$this->open();\r\n\t\t\t$this->readContent();\r\n\t\t}\r\n\t\treturn $this->contentList;\r\n\t}",
"public function getContents() {}",
"public function getContents() {}"
] | [
"0.7974905",
"0.7411684",
"0.74112064",
"0.7343837",
"0.7343837",
"0.7343837",
"0.72913414",
"0.72107834",
"0.7181987",
"0.7155147",
"0.7154089",
"0.71387756",
"0.71318966",
"0.71242785",
"0.7115559",
"0.7106862",
"0.710645",
"0.710645",
"0.710645",
"0.70942175",
"0.7087297",
"0.707739",
"0.70765275",
"0.7076298",
"0.7076298",
"0.7072954",
"0.7071846",
"0.7069509",
"0.705917",
"0.705917",
"0.705917",
"0.7045764",
"0.7042627",
"0.7042627",
"0.7042627",
"0.7042627",
"0.7042627",
"0.7042627",
"0.7042627",
"0.7042627",
"0.7042627",
"0.7042627",
"0.7042627",
"0.7042627",
"0.7042627",
"0.7042627",
"0.7042627",
"0.7042627",
"0.7042627",
"0.7042627",
"0.7042627",
"0.7042627",
"0.7042627",
"0.7042627",
"0.7022729",
"0.7022729",
"0.70179015",
"0.701768",
"0.70108443",
"0.7003451",
"0.7003451",
"0.6994154",
"0.69816816",
"0.69577587",
"0.69577587",
"0.69577587",
"0.6956035",
"0.6954436",
"0.6954204",
"0.6945237",
"0.69257927",
"0.69253886",
"0.69122875",
"0.68940175",
"0.68856925",
"0.6882382",
"0.6867957",
"0.68520886",
"0.6831825",
"0.68296593",
"0.6819937",
"0.6775791",
"0.6763979",
"0.6761763",
"0.6756239",
"0.6736981",
"0.6736981",
"0.6736981",
"0.6736981",
"0.6736981",
"0.671988",
"0.6717499",
"0.6711456",
"0.6711456",
"0.668814",
"0.6675571",
"0.6662581",
"0.6656797",
"0.6655834"
] | 0.6995587 | 62 |
Sets content to this page | public function setContent($content)
{
if ($content instanceof Zend_View) {
$this->_content = $content;
return $this;
}
if (is_scalar($content)) {
$this->_content = (string) $content;
return $this;
}
throw new Scil_Services_Form_Wizard_Exception(__METHOD__.' content type not recognised : '.gettype($content).', must be Zend_View or scalar.');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function setContent() {}",
"abstract function setContent();",
"public function setContent($content, $data=null){\n\n\t\t$this->content = $content;\n\n\t\t$this->page_data = $data;\n\n\t\t$this->index();\n\n\t\t\n\n\t}",
"public function setPageContent(string $content): void {\n\t\t$this->m_pageContent = $content;\n\t}",
"public function setContent($content){\n $this->_content = $content;\n }",
"public function setBodyContent($data)\n\t{\n\t\t$this->_pageData['data']['content'] = $data;\n\t}",
"protected function setHtmlContent() {}",
"public function set_content ($content) {\n $this->content = $content;\n }",
"public function setContent($content)\r\n {\r\n $this->_content = $content;\r\n }",
"public function setContent($content) {\n $this->content = $content;\n }",
"public function setContent($content);",
"public function setContent($content);",
"public function setContent($content);",
"public function setContent($content);",
"public function setContent($content);",
"public function setContent($content);",
"public function setContent($content);",
"public function setContent($content);",
"public function setContent($content);",
"public function setContent($content);",
"public function setContent($content)\n {\n $this->_content = $content;\n }",
"public function setContent($content)\r\n {\r\n $this->content = $content;\r\n }",
"function setContent($c) {\n\t\t$this->set(\"content\",$c);\n\t}",
"public function setContent($content) {\n\n $this->content = $content;\n }",
"public function setContent($content) {\n\n $this->content = $content;\n }",
"public function setContent($content)\n\t{\n\t\t$this->content = $content;\n\t}",
"public function setContent($content)\n\t{\n\t\t$this->content = $content;\n\t}",
"public function setContent($content)\n\t{\n\t\t$this->content = $content;\n\t}",
"public function setContent($content)\n {\n $this->content = $content;\n }",
"public function setContent($content)\n {\n $this->content = $content;\n }",
"public function setContent($content)\n {\n $this->content = $content;\n }",
"public function set_content() {\n\t\tif ( SiteHealthFilter::is_debug_mode() ) {\n\t\t\t// Show default content, see url above\n\t\t\tswitch ( $this->slug ) {\n\t\t\t\tcase 'tools':\n\t\t\t\t\tWC_Admin_Status::status_tools();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'logs':\n\t\t\t\t\tWC_Admin_Status::status_logs();\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tWC_Admin_Status::status_report();\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\t$file = dirname( __FILE__ ) . '/html/' . $this->slug . '.php';\n\t\tif ( file_exists( $file ) ) {\n\t\t\tinclude_once $file;\n\t\t}\n\t}",
"function setContent(string $content_html): void\n {\n $this->data['content'] = $content_html;\n }",
"public function setContent ($content) {\r\n\t\t$this->content = (string)$content;\r\n\t}",
"public function setMainContentOfPage($value)\n {\n $this->mainContentOfPage = $value;\n }",
"public function set_content( $content )\r\n\t {\r\n\t \t$this->_content_to_load = $con;\r\n\t }",
"public function setContent()\n {\n }",
"function setContent($content){\n\t\t\tglobal $tableContent;\n\t\t\t\n\t\t\t$tableContent = $content;\n\t\t}",
"function setContent($content){\n\t\t\tglobal $tableContent;\n\t\t\t\n\t\t\t$tableContent = $content;\n\t\t}",
"private function setContent()\n {\n $this->setTag();\n $this->openRoot();\n $this->setParam(ModulesInterface::KEY_NAME, ApiInterface::RAML_TYPE_STRING, ucfirst($this->generator->version));\n $this->setParam(ConfigInterface::ATTRIBUTES_CASE, ApiInterface::RAML_TYPE_STRING, ConfigInterface::DEFAULT_CASE);\n $this->setQueryParams();\n $this->setTrees();\n $this->setJwtContent();\n $this->setConfigEntities();\n $this->closeRoot();\n }",
"public function set_content(string $content) {\n $this->content = $content;\n }",
"public function setContent($content) {\n\t\t$this->buffer['content'] = $content;\n\t}",
"public function setContent( string $content );",
"function setContent($value)\n {\n $this->setAttribute(\"content\", $value);\n return $this;\n }",
"public function setContent($newContent) {\n\t\t$this->content = $newContent; \n\t}",
"public function setContent( string $content ) : void\n {\n $this->content = $content;\n }",
"function addContent($content)\n {\n $this->page .= $content;\n }",
"private function content() {\n $this->checkPost();\n\n if (isset($_SESSION['CREATE'])) {\n\n switch ($_SESSION['CREATE']['page']) {\n case 0:\n $this->pageAgreement();\n break;\n case 1:\n $this->pageNameIntro();\n break;\n case 2:\n $this->pageMark();\n break;\n case 3:\n $this->pageFinal();\n break;\n default:\n echo '<h1>Error: Page Invalid<h1>';\n break;\n }\n\n }else\n echo '<h1>Error: Session invalid</h1>';\n }",
"public function setContent(string $content): void\n {\n $this->_content = $content;\n }",
"public function set_content() {\n\n\t\t$this->content = get_the_term_list( $this->data, $this->taxonomy, $this->prepend, $this->delimiter, $this->append );\n\t}",
"public function setContent($value)\n {\n return $this->set('Content', $value);\n }",
"public function setContent($value)\n {\n return $this->set('Content', $value);\n }",
"protected function setPlainContent() {}",
"public function setContent(string $content): void\n {\n $this->content = $content;\n }",
"abstract protected function render_page_content(): void;",
"public function setContent($subst)\n\t{\n\t\t$this->vars['content'] = $subst;\n\t}",
"public function setContent($content)\n {\n $this->original = $content;\n\n // If the content is \"JSONable\" we will set the appropriate header and convert the content to JSON, This is\n // useful when returning something like models from routes that will be automatically transformed to their\n // JSON form.\n if ($this->shouldBeJson($content)) {\n $this->header('Content-Type', 'application/json');\n\n $content = $this->morphToJson($content);\n }\n // If this content implements the \"Renderable\" interface then we will call the render method on the object so\n // we will avoid any \"__toString\" exceptions that might be thrown and have their errors obscured(使模糊,费解)\n // by PHP's handling.\n elseif ($content instanceof Renderable) {\n $content = $content->render();\n }\n\n parent::setContent($content);\n\n return $this;\n }",
"public function setContent($content){\n $this->_content = $this->checkFormat($content);\n }",
"public function setContent($content)\n {\n return $this->setData(self::CONTENT, $content);\n }",
"public function cachePageContent(): void\n {\n $value = [\n 'checksum' => $this->getCacheChecksum(),\n 'content' => $this->_content,\n 'content_meta' => $this->_content_meta\n ];\n\n $cache = $this->getCache('render');\n $key = md5($this->getCacheKey() . '-content');\n\n $cache->set($key, $value);\n }",
"function _setContent()\r\n {\r\n global $_FRONTEND_LANGID;\r\n\r\n $this->_objTpl->addBlockfile('FILEBROWSER_CONTENT', 'fileBrowser_content', 'module_fileBrowser_content.html');\r\n\r\n $ckEditorFuncNum = isset($_GET['CKEditorFuncNum']) ? '&CKEditorFuncNum='.contrexx_raw2xhtml($_GET['CKEditorFuncNum']) : '';\r\n $ckEditor = isset($_GET['CKEditor']) ? '&CKEditor='.contrexx_raw2xhtml($_GET['CKEditor']) : '';\r\n $rowNr = 0;\r\n\r\n switch ($this->_mediaType) {\r\n case 'webpages':\r\n $jd = new \\Cx\\Core\\Json\\JsonData();\r\n $data = $jd->data('node', 'getTree', array('get' => array('recursive' => 'true')));\r\n $pageStack = array();\r\n $ref = 0;\r\n $data['data']['tree'] = array_reverse($data['data']['tree']);\r\n foreach ($data['data']['tree'] as &$entry) {\r\n $entry['attr']['level'] = 0;\r\n array_push($pageStack, $entry);\r\n }\r\n while (count($pageStack)) {\r\n $entry = array_pop($pageStack);\r\n $page = $entry['data'][0];\r\n $arrPage['level'] = $entry['attr']['level'];\r\n $arrPage['node_id'] = $entry['attr']['rel_id'];\r\n $children = $entry['children'];\r\n $children = array_reverse($children);\r\n foreach ($children as &$entry) {\r\n $entry['attr']['level'] = $arrPage['level'] + 1;\r\n array_push($pageStack, $entry);\r\n }\r\n $arrPage['catname'] = $page['title'];\r\n $arrPage['catid'] = $page['attr']['id'];\r\n $arrPage['lang'] = BACKEND_LANG_ID;\r\n $arrPage['protected'] = $page['attr']['protected'];\r\n $arrPage['type'] = \\Cx\\Core\\ContentManager\\Model\\Entity\\Page::TYPE_CONTENT;\r\n $arrPage['alias'] = $page['title'];\r\n $arrPage['frontend_access_id'] = $page['attr']['frontend_access_id'];\r\n $arrPage['backend_access_id'] = $page['attr']['backend_access_id'];\r\n \r\n // JsonNode does not provide those\r\n //$arrPage['level'] = ;\r\n //$arrPage['type'] = ;\r\n //$arrPage['parcat'] = ;\r\n //$arrPage['displaystatus'] = ;\r\n //$arrPage['moduleid'] = ;\r\n //$arrPage['startdate'] = ;\r\n //$arrPage['enddate'] = ;\r\n \r\n // But we can simulate level and type for our purposes: (level above)\r\n $jsondata = json_decode($page['attr']['data-href']);\r\n $path = $jsondata->path;\r\n if (trim($jsondata->module) != '') {\r\n $arrPage['type'] = \\Cx\\Core\\ContentManager\\Model\\Entity\\Page::TYPE_APPLICATION;\r\n $module = explode(' ', $jsondata->module, 2);\r\n $arrPage['modulename'] = $module[0];\r\n if (count($module) > 1) {\r\n $arrPage['cmd'] = $module[1];\r\n }\r\n }\r\n \r\n $url = \"'\" . '[[' . \\Cx\\Core\\ContentManager\\Model\\Entity\\Page::PLACEHOLDER_PREFIX;\r\n \r\n// TODO: This only works for regular application pages. Pages of type fallback that are linked to an application\r\n// will be parsed using their node-id ({NODE_<ID>})\r\n if (($arrPage['type'] == \\Cx\\Core\\ContentManager\\Model\\Entity\\Page::TYPE_APPLICATION) && ($this->_mediaMode !== 'alias')) {\r\n $url .= $arrPage['modulename'];\r\n if (!empty($arrPage['cmd'])) {\r\n $url .= '_' . $arrPage['cmd'];\r\n }\r\n \r\n $url = strtoupper($url);\r\n } else {\r\n $url .= $arrPage['node_id'];\r\n }\r\n \r\n // if language != current language or $alwaysReturnLanguage\r\n if ($this->_frontendLanguageId != $_FRONTEND_LANGID ||\r\n (isset($_GET['alwaysReturnLanguage']) &&\r\n $_GET['alwaysReturnLanguage'] == 'true')) {\r\n $url .= '_' . $this->_frontendLanguageId;\r\n }\r\n $url .= \"]]'\";\r\n \r\n $this->_objTpl->setVariable(array(\r\n 'FILEBROWSER_ROW_CLASS' => $rowNr%2 == 0 ? \"row1\" : \"row2\",\r\n 'FILEBROWSER_FILE_PATH_CLICK' => \"javascript:{setUrl($url,null,null,'\".\\FWLanguage::getLanguageCodeById($this->_frontendLanguageId).$path.\"','page')}\",\r\n 'FILEBROWSER_FILE_NAME' => $arrPage['catname'],\r\n 'FILEBROWSER_FILESIZE' => ' ',\r\n 'FILEBROWSER_FILE_ICON' => $this->_iconPath.'htm.png',\r\n 'FILEBROWSER_FILE_DIMENSION' => ' ',\r\n 'FILEBROWSER_SPACING_STYLE' => 'style=\"margin-left: '.($arrPage['level'] * 15).'px;\"',\r\n ));\r\n $this->_objTpl->parse('content_files');\r\n \r\n $rowNr++;\r\n }\r\n break;\r\n case 'Media1':\r\n case 'Media2':\r\n case 'Media3':\r\n case 'Media4':\r\n \\Permission::checkAccess(7, 'static'); //Access Media-Archive\r\n \\Permission::checkAccess(38, 'static'); //Edit Media-Files\r\n \\Permission::checkAccess(39, 'static'); //Upload Media-Files\r\n\r\n //Hier soll wirklich kein break stehen! Beabsichtig!\r\n \r\n \r\n default:\r\n if (count($this->_arrDirectories) > 0) {\r\n foreach ($this->_arrDirectories as $arrDirectory) {\r\n $this->_objTpl->setVariable(array(\r\n 'FILEBROWSER_ROW_CLASS' => $rowNr%2 == 0 ? \"row1\" : \"row2\",\r\n 'FILEBROWSER_FILE_PATH_CLICK' => \"index.php?cmd=FileBrowser&standalone=true&langId={$this->_frontendLanguageId}&type={$this->_mediaType}&path={$arrDirectory['path']}\". $ckEditor . $ckEditorFuncNum,\r\n 'FILEBROWSER_FILE_NAME' => $arrDirectory['name'],\r\n 'FILEBROWSER_FILESIZE' => ' ',\r\n 'FILEBROWSER_FILE_ICON' => $arrDirectory['icon'],\r\n 'FILEBROWSER_FILE_DIMENSION' => ' ',\r\n ));\r\n $this->_objTpl->parse('content_files');\r\n $rowNr++;\r\n }\r\n }\r\n \r\n if (count($this->_arrFiles) > 0) {\r\n $arrEscapedPaths = array();\r\n foreach ($this->_arrFiles as $arrFile) {\r\n $arrEscapedPaths[] = contrexx_raw2encodedUrl($arrFile['path']);\r\n $this->_objTpl->setVariable(array(\r\n 'FILEBROWSER_ROW_CLASS' => $rowNr%2 == 0 ? \"row1\" : \"row2\",\r\n 'FILEBROWSER_ROW_STYLE'\t\t\t\t=> in_array($arrFile['name'], $this->highlightedFiles) ? ' style=\"background: '.$this->highlightColor.';\"' : '',\r\n 'FILEBROWSER_FILE_PATH_DBLCLICK' => \"setUrl('\".contrexx_raw2xhtml($arrFile['path']).\"',\".$arrFile['width'].\",\".$arrFile['height'].\",'')\",\r\n 'FILEBROWSER_FILE_PATH_CLICK' => \"javascript:{showPreview(\".(count($arrEscapedPaths)-1).\",\".$arrFile['width'].\",\".$arrFile['height'].\")}\",\r\n 'FILEBROWSER_FILE_NAME' => contrexx_stripslashes($arrFile['name']),\r\n 'FILEBROWSER_FILESIZE' => $arrFile['size'].' KB',\r\n 'FILEBROWSER_FILE_ICON' => $arrFile['icon'],\r\n 'FILEBROWSER_FILE_DIMENSION' => (empty($arrFile['width']) && empty($arrFile['height'])) ? '' : intval($arrFile['width']).'x'.intval($arrFile['height'])\r\n ));\r\n $this->_objTpl->parse('content_files');\r\n $rowNr++;\r\n }\r\n \r\n $this->_objTpl->setVariable('FILEBROWSER_FILES_JS', \"'\".implode(\"','\",$arrEscapedPaths).\"'\");\r\n }\r\n if (array_key_exists($this->_mediaType, $this->mediaTypePaths)) {\r\n $this->_objTpl->setVariable('FILEBROWSER_IMAGE_PATH', $this->mediaTypePaths[$this->_mediaType][1]);\r\n } else {\r\n $this->_objTpl->setVariable('FILEBROWSER_IMAGE_PATH', ASCMS_CONTENT_IMAGE_WEB_PATH);\r\n }\r\n break;\r\n }\r\n $this->_objTpl->parse('fileBrowser_content');\r\n }",
"public function setContent($content){\n\t\t$this->content = $content;\n\t\t\n\t\treturn $this;\n\t}",
"public function render() {\n\t\t$this->render_page_content();\n\t}",
"public function set_page_content($p_page_content)\n\t{\n\t\t$this->c_input_content = $p_page_content;\n\t}",
"public function renderContent()\n {\n $this->setupPage();\n $this->pageRenderer->setTitle($this->title);\n $this->loadJavaScripts();\n $this->setJavaScriptCodeArray();\n $this->loadStylesheets();\n\n $this->view->assign('docHeader', $this->docHeaderComponent->docHeaderContent());\n if ($this->moduleId) {\n $this->view->assign('moduleId', $this->moduleId);\n }\n if ($this->moduleName) {\n $this->view->assign('moduleName', $this->moduleName);\n }\n $this->view->assign('uiBlock', $this->uiBlock);\n $this->view->assign('flashMessageQueueIdentifier', $this->getFlashMessageQueue()->getIdentifier());\n $renderedPage = $this->pageRenderer->render(PageRenderer::PART_HEADER);\n $renderedPage .= $this->bodyTag;\n $renderedPage .= $this->view->render();\n $this->pageRenderer->addJsFooterInlineCode('updateSignals', BackendUtility::getUpdateSignalCode());\n $renderedPage .= $this->pageRenderer->render(PageRenderer::PART_FOOTER);\n\n return $renderedPage;\n }",
"protected function render_content()\n {\n }",
"protected function render_content()\n {\n }",
"protected function render_content()\n {\n }",
"protected function render_content()\n {\n }",
"protected function setContentType()\n {\n $this->content_type = 'Page';\n }",
"public function setContents($contents) {\n $this->_contents = $contents;\n }",
"public function render_content()\n {\n }",
"public function render_content()\n {\n }",
"public function render_content()\n {\n }",
"public function render_content()\n {\n }",
"public function render_content()\n {\n }",
"public function render_content()\n {\n }",
"public function render_content()\n {\n }",
"public function render_content()\n {\n }",
"public function render_content()\n {\n }",
"public function render_content()\n {\n }",
"public function render_content()\n {\n }",
"public function render_content()\n {\n }",
"public function render_content()\n {\n }",
"public function render_content()\n {\n }",
"public function content($content)\n {\n $this->content = $content;\n return $this;\n }",
"public function setSugarContent($value)\n {\n $this->sugarContent = $value;\n }",
"public function setContent($content)\n {\n $this->content = $content;\n\n return $this;\n }",
"function printContent()\t{\n\n\t\t$this->content .= $this->doc->endPage();\n\t\techo $this->content;\n\t}",
"function printContent()\t{\n\n\t\t\t\t\t$this->content.=$this->doc->endPage();\n\t\t\t\t\techo $this->content;\n\t\t\t\t}",
"public function buildContent(Context $context, Page $page) {\n\t\tif ($context->ui->setting('content/pageContent/enabled', false)) {\n\t\t\t$this->processTargets($context, $page);\n\t\t} else {\n\t\t\t$contentData = get_field(\"content\", $page->id) ?: [];\n\t\t\t$this->content = new ContentBlockContainer($context, $contentData, null, $page);\n\t\t}\n\t}",
"public function setContent(?string $value): void {\n $this->getBackingStore()->set('content', $value);\n }",
"function printContent()\t{\n\n\t\t$this->content.=$this->doc->endPage();\n\t\techo $this->content;\n\t}",
"function printContent()\t{\n\n\t\t$this->content.=$this->doc->endPage();\n\t\techo $this->content;\n\t}",
"function printContent()\t{\n\n\t\t$this->content.=$this->doc->endPage();\n\t\techo $this->content;\n\t}",
"private function renderContent()\n {\n $this->tabs[$this->currentlyActiveTab()]->view()->render();\n }",
"public function setContent($value)\n {\n return $this->set(self::_CONTENT, $value);\n }",
"public function setContent($value)\n {\n return $this->set(self::_CONTENT, $value);\n }",
"function printContent()\t{\n\t\t$this->content.= $this->doc->endPage();\n\t\techo $this->content;\n\t}",
"public function update_page_content() {\n\t\tglobal $post;\n\t\tif ( empty( $post->post_content_filtered ) ) {\n\t\t\t$post->post_content_filtered = $post->post_content;\n\t\t\twp_update_post( $post, false );\n\t\t}\n\t}",
"public function renderPage()\r\n {\r\n $this->setMasterContent();\r\n // Echo the page immediately.\r\n $this->_htmlpage->renderPage();\r\n }"
] | [
"0.79065496",
"0.76950467",
"0.7420616",
"0.7338709",
"0.7280615",
"0.72548413",
"0.7220917",
"0.72158235",
"0.7090891",
"0.7086734",
"0.70655435",
"0.70655435",
"0.70655435",
"0.70655435",
"0.70655435",
"0.70655435",
"0.70655435",
"0.70655435",
"0.70655435",
"0.70655435",
"0.70543784",
"0.7050023",
"0.7032672",
"0.70315564",
"0.70315564",
"0.7005588",
"0.7005588",
"0.7005588",
"0.69993633",
"0.69993633",
"0.69993633",
"0.6935662",
"0.6883133",
"0.6859203",
"0.6858112",
"0.68532497",
"0.6826618",
"0.6770084",
"0.6770084",
"0.6742062",
"0.67080337",
"0.6668573",
"0.66415995",
"0.6624294",
"0.66223997",
"0.65465486",
"0.6504858",
"0.65025663",
"0.64864415",
"0.6483885",
"0.64751",
"0.64751",
"0.64595956",
"0.6428884",
"0.642373",
"0.64235437",
"0.6416875",
"0.641199",
"0.63973415",
"0.6307048",
"0.62482876",
"0.6244934",
"0.62446004",
"0.62251323",
"0.6224819",
"0.62146664",
"0.62146664",
"0.62146664",
"0.6213086",
"0.6199039",
"0.61942035",
"0.61911535",
"0.61911535",
"0.61911535",
"0.61911535",
"0.61911535",
"0.61911535",
"0.61911535",
"0.61911535",
"0.61911535",
"0.61911535",
"0.61911535",
"0.61911535",
"0.61911535",
"0.61911535",
"0.6185964",
"0.61815935",
"0.6170646",
"0.61688757",
"0.6167501",
"0.61378914",
"0.61336154",
"0.6130716",
"0.6130716",
"0.6130716",
"0.6097024",
"0.60949016",
"0.60949016",
"0.6091472",
"0.6079177",
"0.60734594"
] | 0.0 | -1 |
Renders the page to a string ready for display | public function render(Zend_Form $form)
{
// Get the current view
if ( ! ($view = $this->getView()) instanceof Zend_View) {
throw new Scil_Services_Form_Wizard_Exception(__METHOD__.' no view found, unable to render');
}
// Set the title and description
$view->title = $this->getTitle();
$view->description = $this->getDescription();
// Apply rendered form to the view
$view->content = $this->getContent();
$view->form = $form;
// Return the view
return $view;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract function render_page();",
"public function render() {\n\t\t$this->render_page_content();\n\t}",
"public function render() {\n\t\treturn $this->template( 'page' );\n\t}",
"public function render_page() {\n\t\t$this->render_template();\n\t}",
"public function render() {\n $vars = array('page' => &$this);\n // Page complete.\n $this->env->hook('page_render', $vars);\n return $this->html;\n }",
"public function render() {\n\t\techo $this->header->toString();\n\t\techo $this->panel->toString();\n\t\techo $this->page->toString();\n\t\tif( $this->getMessages() != null ) {\n\t\t\techo $this->messages->toString();\n\t\t}\n\t\techo $this->footer->toString();\n\t}",
"public function renderPage()\r\n {\r\n $this->setMasterContent();\r\n // Echo the page immediately.\r\n $this->_htmlpage->renderPage();\r\n }",
"public function renderPage()\r\n {\r\n $this->setMasterContent();\r\n // Echo the page immediately.\r\n $this->_htmlpage->renderPage();\r\n }",
"public function render() {\n echo \"<!DOCTYPE html>\\n\";\n echo \"<html>\\n\";\n $this->show_head();\n \n echo\"\\n<body>\\n\";\n echo $this->show_contents();\n\n echo \"\\n</body>\";\n echo \"\\n</html>\\n\\n\";\n }",
"public function displayPage()\n {\n\n $this->model->checkUserSession();\n $html = $this->displayHeader();\n $html .= $this->displayContent();\n $html .= $this->displayFooter();\n\n return $html;\n }",
"public function render()\n {\n header(\"Content-Type: application/xhtml+xml;charset=iso-8859-1\");\n\n $renderedPage = '<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>' . PHP_EOL;\n\n /*--------------------------------------------------------------------\n\t Dump header definition, namespace etc\n ------------------------------------------------------------------*/\n\n // render all of the page content\n $renderedPage .= parent::render();// . PHP_EOL;\n \n\n// error_log(\"XML: \" . $renderedPage);\n\n if ($this->isDirectDisplay() == true)\n {\t \n echo $renderedPage;\n }\n return $renderedPage;\n }",
"abstract protected function render_page_content(): void;",
"public function renderContent()\n {\n $this->setupPage();\n $this->pageRenderer->setTitle($this->title);\n $this->loadJavaScripts();\n $this->setJavaScriptCodeArray();\n $this->loadStylesheets();\n\n $this->view->assign('docHeader', $this->docHeaderComponent->docHeaderContent());\n if ($this->moduleId) {\n $this->view->assign('moduleId', $this->moduleId);\n }\n if ($this->moduleName) {\n $this->view->assign('moduleName', $this->moduleName);\n }\n $this->view->assign('uiBlock', $this->uiBlock);\n $this->view->assign('flashMessageQueueIdentifier', $this->getFlashMessageQueue()->getIdentifier());\n $renderedPage = $this->pageRenderer->render(PageRenderer::PART_HEADER);\n $renderedPage .= $this->bodyTag;\n $renderedPage .= $this->view->render();\n $this->pageRenderer->addJsFooterInlineCode('updateSignals', BackendUtility::getUpdateSignalCode());\n $renderedPage .= $this->pageRenderer->render(PageRenderer::PART_FOOTER);\n\n return $renderedPage;\n }",
"public function render(): string\n {\n parent::enqueue();\n $json = $this->jsonMain();\n return twig_render('page_main', $json);\n }",
"public static function renderContent() {}",
"public function render() {\n\t\t\t\n\t\t\t$this->_content = ob_get_contents();\n\t\t\tob_clean();\n\t\t\t\n\t\t\t$this->outputLine($this->_doctype);\n\t\t\t$this->outputLine('<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"' . $this->_lang . '\" lang=\"' . $this->_lang . '\" dir=\"' . $this->_dir . '\">');\n\t\t\t\n\t\t\t$this->renderHead();\n\t\t\t\n\t\t\t$this->renderBody();\n\t\t\t\n\t\t\t$this->outputLine('</html>');\n\t\t\t\n\t\t}",
"function renderToClient();",
"public function printHtmlPage(){\n\n // Change the content headers to that of HTML\n header('Content-type: text/html; charset=utf8');\n\n // Include the HTML wrapper and collect output\n ob_start();\n require_once(LEGACY_MMRPG_ROOT_DIR.'markup/html-wrapper.php');\n $html_markup = ob_get_clean();\n\n // Print out the collected markup and exit\n echo($html_markup);\n exit();\n\n }",
"public function render() {\n\t\t$this->rendered = false;\n\t\tob_start();\n\t\t\t//RENDERING VIEW HERE\n\t\t\trequire_once(\"pages/View/\" . $this->_view);\n\t\t\t$this->content = ob_get_contents();\n\t\tob_end_clean();\n\t\t$this->rendered = true;\n\t\treturn ($this->content);\n\t}",
"private function renderPage()\n {\n $content = <<<EOD\n<div id=\"layout-block\">\n{$this->searchForm->render()}\n{$this->renderLegend()}\n{$this->renderPools()}\n</div>\nEOD;\n return $this->renderBaseTemplate($content);\n }",
"public function display()\n {\n //If the page was cached\n if ($this->isCached)\n {\n //Nothing to do, we already showed the page\n return;\n }\n return $this->route->getView()->output();\n }",
"protected function render() {}",
"protected function render() {}",
"protected function render() {}",
"public function render() : string\n {\n if($this->currentPage - 1 >= 1) {\n $this->numberPrevious = $this->currentPage > 2 ? \n $this->currentPage - 1 : 1;\n }\n\n if($this->totalPage - $this->currentPage >= 1) {\n $this->numberNext = ($this->totalPage - $this->currentPage) >= 2 ?\n $this->currentPage + $this->nextLength : \n ($this->totalPage - $this->currentPage) + $this->currentPage;\n }\n \n $prevTemplate = $this->previous($this->numberPrevious);\n $nextTemplate = $this->next($this->numberNext);\n $currentTemplate = $this->current();\n return $this->generate($prevTemplate,$currentTemplate,$nextTemplate);\n }",
"function renderResponse() {\n // le header contient le début de la page jusqu'à la balise <body>\n // on redéclare title pour le header\n $header = new View('global.header', array('title' => $this->title));\n echo $header->getHtml();\n\n\n // le menu est composé de la balise <nav> et de ses items\n $menu = new View('global.menu');\n echo $menu->getHtml();\n\n /* début corps de page */\n\n // on affiche les messages éventuels\n $this->showMessages();\n\n // on affiche le contenu principal de la page\n\n echo $this->content;\n\n /* fin corps de page */\n\n // on affiche le footer et on ferme la page html\n $footer = new View('global.footer');\n echo $footer->getHtml();\n }",
"public function render();",
"public function render();",
"public function render();",
"public function render();",
"public function render();",
"public function render();",
"public function render();",
"public function render();",
"public function render();",
"public function render();",
"public function render();",
"public function render();",
"public function render();",
"public function render();",
"public function render();",
"public function render();",
"public function render();",
"public function render();",
"private function renderWithDocument() \n\t{\n\t\t$this->controller->go(RootPanel::get());\n\t\t$output\t= Document::get()->assemble();\n\t\tprintf('%s', $output);\n\t}",
"public abstract function render();",
"public abstract function render();",
"abstract public function render();",
"abstract public function render();",
"abstract public function render();",
"abstract public function render();",
"abstract public function render();",
"abstract public function render();",
"public function render(): void {\r\n $pages = MJKGTAPI::pages();\r\n $wp_cron = get_option('cron');\r\n\r\n $this->render_css();\r\n\r\n printf('<div class=\"wrap\">');\r\n $this->output_intro();\r\n printf('<div id=\"%s\">', self::id_main);\r\n $this->output_sections($pages, $wp_cron);\r\n printf('</div></div>');\r\n }",
"public function renderContent() {}",
"protected abstract function renderContent();",
"public function display()\n {\n return $this->page->output();\n }",
"abstract protected function RenderContent();",
"public function render()\n\t{\n\t\techo $this->export();\n\t}",
"public static function render()\n\t{\n\t\treturn self::display();\n\t}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}"
] | [
"0.8063094",
"0.7739284",
"0.7715196",
"0.76336336",
"0.76025796",
"0.7519499",
"0.75016433",
"0.75016433",
"0.7497792",
"0.7445451",
"0.7428782",
"0.73872125",
"0.7304046",
"0.72549486",
"0.72372395",
"0.7212756",
"0.71140224",
"0.7106806",
"0.7104489",
"0.71034354",
"0.70942974",
"0.7071249",
"0.7071249",
"0.707117",
"0.7037196",
"0.7036029",
"0.70340836",
"0.70340836",
"0.70340836",
"0.70340836",
"0.70340836",
"0.70340836",
"0.70340836",
"0.70340836",
"0.70340836",
"0.70340836",
"0.70340836",
"0.70340836",
"0.70340836",
"0.70340836",
"0.70340836",
"0.70340836",
"0.70340836",
"0.70340836",
"0.7030139",
"0.70153797",
"0.70153797",
"0.69669884",
"0.69669884",
"0.69669884",
"0.69669884",
"0.69669884",
"0.69669884",
"0.6963682",
"0.69532233",
"0.69471747",
"0.69356227",
"0.6930754",
"0.69287413",
"0.6915787",
"0.6910362",
"0.6910362",
"0.6910362",
"0.6910362",
"0.6910362",
"0.6910362",
"0.6910362",
"0.6910362",
"0.6910362",
"0.6910362",
"0.6910362",
"0.6910362",
"0.6910362",
"0.6910362",
"0.6910362",
"0.6910362",
"0.6910362",
"0.6909751",
"0.6909751",
"0.6909751",
"0.6909751",
"0.6909751",
"0.6909751",
"0.6909751",
"0.6909751",
"0.6909751",
"0.6909751",
"0.6909751",
"0.6909751",
"0.6909751",
"0.6909751",
"0.6909751",
"0.6909751",
"0.6909751",
"0.6909751",
"0.6909751",
"0.6909751",
"0.6909751",
"0.6909751",
"0.6909751",
"0.6909751"
] | 0.0 | -1 |
The pages valid state based on the models contained within. Always returns true in this case as content pages are static | public function isValid()
{
return TRUE;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function isPage( )\n\t{\n\t\t/**\n\t\t * The only pages with directories are mobile pages and dynamic pages (commerce & blog)\n\t\t */\n\t\tif( isset( $this->request['directories'] ) === true\n\t\t\t&& count( $this->request['directories'] ) > 0\n\t\t\t&& $this->request['directories'] !== 'mobile' && $this->isDynamicPage( ) === false\n\t\t)\n\t\t{\n\t\t\t$this->request['isPage'] = false;\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( preg_match( '/.html\\Z/', $this->request['file'] ) > 0 || preg_match( '/.htm\\Z/', $this->request['file'] ) > 0 )\n\t\t{\n\t\t\t$this->request['isPage'] = true;\n\t\t\treturn true;\n\t\t}\n\n\t\t$this->request['isPage'] = false;\n\t\treturn false;\n\t}",
"public function hasPages();",
"public function hasPages();",
"public function canManagePages();",
"public function isValid() {\n\t\t// check if page type is valid\n\t\ttry {\n\t\t\t$this->getAttribute('uid'); // getAttribute forces the object to be read from database\n\t\t\treturn true;\n\t\t} catch (tx_newspaper_EmptyResultException $e) {\n\t\t\treturn false;\n\t\t}\n\t}",
"public function getIsValidPage(): bool\n {\n $pageCount = $this->getPageCount();\n\n if ($pageCount === 0 && $this->pageIndex === 0) {\n // If there are no results, but this is the first page,.\n return true;\n }\n\n return $this->pageIndex >= 0 && $this->pageIndex <= ($pageCount - 1);\n }",
"public function valid() { \n\t\t$page = &$this->touchPage();\n\t\treturn (key($page) !== null);\n\t}",
"public function canCreateNewPages() {}",
"public function isPage()\n {\n if(is_string($this->url)) return false;\n return $this->url->hasTarget();\n }",
"public function has_published_pages()\n {\n }",
"private function userHasAccessToPages() {\n\t\t$configurationProxy = tx_oelib_configurationProxy::getInstance('realty');\n\n\t\t$objectsPid = $configurationProxy->getAsInteger(\n\t\t\t'pidForRealtyObjectsAndImages'\n\t\t);\n\t\t$canWriteObjectsPage = $GLOBALS['BE_USER']->doesUserHaveAccess(\n\t\t\tt3lib_BEfunc::getRecord('pages', $objectsPid), 16\n\t\t);\n\n\t\t$auxiliaryPid = $configurationProxy->getAsInteger(\n\t\t\t'pidForAuxiliaryRecords'\n\t\t);\n\t\t$canWriteAuxiliaryPage = $GLOBALS['BE_USER']->doesUserHaveAccess(\n\t\t\tt3lib_BEfunc::getRecord('pages', $auxiliaryPid), 16\n\t\t);\n\n\t\tif (!$canWriteObjectsPage) {\n\t\t\t$this->storeErrorMessage('objects_pid', $objectsPid);\n\t\t}\n\t\tif (!$canWriteAuxiliaryPage) {\n\t\t\t$this->storeErrorMessage('auxiliary_pid', $auxiliaryPid);\n\t\t}\n\n\t\treturn $canWriteObjectsPage && $canWriteAuxiliaryPage;\n\t}",
"public function validPage():bool\r\n\t{\r\n\t\t$page=$this->_vars['current_page'];\r\n\t\treturn $page > 0 AND $page <= $this->_vars['total_pages'];\r\n\t}",
"public function isActive() {\n return $this->site->page()->is($this);\n }",
"protected function isSinglePage()\n {\n return ($this->request->view == 'products' && $this->request->task == 'view');\n }",
"private function isDynamicPage()\n\t{\n\t\tif ( isset( $this->request['directories'] ) === true && count( $this->request['directories'] ) > 0 )\n\t\t{\n\t\t\t/**\n\t\t\t * Check if either the base directory is a store or a call to a file in the apps folder\n\t\t\t * or if it is the base directory for a blog (meaning the base directory is also a file in published data)\n\t\t\t */\n\t\t\tif ( $this->isDynamicRoute( $this->request['directories'][0] ) ||\n\t\t\t\t( is_numeric( $this->request['directories'][0] ) === true )\n\t\t\t)\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}",
"public function isGeneratePage() {}",
"public function valid()\n {\n return $this->pager->valid();\n }",
"public function hasPages()\n {\n return $this->nextPageUrl() || $this->previousPageUrl();\n }",
"function valid()\n {\n return $this->_position == 0 || $this->_curPage->getSize() > 0;\n }",
"public function hasPages()\n {\n return $this->lastPage() > 1;\n }",
"protected function currentPageHasSubPages() {}",
"public function is_page();",
"public function has_pages() {\n global $DB;\n $pagecount = $DB->count_records('languagelesson_pages', array('lessonid'=>$this->properties->id));\n return ($pagecount>0);\n }",
"public function valid() {\r\n \tif ($this->__pageItems > 0) {\r\n \t\tif ($this->key() + 1 > $this->pageEnd()) {\r\n \t\t\treturn FALSE;\r\n \t\t} else {\r\n \t\t\treturn $this->current() !== FALSE;\r\n \t\t}\r\n \t} else {\r\n \t\treturn $this->current() !== FALSE;\r\n \t}\r\n }",
"protected function isPageActive()\n {\n if($this->url->getTarget()->id == Page::id()) return true;\n return false;\n }",
"public static function isPage();",
"public function canAccessPage(){\n\n\t\t\t$nav = $this->getNavigationArray();\n\t\t\t$page = '/' . trim(getCurrentPage(), '/') . '/';\n\n\t\t\t$page_limit = 'author';\n\n\t\t\tforeach($nav as $item){\n\t\t\t\tif(General::in_array_multi($page, $item['children'])){\n\n\t\t\t\t\tif(is_array($item['children'])){\n\t\t\t\t\t\tforeach($item['children'] as $c){\n\t\t\t\t\t\t\tif($c['type'] == 'section' && $c['visible'] == 'no' && preg_match('#^' . $c['link'] . '#', $page)) {\n\t\t\t\t\t\t\t\t$page_limit = 'developer';\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif($c['link'] == $page && isset($c['limit'])) {\n\t\t\t\t\t\t\t\t$page_limit\t= $c['limit'];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif(isset($item['limit']) && $page_limit != 'primary'){\n\t\t\t\t\t\tif($page_limit == 'author' && $item['limit'] == 'developer') $page_limit = 'developer';\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\telseif(isset($item['link']) && ($page == $item['link']) && isset($item['limit'])){\n\t\t\t\t\t$page_limit\t= $item['limit'];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif($page_limit == 'author')\n\t\t\t\treturn true;\n\n\t\t\telseif($page_limit == 'developer' && Administration::instance()->Author->isDeveloper())\n\t\t\t\treturn true;\n\n\t\t\telseif($page_limit == 'primary' && Administration::instance()->Author->isPrimaryAccount())\n\t\t\t\treturn true;\n\n\t\t\treturn false;\n\t\t}",
"protected function isPageTemplate(): bool {\n return (\n $this->layout === 'single' || \n $this->layout === 'archive'\n );\n }",
"public function shouldRender()\n {\n if ($this->totalPages > 1) {\n \n return true;\n }\n \n return false;\n }",
"function checkTemplatePage()\t{\n\t\t\n\t\t// Get the record\n\t\t$template = t3lib_BEfunc::getRecord('pages', $this->templateUid);\n\n\t\tif($template['doktype'] != '71') {\n\t\t\treturn false;\t\n\t\t}\n\t\t\n\t\treturn true;\n\t}",
"protected function isContentToBeParsed() {\n\t\t$result = FALSE;\n\t\t$currentPageUid = $GLOBALS['TSFE']->id;\n\t\t// get rootline of the current page\n\t\t$rootline = $GLOBALS['TSFE']->sys_page->getRootline($currentPageUid);\n\t\t// build an array of uids of pages the rootline\n\t\tfor ($i=count($rootline)-1; $i>=0; $i--) {\n\t\t\t$pageUidsInRootline[] = $rootline[\"$i\"]['uid'];\n\t\t}\n\t\t// check if the root page is in the rootline of the current page\n\t\tforeach (t3lib_div::trimExplode(',',$this->settings['includeRootPages'],1) as $includeRootPageUid) {\n\t\t\tif (t3lib_div::inArray((array)$pageUidsInRootline,$includeRootPageUid))\n\t\t\t\t$result = TRUE;\n\t\t}\n\t\tforeach (t3lib_div::trimExplode(',',$this->settings['excludeRootPages'],1) as $excludeRootPageUid) {\n\t\t\tif (t3lib_div::inArray((array)$pageUidsInRootline,$excludeRootPageUid))\n\t\t\t\t$result = FALSE;\n\t\t}\n\t\tif (t3lib_div::inList($this->settings['includePages'],$currentPageUid)) {\n\t\t\t$result = TRUE;\n\t\t}\n\t\tif (t3lib_div::inList($this->settings['excludePages'],$currentPageUid)) {\n\t\t\t$result = FALSE;\n\t\t}\n\t\tif ( $GLOBALS['TSFE']->page['f3_contentparser_dont_parse'] == 1) {\n\t\t\t$result = FALSE;\n\t\t}\n\t\t// if ( $this->cObj->getFieldVal('f3_contentparser_dont_parse') == 1) {\n\t\t// \t$result = FALSE;\n\t\t// }\n\n\t\treturn $result;\n\t}",
"public function isPageInitialized()\n\t{\n\t\treturn $this->pageInitialized;\n\t}",
"public function valid()\n {\n return (current($this->objects) !== false);\n }",
"function isOnPage(){\n return $this->on_page != 'f';\n\t}",
"final public function hasChildren(): bool\n {\n return $this->valid() && $this->current()->hasPages();\n }",
"public function pagesOnly() {}",
"private function checkCMSPages()\n {\n $pages = ['product_page', 'category_page', 'address_page', 'checkout_page', 'account_page'];\n $errors = [];\n foreach ($pages as $page) {\n if (GeneralSettings::get($page) === null) {\n $errors[] = '- ' . trans('offline.mall::lang.general_settings.' . $page);\n }\n }\n if (count($errors) < 1) {\n return true;\n }\n\n return \"The following pages are not linked to a CMS page. Do this via the backend settings:\\n\\n\" . implode(\"\\n\",\n $errors);\n }",
"public function valid()\n {\n\n if ($this->container['template'] === null) {\n return false;\n }\n return true;\n }",
"function condition() {\n\t\treturn ! empty( $_GET['page'] ) && $this->page_slug === $_GET['page']; // Input var okay.\n\t}",
"public function hasPages()\n {\n return ! $this->onFirstPage() || $this->hasMorePages();\n }",
"public function hasPages()\n {\n return $this->paginator->hasPages();\n }",
"public function hasPages()\n {\n return $this->paginator->hasPages();\n }",
"public function hasPages()\n {\n return $this->paginator->hasPages();\n }",
"protected function currentPageHasSubPages()\n {\n /** @var QueryBuilder $queryBuilder */\n $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('pages');\n $queryBuilder->getRestrictions()\n ->removeAll()\n ->add(GeneralUtility::makeInstance(DeletedRestriction::class))\n ->add(GeneralUtility::makeInstance(BackendWorkspaceRestriction::class));\n\n // get workspace id\n $workspaceId = (int)$this->getBackendUser()->workspace;\n $comparisonExpression = $workspaceId === 0 ? 'neq' : 'eq';\n\n $count = $queryBuilder\n ->count('uid')\n ->from('pages')\n ->where(\n $queryBuilder->expr()->eq('pid', $queryBuilder->createNamedParameter($this->id, \\PDO::PARAM_INT)),\n $queryBuilder->expr()->eq(\n 't3ver_wsid',\n $queryBuilder->createNamedParameter($workspaceId, \\PDO::PARAM_INT)\n ),\n $queryBuilder->expr()->{$comparisonExpression}(\n 'pid',\n $queryBuilder->createNamedParameter(-1, \\PDO::PARAM_INT)\n )\n )\n ->execute()\n ->fetchColumn(0);\n\n return (bool)$count;\n }",
"public static function checkAllowedPage() {\r\n $pages = \\Drupal::config('smart_ip.settings')->get('allowed_pages');\r\n if (empty($pages)) {\r\n // No pages specified then all pages are allowed\r\n return TRUE;\r\n }\r\n else {\r\n if (isset($_GET['geolocate_uri'])) {\r\n // Handle \"geolocate_uri\" from ajax request\r\n $url = $_GET['geolocate_uri'];\r\n }\r\n else {\r\n $url = \\Drupal::service('path.current')->getPath();\r\n }\r\n /** @var \\Drupal\\Core\\Path\\AliasManagerInterface $aliasManager */\r\n $aliasManager = \\Drupal::service('path.alias_manager');\r\n $pathAlias = $aliasManager->getAliasByPath($url);\r\n // Convert the Drupal path to lowercase\r\n $path = \\Drupal\\Component\\Utility\\Unicode::strtolower($pathAlias);\r\n /** @var \\Drupal\\Core\\Path\\PathMatcherInterface $pathMatcher */\r\n $pathMatcher = \\Drupal::service('path.matcher');\r\n // Compare the lowercase internal and lowercase path alias (if any).\r\n $pageMatch = $pathMatcher->matchPath($path, $pages);\r\n if ($path != $url) {\r\n $pageMatch = $pageMatch || $pathMatcher->matchPath($url, $pages);\r\n }\r\n elseif ($path == $url) {\r\n $url = $aliasManager->getPathByAlias($url);\r\n $pageMatch = $pageMatch || $pathMatcher->matchPath($url, $pages);\r\n }\r\n return $pageMatch;\r\n }\r\n }",
"public function checkAccess()\n {\n $list = $this->getPages();\n\n /**\n * Settings controller is available directly if the $page request variable is provided\n * if the $page is omitted, the controller must be the subclass of Settings main one.\n *\n * The inner $page variable must be in the getPages() array\n */\n return parent::checkAccess()\n && isset($list[$this->page])\n && (\n ($this instanceof \\XLite\\Controller\\Admin\\Settings && isset(\\XLite\\Core\\Request::getInstance()->page))\n || is_subclass_of($this, '\\XLite\\Controller\\Admin\\Settings')\n );\n }",
"function canCreatePage() {\n return ($this->isAdmin() || ($this->userType == 'author'));\n }",
"function valid_action() {\n # of pages that are about that page (i.e. not admin\n # or recent changes)\n global $ACT;\n if($ACT == 'show') { return true; }\n if($ACT == 'edit') { return true; }\n if($ACT == 'revisions') { return true; }\n return false;\n }",
"protected function isCurrentPageContentModelEditable() {\n\t\t$contentHandler = $this->getContentHandler();\n\n\t\treturn $contentHandler->supportsDirectEditing()\n\t\t\t&& $contentHandler->supportsDirectApiEditing();\n\t}",
"protected function is_view_page() {\n\t\treturn false;\n\t}",
"public function validURLSegment()\n {\n if (self::config()->get('nested_urls') && $this->ParentID) {\n // Guard against url segments for sub-pages\n $parent = $this->Parent();\n if ($controller = ModelAsController::controller_for($parent)) {\n if ($controller instanceof Controller && $controller->hasAction($this->URLSegment)) {\n return false;\n }\n }\n } elseif (in_array(strtolower($this->URLSegment ?? ''), $this->getExcludedURLSegments() ?? [])) {\n // Guard against url segments for the base page\n // Default to '-2', onBeforeWrite takes care of further possible clashes\n return false;\n }\n\n // If any of the extensions return `0` consider the segment invalid\n $extensionResponses = array_filter(\n (array)$this->extend('augmentValidURLSegment'),\n function ($response) {\n return !is_null($response);\n }\n );\n if ($extensionResponses) {\n return min($extensionResponses);\n }\n\n // Check for clashing pages by url, id, and parent\n $source = NestedObject::get()->filter([\n 'ClassName' => $this->ClassName,\n 'URLSegment' => $this->URLSegment,\n ]);\n\n if ($this->ID) {\n $source = $source->exclude('ID', $this->ID);\n }\n\n if (self::config()->get('nested_urls')) {\n $source = $source->filter('ParentID', $this->ParentID ? $this->ParentID : 0);\n }\n\n return !$source->exists();\n }",
"private static function has_pages( $form ) {\n\t\treturn GFCommon::has_pages( $form );\n\t}",
"public function valid()\n {\n if(is_null($this->paginationVar))\n return true;\n return $this->curIndex < count($this->res);\n }",
"public function valid() {\n\t\tif( ! defined( 'WPV_VERSION' ) )\n\t\t\treturn false;\n\n\t\t// opposite of parent \"Views exists\"\n\t\treturn ! parent::valid();\n\t}",
"public function shouldBeDisplayed()\n {\n return Auth::user()->can('browse', Actadmin::model('Page'));\n }",
"public function isMain() {\n\t\treturn $this->_page == null;\n\t}",
"public function getCanPostToPages()\n\t{\n\t\ttry {\n\t\t\tif (!$this->fb) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t$permissions = (new FacebookRequest(\n\t\t\t\t$this->fb, 'GET', '/me/permissions'\n\t\t\t))->execute()->getGraphObject();\n\t\t\tforeach($permissions->asArray() as $permission) {\n\t\t\t\tif (($permission->permission == 'publish_actions' || $permission->permission == 'manage_pages') && $permission->status == 'granted') {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// else\n\t\t\treturn false;\n\t\t} catch (Exception $e) {\n\t\t\t// may not be logged in\n\t\t}\n\t}",
"function is_paginated_post(): bool\n{\n\tglobal $multipage;\n\treturn $multipage !== 0;\n}",
"function condition() {\n\t\treturn ! empty( $_GET['page'] ) && $this->args['page_slug'] === $_GET['page']; // Input var okay.\n\t}",
"public function valid()\n {\n\n if ($this->container['template_type'] === null) {\n return false;\n }\n $allowedValues = $this->getTemplateTypeAllowableValues();\n if (!in_array($this->container['template_type'], $allowedValues)) {\n return false;\n }\n if ($this->container['name'] === null) {\n return false;\n }\n if ($this->container['date_added'] === null) {\n return false;\n }\n if ($this->container['from_email'] === null) {\n return false;\n }\n if ($this->container['from_name'] === null) {\n return false;\n }\n if ($this->container['body'] === null) {\n return false;\n }\n if ($this->container['original_template_name'] === null) {\n return false;\n }\n if ($this->container['template_scope'] === null) {\n return false;\n }\n $allowedValues = $this->getTemplateScopeAllowableValues();\n if (!in_array($this->container['template_scope'], $allowedValues)) {\n return false;\n }\n if ($this->container['tags'] === null) {\n return false;\n }\n return true;\n }",
"public static function isCasualPage()\n\t{\n\t\treturn (bool)(self::$viewingMode == 0);\n\t}",
"private function isDynamicStandardPage()\n\t{\n\t\tif ($this->isDynamicRoute(ltrim($this->request['path'], '/'))) {\n\t\t\t// page containing commerce element is considered dynamic page here,\n\t\t\t// so odysseus don't cache it.\n\t\t\t// so commerce data can stay up to date.\n\n\t\t\t// we add a isDynamic in request.\n\t\t\t// it will tell DeployedServiceController to return in dynamic page's format instead.\n\t\t\t$this->request['isDynamic'] = true;\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public function isActive() {\n return (($page = Mage::registry('splash_page')) !== null) && $page->getId() === $this->getId();\n }",
"public function authorize()\n {\n if ($this->user && ($this->user->hasPermission('manage_pages_contents') ) ) {\n return true;\n }\n\n return false;\n }",
"static function is_requested()\n {\n $retval = FALSE;\n if (self::is_requested_page()) {\n $retval = self::is_requested_page();\n } elseif (self::is_requested_post_type()) {\n $retval = self::is_requested_post_type();\n }\n return apply_filters('is_ngg_admin_page', $retval);\n }",
"function static_pages() {\r\n post_check();\r\n $this->form_validation->set_rules('sub_cat_id', 'Sub Category Id', 'required');\r\n $this->form_validation->run();\r\n $error = $this->form_validation->get_all_errors();\r\n if ($error) {\r\n return_data(false, array_values($error)[0], blank_json(), $error);\r\n } else {\r\n $res = $this->CategoriesModel->get_static_content($this->input->post('sub_cat_id'));\r\n $files = $this->CategoriesModel->get_sub_category_files($this->input->post('sub_cat_id'));\r\n\r\n if ($res) {\r\n $res = array(\r\n 'sub_cat_id' => $res['sub_category_id'],\r\n 'title' => $res['sub_category_name'],\r\n 'content' => $res['content'],\r\n 'created_date' => $res['created_date'],\r\n 'update_date' => $res['update_date'],\r\n 'files' => $files\r\n );\r\n return_data(true, 'Static Page available!', $res);\r\n } else {\r\n return_data(false, 'Static Page not found!', blank_json());\r\n }\r\n }\r\n }",
"public static function data_is_set() {\r\n\t\treturn self::$page_data instanceof PageData;\r\n\t}",
"public function getIsHomePage()\n {\n return $this->getUrl('') == $this->getUrl('*/*/*', array('_current'=>true, '_use_rewrite'=>true));\n }",
"public function getIsHomePage()\n {\n return $this->getUrl('') == $this->getUrl('*/*/*', array('_current'=>true, '_use_rewrite'=>true));\n }",
"public function should_render() {\n\t\t\t\treturn is_singular();\n\t\t\t}",
"public function validateCmsHierarchyAction()\n {\n $websiteId = null;\n $storeId = null;\n if ($this->_request->getPost('website')) {\n if ($website = $this->_storeManager->getWebsite($this->_request->getPost('website'))) {\n $websiteId = $website->getId();\n }\n }\n if ($this->_request->getPost('store')) {\n if ($store = $this->_storeManager->getStore($this->_request->getPost('store'))) {\n $storeId = $store->getId();\n $websiteId = $store->getWebsite()->getWebsiteId();\n }\n }\n if (!$this->_role->getIsAll()) {\n if (!$this->_role->hasExclusiveAccess([$websiteId]) || null === $websiteId) {\n if (!$this->_role->hasExclusiveStoreAccess([$storeId]) || null === $storeId) {\n $this->_forward();\n return false;\n }\n }\n }\n return true;\n }",
"function hasPages() {\n\t\treturn $this->rows > $this->rpp;\n\t}",
"private function is_url_and_page_type() {\n\t\t$page_types = array_values( array_filter( $this->redirects, function( Red_Item $redirect ) {\n\t\t\treturn $redirect->match && $redirect->match->get_type() === 'page';\n\t\t} ) );\n\n\t\tif ( count( $page_types ) > 0 ) {\n\t\t\t$request = new Red_Url_Request( Redirection_Request::get_request_url() );\n\t\t\t$action = $page_types[0]->get_match( $request->get_decoded_url(), $request->get_original_url() );\n\t\t\tif ( $action ) {\n\t\t\t\t$action->run();\n\t\t\t}\n\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}",
"protected function isPageEditable()\n {\n if ($this->getBackendUser()->isAdmin()) {\n return true;\n }\n return !$this->pageinfo['editlock'] && $this->getBackendUser()->doesUserHaveAccess($this->pageinfo, Permission::PAGE_EDIT);\n }",
"public function canPaginate(): bool;",
"protected function is_list_page() {\n\t\treturn false;\n\t}",
"private function requested_post_is_valid(){\n return (get_post_type((int) $_GET['post_id']) === $this->post_type && get_post_status((int) $_GET['post_id']) === 'publish');\n }",
"private static function _is_loadable()\n\t{\n\t\t$allowed_in_admin = apply_filters('bwp_minify_allowed_in_admin', false);\n\n\t\tif (is_admin() && !$allowed_in_admin)\n\t\t\treturn false;\n\n\t\tif (!did_action('template_redirect'))\n\t\t\treturn true;\n\n\t\t// ignore Geomashup\n\t\tif (!empty($_GET['geo_mashup_content'])\n\t\t\t&& 'render-map' == $_GET['geo_mashup_content'])\n\t\t\treturn false;\n\n\t\t// ignore AEC (Ajax Edit Comment)\n\t\tif (!empty($_GET['aec_page']))\n\t\t\treturn false;\n\n\t\t// ignore Simple:Press forum plugin\n\t\tif (defined('SPVERSION') && function_exists('sp_get_option'))\n\t\t{\n\t\t\t$sp_page = sp_get_option('sfpage');\n\t\t\tif (is_page($sp_page))\n\t\t\t\treturn false;\n\t\t}\n\n\t\t// @since 1.3.1 ignore Maintenance plugin\n\t\tif (bwp_is_maintenance_on())\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}",
"public function valid()\r\n {\r\n return (current($this->children) !== FALSE);\r\n }",
"public function is_edit_page() {\n\t\t\tglobal $current_screen;\n\n\t\t\treturn in_array( $current_screen->id, (array) $this->_meta_box['pages'] );\n\t\t}",
"function isContentToSkip() {\n\t\t$result = true; // true, if the page should be skipped\n\t\t$currentPageUid = $GLOBALS['TSFE']->id;\n\n\t\t// get rootline of the current page\n\t\t$rootline = $GLOBALS['TSFE']->sys_page->getRootline($currentPageUid);\n\t\t// build an array of uids of pages the rootline\n\t\tfor ($i = count($rootline) - 1; $i >= 0; $i--) {\n\t\t\t$pageUidsInRootline[] = $rootline[\"$i\"]['uid'];\n\t\t}\n\t\t// check if the root page is in the rootline of the current page\n\t\t$includeRootPagesUids = GeneralUtility::trimExplode(',', $this->conf['includeRootPages'], 1);\n\t\tforeach ($includeRootPagesUids as $includeRootPageUid) {\n\t\t\tif (GeneralUtility::inArray((array)$pageUidsInRootline, $includeRootPageUid)) {\n\t\t\t\t$result = false;\n\t\t\t}\n\t\t}\n\t\t$excludeRootPagesUids = GeneralUtility::trimExplode(',', $this->conf['excludeRootPages'], 1);\n\t\tforeach ($excludeRootPagesUids as $excludeRootPageUid) {\n\t\t\tif (GeneralUtility::inArray((array)$pageUidsInRootline, $excludeRootPageUid)) {\n\t\t\t\t$result = true;\n\t\t\t}\n\t\t}\n\t\tif (GeneralUtility::inList($this->conf['includePages'], $currentPageUid)) {\n\t\t\t$result = false;\n\t\t}\n\t\tif (GeneralUtility::inList($this->conf['excludePages'], $currentPageUid)) {\n\t\t\t$result = true;\n\t\t}\n\t\tif ($GLOBALS['TSFE']->page['tx_contagged_dont_parse'] == 1) {\n\t\t\t$result = true;\n\t\t}\n\t\tif (!empty($this->cObj)) {\n\t\t\tif ($this->cObj->getFieldVal('tx_contagged_dont_parse') == 1) {\n\t\t\t\t$result = true;\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\t}",
"public function premierePageEstActif(){\n\t\t//echo \"premierePageEstActif : \";\n\t\tif(!isset($this->dataInfos['XMLPM']['PAGES']['PREMIERE'])) return false;\n\t\t//echo \"OK \";\n\t\tif(!isset($this->dataInfos['XMLPM']['PAGES']['PREMIERE']['ACTIVE'])) return false;\n\t\t//echo \"OK \";\n\t\treturn $this->dataInfos['XMLPM']['PAGES']['PREMIERE']['ACTIVE']==\"1\";\n\t}",
"public function isCategoryPage();",
"private function check_sanity()\n {\n if (!is_object($this->qb))\n {\n return false;\n }\n \n if (empty($this->pager_id))\n {\n\n return false;\n }\n return true;\n }",
"public function valid()\n {\n\n if ($this->container['name'] === null) {\n return false;\n }\n if ($this->container['has_thumbnail'] === null) {\n return false;\n }\n $allowed_values = [\"stl\", \"step\", \"iges\", \"obj\", \"svf2\",\"svf\", \"thumbnail\", \"ifc\"];\n if (!in_array($this->container['output_type'], $allowed_values)) {\n return false;\n }\n if ($this->container['progress'] === null) {\n return false;\n }\n if ($this->container['status'] === null) {\n return false;\n }\n $allowed_values = [\"pending\", \"inprogress\", \"success\", \"failed\", \"timeout\", \"partialsuccess\"];\n if (!in_array($this->container['status'], $allowed_values)) {\n return false;\n }\n if ($this->container['children'] === null) {\n return false;\n }\n return true;\n }",
"public static function isValid(){\n\n\t\t$valid=false;\n\t\tif(isset($_GET[\"view\"])){\n\t\t\t$url =\"\";\n\t\t\tif(Core::$root==\"\"){\n\n\n\t\t\t\t$url = \"core/app/view/\".$_GET['view'].\"-view.php\";\n\n\t\t\t}\n\n\t\t\tif(file_exists($file = $url)){\n\t\t\t\t$valid = true;\n\t\t\t}\n\t\t}\n\t\treturn $valid;\n\t}",
"static function is_requested_page()\n {\n $retval = FALSE;\n // First, check the screen for the \"ngg\" property. This is how ngglegacy pages register themselves\n $screen = get_current_screen();\n if (property_exists($screen, 'ngg') && $screen->ngg) {\n $retval = $screen->id;\n } else {\n foreach (self::get_instance()->get_all() as $slug => $properties) {\n // Are we rendering a NGG added page?\n if (isset($properties['hook_suffix'])) {\n $hook_suffix = $properties['hook_suffix'];\n if (did_action(\"load-{$hook_suffix}\")) {\n $retval = $slug;\n break;\n }\n }\n }\n }\n return $retval;\n }",
"public function is_posts_page() {\n return ( is_home() && 'page' == get_option( 'show_on_front' ) );\n }",
"public function isValid()\n\t{\n\t\treturn !empty($this->indexSettings);\n\t}",
"protected function is_edit_page() {\n\t\treturn false;\n\t}",
"public static function is_builder_page() {\n\t\treturn (bool) get_post_meta(get_the_ID(), '_mkb_enable_home_page', true);\n\t}",
"public function valid()\n {\n return isset($this->collection->getItems()[$this->position]);\n }",
"public function valid()\n {\n\n if ($this->container['name'] === null) {\n return false;\n }\n if ($this->container['status'] === null) {\n return false;\n }\n $allowedValues = $this->getStatusAllowableValues();\n if (!in_array($this->container['status'], $allowedValues)) {\n return false;\n }\n if ($this->container['poolname'] === null) {\n return false;\n }\n if ($this->container['template_name'] === null) {\n return false;\n }\n if ($this->container['utm'] === null) {\n return false;\n }\n if ($this->container['body'] === null) {\n return false;\n }\n if ($this->container['sender'] === null) {\n return false;\n }\n if ($this->container['attachments'] === null) {\n return false;\n }\n return true;\n }",
"static function cws_has_children() {\n\t\tglobal $post;\n\n\t\t$children = get_pages( array( 'child_of' => $post->ID ) );\n\n\t\tif ( count( $children ) == 0 ) {\n\n\t\t\treturn false;\n\n\t\t} else {\n\n\t\t\treturn true;\n\n\t\t}\n\n\t}",
"protected function isValid()\n {\n return !app('request') instanceof Request;\n }",
"public function isOnepage()\r\n {\r\n if($this->_params['layout'] != 'onepage'){\r\n return false;\r\n }\r\n return true;\r\n }",
"function isDataValid() \r\n { \r\n $isValid = parent::isDataValid();\r\n \r\n// $isValid = $this->active_subPage->isDataValid(); \r\n \r\n // now return result\r\n return $isValid; \r\n }",
"public function hasPageNumber(){\n return $this->_has(2);\n }",
"public function isPublished()\n {\n if (\n $this->getStatus() === PageStatus::PUBLISHED ||\n ($this->getStatus() === PageStatus::SCHEDULED &&\n $this->getPublishedAt() < new \\DateTime())\n ) {\n return true;\n } else {\n return false;\n }\n }",
"function lalita_is_posts_page() {\n\t\treturn ( is_home() || is_archive() || is_tax() ) ? true : false;\n\t}",
"public function valid()\n {\n\n if ($this->container['code'] === null) {\n return false;\n }\n if ($this->container['settings'] === null) {\n return false;\n }\n if ($this->container['deeplink'] === null) {\n return false;\n }\n if ($this->container['enrollment'] === null) {\n return false;\n }\n if ($this->container['courses'] === null) {\n return false;\n }\n if ($this->container['id'] === null) {\n return false;\n }\n if ($this->container['create_date'] === null) {\n return false;\n }\n if ($this->container['subscription'] === null) {\n return false;\n }\n if ($this->container['ecommerce'] === null) {\n return false;\n }\n if ($this->container['status'] === null) {\n return false;\n }\n $allowed_values = [\"not_subscribed\", \"subscribed\", \"in_progress\", \"completed\"];\n if (!in_array($this->container['status'], $allowed_values)) {\n return false;\n }\n if ($this->container['name'] === null) {\n return false;\n }\n if ($this->container['complete_percent'] === null) {\n return false;\n }\n return true;\n }"
] | [
"0.65824765",
"0.6548402",
"0.6548402",
"0.6518476",
"0.6465392",
"0.6456327",
"0.6407298",
"0.6320219",
"0.63201",
"0.6313125",
"0.63009804",
"0.62927365",
"0.6277907",
"0.62608427",
"0.62452894",
"0.62168944",
"0.6193905",
"0.6182601",
"0.61791384",
"0.6134977",
"0.61348855",
"0.6132636",
"0.61241025",
"0.6114072",
"0.6103502",
"0.6094901",
"0.6091071",
"0.60756624",
"0.60425895",
"0.60300195",
"0.60209996",
"0.59986174",
"0.5995944",
"0.5944005",
"0.59427166",
"0.59305483",
"0.592779",
"0.5925334",
"0.590482",
"0.5893833",
"0.5889624",
"0.5889624",
"0.5889624",
"0.5880613",
"0.58548015",
"0.58477944",
"0.5833333",
"0.58316565",
"0.58250993",
"0.5824689",
"0.58120936",
"0.5803082",
"0.5788337",
"0.5783059",
"0.57660633",
"0.5761295",
"0.57512015",
"0.5740137",
"0.57345825",
"0.57049143",
"0.5701672",
"0.5692747",
"0.5691481",
"0.5682255",
"0.56820834",
"0.5681878",
"0.5668692",
"0.56625444",
"0.56625444",
"0.5659891",
"0.56520385",
"0.56473255",
"0.5643873",
"0.5635046",
"0.56297725",
"0.5629437",
"0.5626985",
"0.561872",
"0.560805",
"0.5607385",
"0.5603231",
"0.5602387",
"0.55921793",
"0.5590036",
"0.55810803",
"0.55809593",
"0.5569882",
"0.5549184",
"0.55433005",
"0.5542931",
"0.5528128",
"0.55274934",
"0.55260724",
"0.5519526",
"0.5519501",
"0.5515587",
"0.55147725",
"0.55076617",
"0.54997694",
"0.54951876",
"0.5493957"
] | 0.0 | -1 |
Serialises the model for persistent storage or transmission [SPL] Serializable | public function serialize(array $toSerialize = array())
{
$toSerialize += array(
'_content' => $this->_content,
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract public function serialize();",
"abstract public function serialize();",
"public abstract function serialize();",
"public function serialize() {}",
"public function serialize() {}",
"public function serialize() {}",
"public function serialize() {}",
"public function serialize() {}",
"public function serialize() {}",
"public function serialize() {}",
"public function serialize() {}",
"public function serialize();",
"public function serialize();",
"public function serialize();",
"public function serialize()\n {\n // TODO: Implement serialize() method.\n }",
"public function serialize()\n {\n }",
"public function serialize()\n {\n }",
"public function serialize(){ }",
"public function binarySerialize();",
"abstract protected function serializeData();",
"function serialize()\r\n {\r\n $owner=$this->readOwner();\r\n\r\n if ($owner!=null)\r\n {\r\n\r\n $_SESSION['insession.'.$this->readNamePath()]=1;\r\n\r\n //$this->newserialize();\r\n\r\n $refclass=new ReflectionClass($this->ClassName());\r\n $methods=$refclass->getMethods();\r\n\r\n reset($methods);\r\n\r\n while (list($k,$method)=each($methods))\r\n {\r\n $methodname=$method->name;\r\n if ($methodname[0] == 's' && $methodname[1] == 'e' && $methodname[2] == 't') // fast check of: substr($methodname,0,3)=='set'\r\n {\r\n $propname=substr($methodname, 3);\r\n\r\n if($propname=='Name')\r\n $propvalue = $this->_name;\r\n else\r\n $propvalue=$this->$propname;\r\n\r\n if (is_object($propvalue))\r\n {\r\n if ($propvalue->inheritsFrom('Component'))\r\n {\r\n $apropvalue='';\r\n $aowner=$propvalue->readOwner();\r\n if ($aowner!=null) $apropvalue=$aowner->getName().'.';\r\n $apropvalue.=$propvalue->getName();\r\n $propvalue=$apropvalue;\r\n }\r\n else if ($propvalue->inheritsFrom('Persistent'))\r\n {\r\n $propvalue->serialize();\r\n }\r\n }\r\n\r\n if ((!is_object($propvalue)) && ($this->allowserialize($propname)))\r\n {\r\n $defmethod='default'.$propname;\r\n\r\n if (method_exists($this,$defmethod))\r\n {\r\n $defvalue=$this->$defmethod();\r\n\r\n if (typesafeequal($defvalue,$propvalue))\r\n {\r\n unset($_SESSION[$this->readNamePath().\".\".$propname]);\r\n continue;\r\n }\r\n }\r\n\r\n //TODO: Optimize this\r\n $_SESSION[$this->readNamePath().\".\".$propname]=$propvalue;\r\n }\r\n }\r\n }\r\n\r\n\r\n if ($this->inheritsFrom('Component')) $this->serializeChildren();\r\n }\r\n else\r\n {\r\n global $exceptions_enabled;\r\n\r\n if ($exceptions_enabled)\r\n {\r\n throw new Exception('Cannot serialize a component without an owner');\r\n }\r\n }\r\n }",
"public function serializer() {\n }",
"public function toSerial() {\n\t\treturn serialize($this->toArray());\n\t}",
"public function dumpModel(){\n\t\t$this->_connect();\n\t}",
"private function _saveZoetropeModelToFile()\n {\n file_put_contents(\n $this->fileDir . $this->jsonFile,\n json_encode($this->zModel)\n );\n }",
"public function __serialize() { \n $serialized = [\n 'instance_name' => $this->instance_name,\n 'local_columns' => array_map(fn($column) => $this->serializeColumn($column), $this->getLocalColumns()),\n 'referenced_columns' => array_map(fn($column) => $this->serializeColumn($column), $this->getReferencedColumns()),\n 'is_reversed_relation' => $this->is_reverse_relation,\n 'target_relation' => $this->getTargetRelation(),\n 'type' => $this->type,\n ];\n\n return $serialized;\n\n }",
"public function SerializeObject () {\n return serialize ($this);\n }",
"public function serialize()\n {\n $models = [];\n foreach ($this->all() as $id => $model) {\n $models[$id] = $model->serialize();\n }\n return $models;\n }",
"protected function saving() {\n // This will get reimplemented by children when necessary\n }",
"private function serializeModel(Model $model)\n {\n $metadata = $model->getMetadata();\n $serialized = [\n '_id' => $model->getState()->is('new') ? null : $model->getId(),\n '_type' => $model->getType(),\n ];\n if ($this->depth > $this->maxDepth) {\n return $serialized;\n }\n\n // Attributes.\n foreach ($metadata->getAttributes() as $key => $attrMeta) {\n if (false === $this->shouldSerialize($model, $attrMeta)) {\n continue;\n }\n $serializer = $this->getCustomSerializer($model, $attrMeta);\n $value = $model->get($key);\n $serialized[$key] = $serializer ? $serializer($model, $value) : $this->serializeAttribute($value, $attrMeta);\n }\n\n // Embeds.\n foreach ($metadata->getEmbeds() as $key => $embeddedPropMeta) {\n if (false === $this->shouldSerialize($model, $embeddedPropMeta)) {\n continue;\n }\n $serializer = $this->getCustomSerializer($model, $embeddedPropMeta);\n $value = $model->get($key);\n $serialized[$key] = $serializer ? $serializer($model, $value) : $this->serializeEmbed($value, $embeddedPropMeta);\n }\n\n // Relationships.\n $model->enableCollectionAutoInit(false);\n $this->increaseDepth();\n foreach ($metadata->getRelationships() as $key => $relMeta) {\n if (false === $this->shouldSerialize($model, $relMeta)) {\n continue;\n }\n $serializer = $this->getCustomSerializer($model, $relMeta);\n $relationship = $model->get($key);\n $serialized[$key] = $serializer ? $serializer($model, $relationship) : $this->serializeRelationship($model, $relationship, $relMeta);\n }\n $this->decreaseDepth();\n $model->enableCollectionAutoInit(true);\n\n return $serialized;\n }",
"abstract public function save();",
"abstract public function save();",
"abstract public function save();",
"abstract public function save();",
"abstract public function save();",
"public abstract function save();",
"abstract public function serialize($data);",
"public function serialize(){\n\t\tthrow new Exception(\"Method \".__CLASS__.\"::\".__METHOD__.\" not implemented yet!\");\n\t}",
"public function serialize($entity)\n {\n }",
"public function testSerializeEntity(): void\n {\n $entity = new Entity();\n $entity->value = 'something';\n $this->storage->write('key', serialize($entity));\n $data = $this->getTableLocator()->get('Sessions')->get('key')->data;\n $this->assertSame(serialize($entity), stream_get_contents($data));\n }",
"private function saveModel() {\n $this->model->name = $this->request->name;\n $this->model->layout_header_in_first_column = $this->request->layout_header_in_first_column;\n $this->model->save();\n\n $toSync = [];\n foreach ($this->request->labels as $sequence => $label) {\n $toSync[$label['parameterId']] = ['label' => $label['label'], 'sequence' => $sequence];\n }\n\n $this->model->parameters()->sync($toSync);\n\n return response(['message' => trans('strings.modelExportSuccess'), 'synced' => $toSync]);\n }",
"public function serialize()\n {\n return serialize(array(\n \"id\"=>$this->getId()\n ));\n }",
"function serialise(): string;",
"public function dbSerialize(): string;",
"#[ReturnTypeWillChange]\n public function __serialize()\n {\n return $this->toArray();\n }",
"public function serialize(): array;",
"public function serialize(){\n return serialize([\n 'data' => $this->data,\n 'table' => $this->table,\n 'key' => $this->key,\n ]);\n }",
"public function serialize(stubObject $entity);",
"public function serialize () {\n return (object) array(\n 'id' => $this->getId(),\n 'data' => (object) $this->getData(),\n 'definitionId' => $this->getDefinitionId(),\n 'createdAt' => $this->getCreatedAt()\n );\n }",
"public function getSerializedWorkflow()\n {\n }",
"public function getSerializer();",
"public function saveObjectState() {\n $this->objectState = base64_encode(serialize($this));\n $this->isNewRecord = false;\n $this->update();\n $this->reconstructCombatants();\n }",
"public function serialize(EmberModelInterface $model) {\n\t\t$serializedModel = array();\n\n\t\t$serializedModel['id'] = $model->getId();\n\t\tforeach ($model->getAttributes() as $attribute) {\n\t\t\t/** @var AbstractAttribute $attribute */\n\t\t\t$serializedModel[$attribute->getName()] = $this->serializeAttribute($attribute);\n\t\t}\n\n\t\tforeach ($model->getRelations() as $relation) {\n\t\t\t/** @var AbstractRelation $relation */\n\t\t\t$serializedModel[$relation->getName()] = $this->serializeRelation($relation);\n\t\t}\n\n\t\treturn $serializedModel;\n\t}",
"public function getModel()\n {\n $model = new $this->versionable_type();\n $model->unguard();\n $model->fill(unserialize($this->model_data));\n $model->exists = true;\n $model->reguard();\n return $model;\n }",
"public function serialize($data)\n {\n }",
"public function serialize()\r\n {\r\n $data = $this->toArray();\r\n\r\n return serialize($data);\r\n }",
"public function serialize()\n {\n return serialize([\n $this->execute,\n $this->update\n ]);\n }",
"public function serialize()\n {\n return serialize([\n $this->id,\n $this->firstName,\n $this->cin,\n $this->email,\n $this->password\n ]);\n }",
"public function serialize()\n {\n $data = array();\n foreach( $this->toSerialize as $var ) { $data[ $var ] = $this->$var; }\n return serialize( $data );\n }",
"public function serialize()\n {\n return serialize(get_object_vars($this));\n }",
"public function serialize()\n {\n return serialize(get_object_vars($this));\n }",
"public function serialize()\n {\n return serialize(get_object_vars($this));\n }",
"public function serialize()\n {\n return serialize($this->toArray());\n }",
"public function afterSave()\r\n\t{\r\n\t\tif(count($this->serialAttributes)) {\r\n\t\t\tforeach($this->serialAttributes as $attribute) {\r\n\t\t\t\t$_att = $this->owner->$attribute;\r\n\t\t\t\tif(!empty($_att)\r\n\t\t\t\t && is_scalar($_att)) {\r\n\t\t\t\t\t$a = @unserialize($_att);\r\n\t\t\t\t\tif($a !== false) {\r\n\t\t\t\t\t\t$this->owner->$attribute = $a;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$this->owner->$attribute = null;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\t\t\t\r\n\t\t}\r\n\t}",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function save();",
"public function serialize(){\n return serialize($this->id);\n }",
"public function serialize($data);",
"public function serialize()\n {\n return serialize($this->data);\n }",
"public function serialize()\n {\n return serialize($this->data);\n }",
"public function serialize() \n {\n return serialize([\n 'boardingCardNumber'=>$this->boardingCardId,\n 'arrival'=>$this->arrival, \n 'departure'=>$this->departure, \n 'passenger'=>$this->passenger,\n 'reference'=>$this->reference,\n 'busNo'=>$this->busNo,\n 'platformNo'=>$this->platformNo\n ]);\n }",
"public function serialize()\n {\n return serialize([\n 'net_id' => $this->net_id,\n 'permissions' => $this->permissions,\n 'name' => $this->name,\n ]);\n }",
"public function serialize(){\n return serialize($this->id);\n }",
"public function save()\n {\n $newPackage = [];\n foreach ($this->data as $key => $value){\n if(!isset($this->map[$key]))\n continue;\n $keyMapper = $this->map[$key];\n if(is_subclass_of($value, self::class)){\n $value->save();\n continue;\n }elseif (is_array($value)){\n foreach ($this->data as $model){\n if(is_subclass_of($value, self::class)){\n $model->save();\n }\n }\n }\n $newPackage[$keyMapper] = $value;\n }\n if(isset($this->data['id']) && $this->data['id'])\n $this->db->update($this->table, $newPackage, $this->data['id'], $this->key );\n else\n $this->db->insert($this->table, $newPackage);\n }",
"public function save() {}",
"public function save() {}",
"public final function save()\n {\n }",
"public function save() {}",
"public final function save() {\n }",
"public function serialize()\n {\n return serialize([\n 'identity' => $this->identity,\n 'name' => $this->name,\n 'emailAddress' => $this->emailAddress\n ]);\n }",
"public function serialize()\n {\n return serialize(array(\n $this->id,\n $this->nombre,\n $this->password,\n ));\n }",
"public function serializar() {\n\t return json_encode(get_object_vars($this), JSON_FORCE_OBJECT);\n\t\t}",
"public function serializar() {\n\t return json_encode(get_object_vars($this), JSON_FORCE_OBJECT);\n\t\t}",
"private function convertSerializedData()\n {\n $layoutUpdateQueryModifier = $this->queryModifierFactory->create(\n 'like',\n [\n 'values' => [\n 'xml' => '%conditions_encoded%'\n ]\n ]\n );\n $this->aggregatedFieldDataConverter->convert(\n [\n new FieldToConvert(\n SerializedToJson::class,\n $this->moduleDataSetup->getTable('widget_instance'),\n 'instance_id',\n 'widget_parameters'\n ),\n new FieldToConvert(\n LayoutUpdateConverter::class,\n $this->moduleDataSetup->getTable('layout_update'),\n 'layout_update_id',\n 'xml',\n $layoutUpdateQueryModifier\n ),\n ],\n $this->moduleDataSetup->getConnection()\n );\n }",
"public function serialize()\n {\n // Interface for convenience.\n return serialize($this->__serialize());\n }"
] | [
"0.71245605",
"0.71245605",
"0.7104734",
"0.70749474",
"0.70749474",
"0.7074613",
"0.7074613",
"0.7074613",
"0.7074613",
"0.7074613",
"0.7074613",
"0.6881866",
"0.6881866",
"0.6881866",
"0.67735595",
"0.6748177",
"0.6748177",
"0.6696263",
"0.6569031",
"0.6396257",
"0.6301981",
"0.6169108",
"0.6130722",
"0.6010348",
"0.5978118",
"0.5930687",
"0.59005195",
"0.5874691",
"0.58590853",
"0.5843503",
"0.58376235",
"0.58376235",
"0.58376235",
"0.58376235",
"0.58376235",
"0.57835287",
"0.5774282",
"0.5745491",
"0.5710452",
"0.57019156",
"0.56883115",
"0.5639672",
"0.5592667",
"0.5588645",
"0.5586738",
"0.5568333",
"0.55644417",
"0.5544436",
"0.5542684",
"0.5521265",
"0.550457",
"0.5502046",
"0.55006915",
"0.54909754",
"0.548945",
"0.5476814",
"0.5467577",
"0.5466554",
"0.5459786",
"0.5456493",
"0.5456493",
"0.5456493",
"0.5455432",
"0.5452582",
"0.5445088",
"0.5445088",
"0.5445088",
"0.5445088",
"0.5445088",
"0.5445088",
"0.5445088",
"0.5445088",
"0.5445088",
"0.5445088",
"0.5445088",
"0.5445088",
"0.5445088",
"0.5445088",
"0.5445088",
"0.5445088",
"0.5445088",
"0.5445088",
"0.54236364",
"0.54228896",
"0.5409606",
"0.5409606",
"0.5403673",
"0.5395242",
"0.5387795",
"0.5387404",
"0.5370791",
"0.5370791",
"0.53688425",
"0.53674805",
"0.5363497",
"0.5355928",
"0.534825",
"0.5346431",
"0.5346431",
"0.53399074",
"0.533716"
] | 0.0 | -1 |
upon construction, map the values from the $sysmodules_row if available | public function __construct($applicantsfamilydatasiblings_row = null)
{
if( !is_null($applicantsfamilydatasiblings_row) && $applicantsfamilydatasiblings_row instanceof Zend_Db_Table_Row ) {
$this->APPLICANTS_FAMILY_DATA_SIBLINGS_ID = $applicantsfamilydatasiblings_row->APPLICANTS_FAMILY_DATA_SIBLINGS_ID;
$this->APPLICANTS_PERSONAL_DATA_ID = $applicantsfamilydatasiblings_row->APPLICANTS_PERSONAL_DATA_ID;
$this->APPLICANTS_FAMILY_DATA_SIBLINGS_FULLNAME = $applicantsfamilydatasiblings_row->APPLICANTS_FAMILY_DATA_SIBLINGS_FULLNAME;
$this->APPLICANTS_FAMILY_DATA_SIBLINGS_TELNO = $applicantsfamilydatasiblings_row->APPLICANTS_FAMILY_DATA_SIBLINGS_TELNO;
$this->APPLICANTS_FAMILY_DATA_SIBLINGS_OCCUPATION = $applicantsfamilydatasiblings_row->APPLICANTS_FAMILY_DATA_SIBLINGS_OCCUPATION;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function _customFieldsMapping($rowData)\n {\n foreach ($this->_fieldsMap as $systemFieldName => $fileFieldName) {\n if (array_key_exists($fileFieldName, $rowData)) {\n $rowData[$systemFieldName] = $rowData[$fileFieldName];\n }\n }\n\n $rowData = $this->_parseAdditionalAttributes($rowData);\n\n $rowData = $this->_setStockUseConfigFieldsValues($rowData);\n if (array_key_exists('status', $rowData)\n && $rowData['status'] != \\Magento\\Catalog\\Model\\Product\\Attribute\\Source\\Status::STATUS_ENABLED\n ) {\n if ($rowData['status'] == 'yes') {\n $rowData['status'] = \\Magento\\Catalog\\Model\\Product\\Attribute\\Source\\Status::STATUS_ENABLED;\n } elseif (!empty($rowData['status']) || $this->getRowScope($rowData) == self::SCOPE_DEFAULT) {\n $rowData['status'] = \\Magento\\Catalog\\Model\\Product\\Attribute\\Source\\Status::STATUS_DISABLED;\n }\n }\n return $rowData;\n }",
"function get_modules_extra(){\r\n\t\tforeach($this->locations as $location){\r\n\t\t\t$modules_extra[$location['location']] = array();\r\n\t\t}\r\n\t\tif($this->tpl_columns == 1.2 || $this->tpl_columns == 3){\r\n\t\t\t$modules_extra['column'] = array('manufacturer', 'popular');\r\n\t\t\t$modules_extra['columnright'] = array('specials');\r\n\t\t} elseif ($this->tpl_columns == 2.1) {\r\n\t\t\t$modules_extra['columnright'] = array('manufacturer', 'popular');\r\n\t\t}\r\n\t\treturn $modules_extra;\r\n\t}",
"function get_modules_extra(){\r\n\t\tforeach($this->locations as $location){\r\n\t\t\t$modules_extra[$location['location']] = array();\r\n\t\t}\r\n\t\tif($this->tpl_columns == 1.2 || $this->tpl_columns == 3){\r\n\t\t\t$modules_extra['column'] = array('manufacturer', 'popular');\r\n\t\t\t$modules_extra['columnright'] = array('specials');\r\n\t\t} elseif ($this->tpl_columns == 2.1) {\r\n\t\t\t$modules_extra['columnright'] = array('manufacturer', 'popular');\r\n\t\t}\r\n\t\treturn $modules_extra;\r\n\t}",
"function get_modules_extra(){\r\n\t\tforeach($this->locations as $location){\r\n\t\t\t$modules_extra[$location['location']] = array();\r\n\t\t}\r\n\t\tif($this->tpl_columns == 1.2 || $this->tpl_columns == 3){\r\n\t\t\t$modules_extra['column'] = array('manufacturer', 'popular');\r\n\t\t\t$modules_extra['columnright'] = array('specials');\r\n\t\t} elseif ($this->tpl_columns == 2.1) {\r\n\t\t\t$modules_extra['columnright'] = array('manufacturer', 'popular');\r\n\t\t}\r\n\t\treturn $modules_extra;\r\n\t}",
"function get_modules_extra(){\r\n\t\tforeach($this->locations as $location){\r\n\t\t\t$modules_extra[$location['location']] = array();\r\n\t\t}\r\n\t\tif($this->tpl_columns == 1.2 || $this->tpl_columns == 3){\r\n\t\t\t$modules_extra['column'] = array('manufacturer', 'popular', 'review');\r\n\t\t\t$modules_extra['columnright'] = array('specials');\r\n\t\t} elseif ($this->tpl_columns == 2.1) {\r\n\t\t\t$modules_extra['columnright'] = array('manufacturer', 'popular', 'review');\r\n\t\t}\r\n\t\treturn $modules_extra;\r\n\t}",
"private function registerSystemFunction() : void\n\t{\n\t\tforeach($this -> modulesList as $module)\n\t\t{\n\t\t\tif(!$module -> is_systemFunction)\n\t\t\t\tcontinue;\n\n\t\t\tswitch($module -> module_type) \n\t\t\t{\n\t\t\t\tcase 'core' :\tinclude_once CMS_SERVER_ROOT.DIR_CORE.DIR_MODULES. $module -> module_location .'/'. $module -> module_controller .'.php';\n\n\t\t\t\t\t\t\t\t$moduleConfig \t= file_get_contents( CMS_SERVER_ROOT.DIR_CORE.DIR_MODULES. $module -> module_location .'/module.json');\n\t\t\t\t\t\t\t\t$moduleConfig \t= ($moduleConfig !== false ? json_decode($moduleConfig) : [] );\t\n\n\t\t\t\t\t\t\t\t$pModulesInstall = new CModulesInstall;\n\t\t\t\t\t\t\t\t$moduleData = $pModulesInstall -> getModuleData($moduleConfig, $module -> module_location, $module -> module_type);\n\n\t\t\t\t\t\t\t\tif($moduleData === false)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tcmsLog::add('CModules::registerSystemFunction -- Unable to retrieve modul info for module-ID '. $module -> module_id, true);\n\t\t\t\t\t\t\t\t\tcontinue 2;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t$moduleData = json_decode(json_encode($moduleData));\n\n\t\t\t\t\t\t\t\t$moduleInfo = (object)$moduleData;\n\t\t\t\t\t\t\t\t$moduleInfo -> user_rights = $this -> m_pUserRights -> getModuleRights($module -> module_id);\n\t\t\t\t\t\t\t\t\n\t\t\t\tcase 'mantle' : include_once CMS_SERVER_ROOT.DIR_MANTLE.DIR_MODULES. $module -> module_location .'/'. $module -> module_controller .'.php';\n\n\t\t\t\t\t\t\t\t$moduleConfig \t= file_get_contents( CMS_SERVER_ROOT.DIR_MANTLE.DIR_MODULES. $module -> module_location .'/module.json');\n\t\t\t\t\t\t\t\t$moduleConfig \t= ($moduleConfig !== false ? json_decode($moduleConfig) : [] );\t\n\n\t\t\t\t\t\t\t\t$pModulesInstall = new CModulesInstall;\n\t\t\t\t\t\t\t\t$moduleData = $pModulesInstall -> getModuleData($moduleConfig, $module -> module_location, $module -> module_type);\n\n\t\t\t\t\t\t\t\tif($moduleData === false)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tcmsLog::add('CModules::registerSystemFunction -- Unable to retrieve modul info for module-ID '. $module -> module_id, true);\n\t\t\t\t\t\t\t\t\tcontinue 2;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t$moduleData = json_decode(json_encode($moduleData));\n\n\t\t\t\t\t\t\t\t$moduleInfo = (object)$moduleData;\n\t\t\t\t\t\t\t\t$moduleInfo -> user_rights = $this -> m_pUserRights -> getModuleRights($module -> module_id);\n\n\n\n\n\n\n\n\n\n\n\t\t\t}\n\n\t\t\tif(!empty($moduleInfo))\n\t\t\t{\n\t\t\t\t$empty = new stdClass;\n\n\t\t\t\t$moduleInstance = new $module -> module_controller($module, $empty);\n\n\t\t\t\tif(!method_exists($moduleInstance, 'registerSystemFunction'))\n\t\t\t\t\tcontinue;\n\n\t\t\t\t$moduleInstance -> registerSystemFunction(cmsSystemModules::instance());\n\t\t\t}\n\t\t}\n\t}",
"public function modules(){\n $userID = Auth::user()->USER_ID;\n $users = USER::where('USER_ID',$userID)->with('authModules')->first();\n $res['USERNAME'] = $users->USERNAME;\n $userModules = $users->authModules;\n foreach($userModules as $userModule){\n $userModuleID = $userModule->MODULE_ID;\n $modules = SystemModule::where('MODULE_ID', $userModuleID)->get();\n foreach($modules as $module){\n array_push($res,$module->MODULE_NAME);\n }\n }\n return $res;\n }",
"private function load_module_info() {\n\t\t$data = array ();\n\t\t$data['module_label'] = $this->module_label;\n\t\t$data['module_labels'] = $this->module_labels;\n\t\t$data['module'] = $this->module;\n\t\treturn $data;\n\t}",
"protected function getModulesData() {}",
"public function run()\n {\n $system_modules = $system_modules = array(\n array('id' => '1','name' => 'Escritorio','url' => '/','icon' => 'dashboard','view' => 'admin.home','parent' => '0','order' => '1','created_at' => '2018-12-13 02:13:23','updated_at' => '2018-12-13 02:13:23'),\n array('id' => '2','name' => 'Citas','url' => '/citas','icon' => 'calendar','view' => 'admin.appointment','parent' => '0','order' => '2','created_at' => '2018-12-13 02:13:23','updated_at' => '2018-12-13 02:13:23'),\n array('id' => '3','name' => 'Prospectos','url' => '/prospectos','icon' => 'group','view' => 'admin.prospect','parent' => '0','order' => '3','created_at' => '2018-12-13 02:13:23','updated_at' => '2018-12-13 02:13:23'),\n array('id' => '4','name' => 'Pacientes','url' => '/pacientes','icon' => 'user','view' => 'admin.patient','parent' => '0','order' => '4','created_at' => '2018-12-13 02:13:23','updated_at' => '2018-12-13 02:13:23'),\n array('id' => '5','name' => 'Inventario','url' => '/inventario','icon' => 'barcode','view' => 'admin.inventory','parent' => '0','order' => '5','created_at' => '2018-12-13 02:13:23','updated_at' => '2018-12-13 02:13:23'),\n array('id' => '6','name' => 'Gastos','url' => '/gastos','icon' => '','view' => 'admin.inventory.expenses','parent' => '5','order' => '1','created_at' => '2018-12-13 02:13:23','updated_at' => '2018-12-13 02:13:23'),\n array('id' => '7','name' => 'Ingresos','url' => '/ingresos','icon' => '','view' => 'admin.inventory.income','parent' => '5','order' => '2','created_at' => '2018-12-13 02:13:23','updated_at' => '2018-12-13 02:13:23'),\n array('id' => '8','name' => 'Categoría de gastos','url' => '/categoria_de_gastos','icon' => '','view' => 'admin.inventory.category_expenses','parent' => '5','order' => '3','created_at' => '2018-12-13 02:13:23','updated_at' => '2018-12-13 02:13:23'),\n array('id' => '9','name' => 'Categoría de ingresos','url' => '/categoria_de_ingresos','icon' => '','view' => 'admin.inventory.category_incomes','parent' => '5','order' => '4','created_at' => '2018-12-13 02:13:23','updated_at' => '2018-12-13 02:13:23'),\n array('id' => '10','name' => 'Contabilidad','url' => '/contabilidad','icon' => 'money','view' => 'admin.accounting','parent' => '0','order' => '6','created_at' => '2018-12-13 02:13:24','updated_at' => '2018-12-13 02:13:24'),\n array('id' => '11','name' => 'Impuestos','url' => '/impuestos','icon' => '','view' => 'admin.accounting.tax','parent' => '10','order' => '1','created_at' => '2018-12-13 02:13:24','updated_at' => '2018-12-13 02:13:24'),\n array('id' => '12','name' => 'Cuentas','url' => '/cuentas','icon' => '','view' => 'admin.accounting.account','parent' => '10','order' => '2','created_at' => '2018-12-13 02:13:24','updated_at' => '2018-12-13 02:13:24'),\n array('id' => '13','name' => 'Ejercicios','url' => '/ejercicios','icon' => '','view' => 'admin.accounting.exercise','parent' => '10','order' => '3','created_at' => '2018-12-13 02:13:24','updated_at' => '2018-12-13 02:13:24'),\n array('id' => '14','name' => 'Asientos','url' => '/asientos','icon' => '','view' => 'admin.accounting.entry','parent' => '10','order' => '4','created_at' => '2018-12-13 02:13:24','updated_at' => '2018-12-13 02:13:24'),\n array('id' => '15','name' => 'Grupos y Epígrafes','url' => '/grupos','icon' => '','view' => 'admin.accounting.groups','parent' => '10','order' => '5','created_at' => '2018-12-13 02:13:24','updated_at' => '2018-12-13 02:13:24'),\n array('id' => '16','name' => 'Formas de Pago','url' => '/formas_de_pago','icon' => '','view' => 'admin.accounting.payment','parent' => '10','order' => '6','created_at' => '2018-12-13 02:13:24','updated_at' => '2018-12-13 02:13:24'),\n array('id' => '17','name' => 'Series','url' => '/series','icon' => '','view' => 'admin.accounting.series','parent' => '10','order' => '7','created_at' => '2018-12-13 02:13:24','updated_at' => '2018-12-13 02:13:24'),\n array('id' => '18','name' => 'Remesas','url' => '/remesas','icon' => '','view' => 'admin.accounting.remittance','parent' => '10','order' => '8','created_at' => '2018-12-13 02:13:24','updated_at' => '2018-12-13 02:13:24'),\n array('id' => '19','name' => 'Compras','url' => '/compras','icon' => 'credit-card','view' => 'admin.purchase','parent' => '0','order' => '7','created_at' => '2018-12-13 02:13:24','updated_at' => '2018-12-13 02:13:24'),\n array('id' => '20','name' => 'Pedidos','url' => '/ordenes','icon' => '','view' => 'admin.purchase.orders','parent' => '19','order' => '1','created_at' => '2018-12-13 02:13:24','updated_at' => '2018-12-13 02:13:24'),\n array('id' => '21','name' => 'Proveedores','url' => '/proveedores','icon' => '','view' => 'admin.purchase.providers','parent' => '19','order' => '2','created_at' => '2018-12-13 02:13:24','updated_at' => '2018-12-13 02:13:24'),\n array('id' => '22','name' => 'Facturas','url' => '/facturas','icon' => '','view' => 'admin.purchase.invoices','parent' => '19','order' => '3','created_at' => '2018-12-13 02:13:24','updated_at' => '2018-12-13 02:13:24'),\n array('id' => '23','name' => 'Recibos','url' => '/recibos','icon' => '','view' => 'admin.purchase.receipts','parent' => '19','order' => '4','created_at' => '2018-12-13 02:13:24','updated_at' => '2018-12-13 02:13:24'),\n array('id' => '24','name' => 'Configuración','url' => '/configuracion','icon' => 'cog','view' => 'admin.configuration','parent' => '0','order' => '8','created_at' => '2018-12-13 02:13:24','updated_at' => '2018-12-13 02:13:24'),\n array('id' => '25','name' => 'Perfiles de Usuarios','url' => '/perfiles_de_usuarios','icon' => '','view' => 'admin.configuration.user_profiles','parent' => '24','order' => '1','created_at' => '2018-12-13 02:13:24','updated_at' => '2018-12-13 02:13:24'),\n array('id' => '26','name' => 'Usuarios','url' => '/usuarios','icon' => '','view' => 'admin.configuration.users','parent' => '24','order' => '2','created_at' => '2018-12-13 02:13:24','updated_at' => '2018-12-13 02:13:24'),\n array('id' => '27','name' => 'Empresa','url' => '/empresa','icon' => '','view' => 'admin.configuration.company','parent' => '24','order' => '3','created_at' => '2018-12-13 02:13:24','updated_at' => '2018-12-13 02:13:24'),\n array('id' => '28','name' => 'Servicios','url' => '/servicios','icon' => '','view' => 'admin.configuration.services','parent' => '24','order' => '4','created_at' => '2018-12-13 02:13:24','updated_at' => '2018-12-13 02:13:24'),\n array('id' => '29','name' => 'Especialidades','url' => '/especialidades','icon' => '','view' => 'admin.configuration.specialties','parent' => '24','order' => '5','created_at' => '2018-12-13 02:13:24','updated_at' => '2018-12-13 02:13:24'),\n array('id' => '30','name' => 'Doctores','url' => '/doctores','icon' => '','view' => 'admin.configuration.doctors','parent' => '24','order' => '6','created_at' => '2018-12-13 02:13:24','updated_at' => '2018-12-13 02:13:24'),\n array('id' => '31','name' => 'Reportes','url' => '/reportes','icon' => 'bar-chart','view' => 'admin.report','parent' => '0','order' => '9','created_at' => '2018-12-13 02:13:24','updated_at' => '2018-12-13 02:13:24'),\n array('id' => '32','name' => 'Clientes','url' => '/clientes','icon' => '','view' => 'admin.report.clients','parent' => '31','order' => '1','created_at' => '2018-12-13 02:13:24','updated_at' => '2018-12-13 02:13:24'),\n array('id' => '33','name' => 'Prospectos','url' => '/prospectos','icon' => '','view' => 'admin.report.prospects','parent' => '31','order' => '2','created_at' => '2018-12-13 02:13:24','updated_at' => '2018-12-13 02:13:24'),\n array('id' => '34','name' => 'Gastos','url' => ' /gastos','icon' => '','view' => 'admin.report.expenses','parent' => '31','order' => '3','created_at' => '2018-12-13 02:13:24','updated_at' => '2018-12-13 02:13:24'),\n array('id' => '35','name' => 'Ingresos','url' => '/ingresos','icon' => '','view' => 'admin.report.incomes','parent' => '31','order' => '4','created_at' => '2018-12-13 02:13:24','updated_at' => '2018-12-13 02:13:24'),\n array('id' => '36','name' => 'Facturas','url' => '/facturas','icon' => '','view' => 'admin.report.invoices','parent' => '31','order' => '5','created_at' => '2018-12-13 02:13:24','updated_at' => '2018-12-13 02:13:24'),\n array('id' => '37','name' => 'Pedidos','url' => '/pedidos','icon' => '','view' => 'admin.report.orders','parent' => '31','order' => '6','created_at' => '2018-12-13 02:13:24','updated_at' => '2018-12-13 02:13:24')\n);\n\n\n\t\tforeach ($system_modules as $item) {\n\t\t\tSystemModule::create($item);\n\t\t}\n }",
"function getModules(){\n global $adb;\n $query=\"select vtiger_tab.tabid,vtiger_tab.tablabel as modulename,linklabel from vtiger_tab left join vtiger_links on vtiger_tab.tabid=vtiger_links.tabid and linklabel='WYSIWYG'\nwhere isentitytype=1 and tablabel!='Comments'\";\n $result=$adb->pquery($query,array());\n while($resultrow = $adb->fetch_array($result)) {\n $modulelist[$resultrow['modulename']]=array('enabled'=>$resultrow['linklabel']==\"WYSIWYG\",'tabid'=>$resultrow['tabid']);\n }\n return $modulelist;\n }",
"protected function createMenuEntriesForTbeModulesExt() {}",
"protected function createMenuEntriesForTbeModulesExt() {}",
"private function getModules() {\n // @todo Only do a full rebuild of the module cache every 1 at the most\n $modules = system_rebuild_module_data();\n uasort($modules, 'system_sort_modules_by_info_name');\n\n $result = array();\n $keys_to_send = array('name', 'version', 'package', 'core', 'project');\n foreach ($modules as $module) {\n $info = array();\n $info['status'] = $module->status;\n foreach ($keys_to_send as $key) {\n $info[$key] = isset($module->info[$key]) ? $module->info[$key] : '';\n }\n $info['filename'] = $module->getPathname();\n if (empty($info['project']) && $module->origin == 'core') {\n $info['project'] = 'drupal';\n }\n\n // Determine which files belong to this module and hash them.\n $module_path = explode('/', $info['filename']);\n array_pop($module_path);\n\n // We really only care about this module if it is in 'sites' or in\n // 'modules' folder.\n // Otherwise it is covered by the hash of the distro's modules.\n if ($module_path[0] == 'sites' || $module_path[0] == 'modules') {\n $contrib_path = implode('/', $module_path);\n\n // Get a hash for this module's files. If we nest into another module,\n // we'll return. and that other module will be covered by it's entry in\n // the system table.\n //\n // !! At present we aren't going to do a per module hash, but rather a\n // per-project hash. The reason being that it is too hard to tell an\n // individual module apart from a project.\n list($info['module_data']['hashes'], $info['module_data']['fileinfo']) = self::generateHashesHelper($contrib_path);\n }\n else {\n $info['module_data']['hashes'] = array();\n $info['module_data']['fileinfo'] = array();\n }\n\n $result[] = $info;\n }\n return $result;\n }",
"protected function row_to_module_form_data($data) {\n\t\tif ( empty($data) ) {\n\t\t\treturn $data;\n\t\t}\n\n $data['global_perm'] = Permission::to_binary($data['global_perm']);\n\n //TODO: convert module permissions to field format\n\t\t\n\t\treturn $data;\n\t}",
"function getModuleColumnsList($module)\n\t{\n\n\t\t$module_info = $this->getFenzuModuleInfo($module);\n\t\tforeach($this->module_list[$module] as $key=>$value)\n\t\t{\n\t\t\t$columnlist = $this->getColumnsListbyBlock($module,$value);\n\t\t\tif(isset($columnlist))\n\t\t\t{\n\t\t\t\t$ret_module_list[$module][$key] = $columnlist;\n\t\t\t}\n\t\t}\n\t\treturn $ret_module_list;\n\t}",
"public function getModulesPairs()\n\t{\n\t\t$db = $this->getDbTable()->getAdapter();\n\t\t$select = $db->select()\n\t\t\t->from(array('m' => 'system_modules'), array('module_name', 'id'));\n\t\treturn $db->fetchPairs($select);\n\t}",
"function xh_initModules()\r\n\t{\r\n\t}",
"protected function assignModules()\n {\n // Get block counts per module\n $model = Pi::model('block');\n $select = $model->select()->group('module')\n ->columns(['count' => Pi::db()->expression('count(*)'), 'module']);\n $rowset = $model->selectWith($select);\n $blockCounts = [];\n foreach ($rowset as $row) {\n $blockCounts[$row->module] = $row->count;\n }\n\n // Get module list\n $modules = [];\n $moduleSet = Pi::model('module')->select(['active' => 1]);\n $widgetModule = [];\n foreach ($moduleSet as $row) {\n if ('widget' == $row->name) {\n $count = empty($blockCounts['widget']) ? '0' : $blockCounts['widget'];\n $widgetModule = [\n 'name' => $row->name,\n 'title' => $row->title . ' (' . $count . ')',\n ];\n } elseif (!empty($blockCounts[$row->name])) {\n $modules[] = [\n 'name' => $row->name,\n 'title' => $row->title . ' (' . $blockCounts[$row->name] . ')',\n ];\n }\n }\n array_unshift($modules, $widgetModule);\n\n $this->view()->assign('modules', $modules);\n }",
"private function _setStockUseConfigFieldsValues($rowData)\n {\n $useConfigFields = [];\n foreach ($rowData as $key => $value) {\n $useConfigName = $key === StockItemInterface::ENABLE_QTY_INCREMENTS\n ? StockItemInterface::USE_CONFIG_ENABLE_QTY_INC\n : self::INVENTORY_USE_CONFIG_PREFIX . $key;\n\n if (isset($this->defaultStockData[$key])\n && isset($this->defaultStockData[$useConfigName])\n && !empty($value)\n && empty($rowData[$useConfigName])\n ) {\n $useConfigFields[$useConfigName] = ($value == self::INVENTORY_USE_CONFIG) ? 1 : 0;\n }\n }\n $rowData = array_merge($rowData, $useConfigFields);\n return $rowData;\n }",
"function getCustomFieldSupportedModules()\n{\n\tglobal $adb;\n\t$sql=\"select distinct ec_field.tabid,name from ec_field inner join ec_tab on ec_field.tabid=ec_tab.tabid where ec_field.tabid not in(7,9,10,29)\";\n\t$result = $adb->getList($sql);\n\tforeach($result as $row)\n\t{\n\t\t$modulelist[$row['name']] = $row['name'];\n\t}\n\treturn $modulelist;\n}",
"protected function getRows()\n {\n return array_map(function (Module $module) {\n return [\n $module->getStudlyName(),\n $module->enabled() ? 'Enabled' : 'Disabled',\n $module->get('order'),\n $module->getPath(),\n ];\n }, $this->getModules());\n }",
"function loadModletList($module) {\n\n\t//find our object modules if that hasn't been done already for this object type\n\tif (!$_SESSION[\"siteModletList\"][$module] || defined(\"DEV_MODE\")) {\n\n\t \t$siteModList = $_SESSION[\"siteModList\"];\n\t \t$modletArr = array();\n \n\t \t//get the keys of all modules that are objects\n\t \tif (!is_array($siteModList[\"modlet\"])) return false;\n\n\t \t$fields = array_keys($_SESSION[\"siteModList\"]);\n\n\t \t//get all our modlet modules with entries\n\t \t$modletCheck = arrayReduce($siteModList[\"modlet\"]);\n\t \t\n\t \t$num = count($siteModList[\"link_name\"]);\n\t \tfor ($i=0;$i<$num;$i++) {\n\t \t\n\t \t $modlet = $siteModList[\"modlet\"][$i];\n $permError = null;\n \n\t \t //stop here if there is no modlet entry\n\t \t if (!is_array($modlet)) continue;\n\n //if our current module is a modlet for the passed module, store it's info\n if (in_array($module,$modlet)) {\n\n //process our module permissions\n $arr = checkModPerm($siteModList[\"link_name\"][$i],BITSET);\n\n if (is_array($arr)) extract($arr);\n if ($permError) continue;\n \n foreach ($fields AS $field) {\n $modletArr[$field][] = $siteModList[$field][$i];\n }\n }\n\t \t\n\t \t}\n\t \t\n\t\t//so they are displayed in the proper order\n\t\tif (is_array($modletArr[\"modlet_sort\"])) $modletArr = arrayMultiSort($modletArr,\"module_sort\");\n else $modletArr = arrayMultiSort($modletArr,\"module_name\");\n \n\t\t$_SESSION[\"siteModletList\"][$module] = $modletArr;\n\n\t}\n\n\treturn $_SESSION[\"siteModletList\"][$module];\n\n}",
"public function prepareModuleMeta() {\t\n\t \n\t $pluginVersion = $this->getModuleVersion();\n\t \n\t // Other info\n\t $moduleMeta = array(\n\t 'magento-version' => Mage::getVersion(),\n\t 'plugin-version' => $pluginVersion\n\t );\n\t \n\t // Backend users\n $roles = Mage::getModel('admin/roles')->getCollection();\n \n\t if (!empty($roles)) {\n foreach($roles as $role) {\n $moduleMeta['registered-'.strtolower($role->getRoleName()).'-users'] = count(Mage::getModel('admin/roles')->load($role->getId())->getRoleUsers());\n }\n }\t\n\t \n // Frontend users \n $users = Mage::getModel('customer/customer')->getCollection();\t \n\t \n\t $moduleMeta['registered-customers'] = count($users);\n\t\n\t $metaHeader = array(\n\t 'meta' => $moduleMeta,\n\t );\n\t return $metaHeader;\n\t}",
"abstract protected function mapRow(array $row);",
"abstract protected function mapRow(array $row);",
"public function initModulesKeys() {\n $this->data['module_keys'] = array(\n 'status',\n 'allow_guest',\n 'custom_css',\n 'limit_seller',\n 'allow_seller',\n 'notify_admin',\n 'email_subject',\n 'email_text',\n 'email_notification',\n 'email_notification_subject',\n 'email_accept_subject',\n 'email_accept_text',\n 'custom_css_email_accept',\n 'email_reject_subject',\n 'email_reject_text',\n 'custom_css_email_reject',\n 'registered_request',\n 'unregistered_request',\n 'coupon_name',\n 'coupon_validity'\n );\n }",
"private function mod_prep($row){\n $meta = new dbMeta(); \n $cols = $meta->get_tabel_columns(); // array w/ all metadata \n $form_array_mod = $meta->buildFormArray($cols); // make to nice form ready\n // insert the values to the form array for mod form\n foreach($row as $k => $v) {\n $form_array_mod[$k]['VALUE'] = $v;\n } \n \n update_form($form_array_mod); // returns array ready to be processed \n }",
"function processData() \n {\n \n // store values in table manager object.\n $moduleID = $this->dataManager->getModuleID();\n $moduleCreator = new ModuleCreator( $moduleID, $this->pathModuleRoot);\n $moduleCreator->createModule();\n \n }",
"public function get_installed_modules()\n\t{\n\t\tif ( ! is_array($this->installed_modules))\n\t\t{\n\t\t\t$this->installed_modules = array();\n\n\t\t\tee()->db->select('LOWER(module_name) AS name');\n\t\t\tee()->db->order_by('module_name');\n\t\t\t$query = ee()->db->get('modules');\n\n\t\t\tif ($query->num_rows())\n\t\t\t{\n\t\t\t\tforeach($query->result_array() as $row)\n\t\t\t\t{\n\t\t\t\t\t$this->installed_modules[$row['name']] = $row['name'];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $this->installed_modules;\n\t}",
"private function loadData(): void\n {\n $modules = BackendExtensionsModel::getModules();\n\n // split the modules in 2 separate data grid sources\n foreach ($modules as $module) {\n if ($module['installed']) {\n $this->installedModules[] = $module;\n } else {\n $this->installableModules[] = $module;\n }\n }\n }",
"public function initializeSystem()\n {\n $GLOBALS['TL_JAVASCRIPT'][] = 'system/modules/carbid/assets/js/jquery.min.js';\n $GLOBALS['TL_JAVASCRIPT'][] = 'system/modules/carbid/assets/js/jquery.slimscroll.min.js';\n $GLOBALS['TL_JAVASCRIPT'][] = 'system/modules/carbid/assets/js/carbid.js';\n $GLOBALS['TL_CSS'][] = 'system/modules/carbid/assets/css/carbid.css';\n\n //\n if (\\Config::get('ajaxEnabled') || 0)\n {\n $GLOBALS['TL_JAVASCRIPT'][] = TL_ASSETS_URL . 'assets/tinymce4/tinymce.gzip.js';\n $GLOBALS['TL_JAVASCRIPT'][] = TL_ASSETS_URL . \"assets/ace/{$GLOBALS['TL_ASSETS']['ACE']}/ace.js'\";\n $GLOBALS['TL_JAVASCRIPT'][] = 'system/modules/carbid/assets/js/app.js';\n }\n\n // For Module Shortcut\n foreach ($GLOBALS['BE_MOD'] as &$arrGroup)\n {\n foreach ($arrGroup as $moduleName=>&$arrModule)\n {\n if ($arrModule['shortcut'])\n {\n $arrModule['callback'] = 'Carbid\\ModuleShortcut';\n if ($moduleName == \\Input::get('do'))\n {\n $arrSourceModule = &ModuleShortcut::getBackendModuleArr($arrModule['shortcut']['do']);\n $arrModule = array_merge($arrSourceModule, $arrModule);\n }\n $GLOBALS['BE_MOD_SHORTCUT'][$moduleName] = &$arrModule;\n }\n }\n }\n\n\n\n /*$session = \\Session::getInstance()->getData();\n var_dump($session['backend_modules']);\n var_dump('----');\n $session['backend_modules'] = array();\n \\Session::getInstance()->set('backend_modules', array());\n $session = \\Session::getInstance()->getData();\n var_dump($session['backend_modules']);*/\n }",
"public function getModuleInformation($moduleName) {\n $objModAdmin = $this->getObject('modules', 'modulecatalogue');\n $array = $objModAdmin->getArray('SELECT isadmin, dependscontext FROM tbl_modules WHERE module_id=\\'' . $moduleName . '\\'');\n $info = array();\n $info['isRegistered'] = isset($array[0]);\n $info['isAdminMod'] = $info['isRegistered'] ? $array[0]['isadmin'] : NULL;\n $info['isContextMod'] = $info['isRegistered'] ? $array[0]['dependscontext'] : NULL;\n return $info;\n }",
"public static function getModules(){\n if(!function_exists('the_flexible_field') || !function_exists('get_row_layout')) return;\n while(the_flexible_field('underpin_flex_content')) TemplateLoader::getTemplate(str_replace('_', '-', get_row_layout()));\n }",
"public static function getModules()\n \t{\n \t\t// Define & init static variables\n \t\tstatic\t$arrModules\t\t\t= NULL;\n \t\tstatic\t$selModules;\n \t\tstatic\t$selModuleConfig;\n \t\tstatic\t$arrCustomerGroups;\n \t\tif (!isset($arrModules))\n \t\t{\n\t \t\t$selModules\t\t\t= new StatementSelect(\"billing_charge_module\", \"*\", \"active_status_id = \".ACTIVE_STATUS_ACTIVE, \"ISNULL(customer_group_id) DESC\");\n\t \t\t$selModuleConfig\t= new StatementSelect(\"billing_charge_module_config\", \"*\", \"billing_charge_module_id = <id>\");\n\t \t\t\n\t \t\t$arrModules\t= Array();\n\t \t\t\n\t \t\t// Get list of CustomerGroups\n\t \t\t$selCustomerGroups\t= new StatementSelect(\"CustomerGroup\", \"Id\", \"1\");\n\t \t\tif ($selCustomerGroups->Execute() === FALSE)\n\t \t\t{\n\t \t\t\tthrow new Exception_Database(\"DB Error: \".$selCustomerGroups->Error());\n\t \t\t}\n\t \t\twhile ($arrCustomerGroup = $selCustomerGroups->Fetch())\n\t \t\t{\n\t \t\t\t$arrModules[$arrCustomerGroup['Id']]['Billing_Charge_Account']\t= Array();\n\t \t\t\t$arrModules[$arrCustomerGroup['Id']]['Billing_Charge_Service']\t= Array();\n\t \t\t\t\n\t \t\t\t$arrCustomerGroups[]\t= $arrCustomerGroup;\n\t \t\t}\n \t\t\t\n\t \t\t// Retrieve all Billing Charge Modules\n\t \t\tif ($selModules->Execute() !== FALSE)\n\t \t\t{\n\t \t\t\twhile ($arrModule = $selModules->Fetch())\n\t \t\t\t{\n\t \t\t\t\t// Instanciate the Class\n\t \t\t\t\t$modModule\t= new $arrModule['class']($arrModule['id']);\n\t \t\t\t\t\n\t \t\t\t\t// Is this Module for All CustomerGroups, or just one?\n\t \t\t\t\tif ($arrModule['customer_group_id'] === NULL)\n\t \t\t\t\t{\n\t \t\t\t\t\t// All CustomerGroups, although this can be overridden later\n\t \t\t\t\t\tforeach ($arrCustomerGroups as $arrCustomerGroup)\n\t \t\t\t\t\t{\n\t \t\t\t\t\t\t$arrModules[$arrCustomerGroup['Id']][get_parent_class($modModule)][get_class($modModule)]\t= $modModule;\n\t \t\t\t\t\t}\n\t \t\t\t\t}\n\t \t\t\t\telse\n\t \t\t\t\t{\n\t \t\t\t\t\t// Just One CustomerGroup. If there is already an \"All\" Module defined, then override it\n\t \t\t\t\t\t$arrModules[$arrModule['customer_group_id']][get_parent_class($modModule)][get_class($modModule)]\t= $modModule;\n\t \t\t\t\t}\n\t \t\t\t}\n\t \t\t}\n\t \t\telse\n\t \t\t{\n\t \t\t\tthrow new Exception_Database(\"DB ERROR: \".$selModules->Error());\n\t \t\t}\n \t\t}\n\t \t\n\t\t// Return array of Billing Charge Modules\n\t\treturn $arrModules;\n \t}",
"private function initSysLanguages(){\n/*\n\tmod.SHARED {\n\t\tdefaultLanguageFlag = de.gif\n\t\tdefaultLanguageLabel = german\n\t}\t\n*/\t\n\t\t$modSharedTSconfig = t3lib_BEfunc::getModTSconfig( $this->settings['pageUid'], 'mod.SHARED');\n\n\t\t// fallback non sprite-configuration\n\t\tif (preg_match('/\\.gif$/', $modSharedTSconfig['properties']['defaultLanguageFlag'])) {\n\t\t\t$modSharedTSconfig['properties']['defaultLanguageFlag'] = str_replace('.gif', '', $modSharedTSconfig['properties']['defaultLanguageFlag']);\n\t\t}\n\n\n\t\t$this->sysLanguages = array(\n\t\t\t0=>array(\n\t\t\t\t'title' => strlen($modSharedTSconfig['properties']['defaultLanguageLabel']) ? $modSharedTSconfig['properties']['defaultLanguageLabel'].' ('.$GLOBALS['LANG']->sl('LLL:EXT:lang/locallang_mod_web_list.xml:defaultLanguage').')' : $GLOBALS['LANG']->sl('LLL:EXT:lang/locallang_mod_web_list.xml:defaultLanguage'),\n\t\t\t\t'flag' => $modSharedTSconfig['properties']['defaultLanguageFlag'],\n\t\t\t)\n\t\t);\n\t\t$result = $GLOBALS['TYPO3_DB']->exec_SELECTquery ( 'uid,title,flag',\n\t\t\t'sys_language', '', '', '' );\n\t\twhile ($r = $GLOBALS['TYPO3_DB']->sql_fetch_assoc ($result)) {\n\t\t\t$this->sysLanguages[ $r['uid'] ] = $r;\n\t\t}\n\t}",
"function getFenzuModuleInfo($module)\n\t{\n\t\tglobal $adb;\n\t\tglobal $current_language;\n\t\t$current_mod_strings = return_specified_module_language($current_language, $module);\n\t\t$block_info = Array();\n\t\t$tabid = getTabid($module);\n\t\t$Sql = \"select distinct block,ec_field.tabid,name,blocklabel from ec_field inner join ec_blocks on ec_blocks.blockid=ec_field.block inner join ec_tab on ec_tab.tabid=ec_field.tabid where ec_field.block not in(40,6,75,35,30,54,60,66,72) and ec_tab.tabid='$tabid' order by block\";\n\t\t$result = $adb->getList($Sql);\n\t\tforeach($result as $block_result)\n\t\t{\n\t\t\t$block_label = $block_result['blocklabel'];\n\t\t\tif (trim($block_label) == '')\n\t\t\t{\n\t\t\t\t$block_info[$pre_block_label] = $block_info[$pre_block_label].\",\".$block_result['block'];\n\t\t\t}else\n\t\t\t{\n\t\t\t\tif(isset($current_mod_strings[$block_label])) {\n\t\t\t\t\t$lan_block_label = $current_mod_strings[$block_label];\n\t\t\t\t} else {\n\t\t\t\t\t$lan_block_label = $block_label;\n\t\t\t\t}\n\t\t\t\t$block_info[$lan_block_label] = $block_result['block'];\n\t\t\t}\n\t\t\t$pre_block_label = $lan_block_label;\n\t\t}\n\t\t$this->module_list[$module] = $block_info;\n\t\treturn $this->module_list;\n\t}",
"public function columnMap()\n {\n //the values their names in the application\n return array(\n 'id' => 'ID',\n 'item_id' => 'Item_ID',\n 'des' => 'Des',\n 'depts_id' => 'Depts_ID',\n 'application_id' => 'Application_ID',\n 'module_id' => 'Module_ID',\n );\n\n\n }",
"function getVoteModulesFields() {\n return array_column(getVoteModulesList(), 'module');\n}",
"public function updateRowData(&$rowData)\n {\n foreach ($this->defaultData as $fieldName => $fieldValue) {\n if (!array_key_exists($fieldName, $rowData)) {\n $rowData[$fieldName] = $fieldValue;\n }\n }\n foreach ($this->fieldsMapping as $systemFieldName => $fileFieldName) {\n if (array_key_exists($fileFieldName, $rowData)) {\n $rowData[$systemFieldName] = $rowData[$fileFieldName];\n }\n }\n }",
"public function uultra_reload_user_modules()\r\n\t{\r\n\t\t$modules = get_option('userultra_default_user_features');\t\t\r\n\t\t\r\n\t\t\r\n\t\t$html = '';\r\n\t\tforeach($modules as $key => $module)\r\n\t\t{\r\n\t\t\t$checked = '';\t\t\t\r\n\t\t\t\r\n\t\t\tif ($this->check_if_disallowed_array($key))\r\n\t\t\t{\r\n\t\t\t\t$checked = 'checked=\"checked\"';\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t$html .= '<li class=\"uultra-profile-widget rounded\" id=\"'.$key.'\"><input name=\"uultra-modules[]\" type=\"checkbox\" value=\"'.$key.'\" class=\"uultra-my-modules-checked\" '.$checked.'/><label for=\"checkbox1\"><span></span>'.$module[\"title\"].'</label></li>';\r\n\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\techo $html;\r\n\t\tdie();\r\n\t\t\r\n\t}",
"protected function initializeColumnMapping() {\n\t\t// add always available cols for filemetadata\n\t\tforeach ($this->metaColMapping as $damColName => $metaColName) {\n\t\t\t$this->columnMapping[$damColName] = $metaColName;\n\t\t}\n\n\t\t// add additional cols if ext:for filemetadata is installed\n\t\tif (ExtensionManagementUtility::isLoaded('filemetadata')) {\n\t\t\tforeach ($this->additionalMetaColMapping as $damColName => $metaColName) {\n\t\t\t\t$this->columnMapping[$damColName] = $metaColName;\n\t\t\t}\n\t\t}\n\t}",
"public static function getModsTable()\n {\n if (!isset(self::$cache['modstable'])) {\n self::$cache['modstable'] = array();\n }\n\n if (!self::$cache['modstable'] || System::isInstalling()) {\n self::$cache['modstable'] = DBUtil::selectObjectArray('modules', '', '', -1, -1, 'id');\n foreach (self::$cache['modstable'] as $mid => $module) {\n if (!isset($module['url']) || empty($module['url'])) {\n self::$cache['modstable'][$mid]['url'] = $module['displayname'];\n }\n self::$cache['modstable'][$mid]['capabilities'] = unserialize($module['capabilities']);\n self::$cache['modstable'][$mid]['securityschema'] = unserialize($module['securityschema']);\n }\n }\n\n // add Core module (hack).\n self::$cache['modstable'][0] = array('id' => '0', 'name' => 'zikula', 'type' => self::TYPE_CORE, 'directory' => '', 'displayname' => 'Zikula Core v' . Zikula_Core::VERSION_NUM, 'version' => Zikula_Core::VERSION_NUM, 'state' => self::STATE_ACTIVE);\n\n return self::$cache['modstable'];\n }",
"function loadModules($field = null, $condition = \"\"){ \r\n if($field == null){\r\n $field = \"a.id, a.title, a.alias, a.cdate, a.mdate, a.ordering, a.position, a.menu, a.module, a.description, a.status + 2*(b.status - 1) as status, a.params\";\r\n }\r\n \r\n $command = $this->_db->createCommand()->select($field)\r\n ->from(TBL_MODULES . \" as a\")\r\n ->leftjoin(TBL_EXTENSIONS . \" as b\", \" a.module = b.folder\");\r\n if($conditions != null) $command->where($conditions);\r\n $items = $command->queryAll();\r\n return $items;\r\n }",
"protected function readModules()\n {\n foreach ($this->moduleList as $vendorName => &$modulesArray) {\n $directoryIterator = new \\DirectoryIterator(\n $this->getAppCodeAbsolutePath() . DIRECTORY_SEPARATOR . $vendorName\n );\n foreach ($directoryIterator as $element) {\n if ($element->isDir()\n && $this->isBaseNameValid($element->getBasename())\n ) {\n $modulesArray[] = $element->getBasename();\n }\n }\n }\n }",
"function spyropress_builder_render_modules( $display_core = false ) {\n global $spyropress_builder;\n $sort = $spyropress_builder->modules->get_modules();\n \n if( empty( $sort ) ) return;\n \n $content = '';\n \n // Sorting\n usort( $sort, 'builder_module_name_sort' );\n $done = array();\n\n foreach ( $sort as $module ) {\n if ( $display_core && $module->is_core ) {\n $module_idbase = $module->id_base;\n if ( in_array( $module_idbase, $done, true ) )\n continue;\n\n $done[] = $module_idbase;\n $widget_obj = $module;\n $class = get_class( $widget_obj );\n\n /** Generate HTML **/\n $content .= sprintf( '\n <li class=\"module-item\">\n <a class=\"builder-module-insert\" href=\"#\" data-module-type=\"%1$s\">\n <span class=\"module-icon-widget\"></span>\n <span class=\"module-item-body\">\n <strong class=\"module-item-title\">%2$s</strong>\n <span class=\"module-item-description\">%3$s</span>\n </span>\n </a>\n </li>', $class, $widget_obj->name, esc_html( $widget_obj->widget_options['description'] )\n );\n }\n elseif ( ! $display_core && ! $module->is_core ) {\n $module_idbase = $module->id_base;\n if ( in_array( $module_idbase, $done, true ) )\n continue;\n\n $done[] = $module_idbase;\n $widget_obj = $module;\n $class = get_class( $widget_obj );\n\n /** Generate HTML **/\n $content .= sprintf( '\n <li class=\"module-item\">\n <a class=\"builder-module-insert\" href=\"#\" data-module-type=\"%1$s\">\n <span class=\"module-icon-widget\"></span>\n <span class=\"module-item-body\">\n <strong class=\"module-item-title\">%2$s</strong>\n <span class=\"module-item-description\">%3$s</span>\n </span>\n </a>\n </li>', $class, $widget_obj->name, esc_html( $widget_obj->widget_options['description'] )\n );\n }\n }\n\n echo tomato_html( $content );\n}",
"private function parseModInfo($mod_info_path)\n {\n $mod_file = fopen($mod_info_path, 'r');\n $this->mod_map_names[] = $this->read_ue4_string($mod_file);\n $raw_map_count = fread($mod_file, 4);\n $map_count = current(unpack(\"i\", $raw_map_count));\n for ($i = 0; $i < $map_count; $i++) {\n $this->mod_map_names[] = $this->read_ue4_string($mod_file);\n }\n }",
"function get_oermdlmodule_infos( $moduleid ){\n\n $oer_category_id=$GLOBALS['glbstg_crs_category'];\n $DB=$GLOBALS['GLBMDL_DB'];\n $module_infos=new stdClass();\n try {\n\n $module_infos= $DB->get_record('course_modules', array('id' =>$moduleid));\n $resource_course_infos=new stdClass();\n $resource_course_infos=get_course_infos($module_infos->course, $DB);\n\n //X5GON 1st OER Criteria: Category + Course Visibility + Course Availability ===> X5GON Snippet integrated\n $nopermittedmodules=0;\n if( in_array($resource_course_infos->course_cat_infos->id, $oer_category_id) and validate_course_enrolment($resource_course_infos->course_gen_infos->id, $DB, $GLOBALS['glbstg_crs_allowed_enrolment_types'], $GLOBALS['glbstg_crs_allow_typeswith_pass']) and validate_course_visibility($resource_course_infos->course_gen_infos->id, $DB, $GLOBALS['glbstg_crs_allowhidden_courses']) ){\n\n $course_mod_restrictions=check_module_visibilityANDavailability($DB, $resource_course_infos->course_modules[$moduleid], $GLOBALS['glbstg_mod_visibility_allowhiddenmodules'], $GLOBALS['glbstg_mod_availability_ignoreavailabilityrestrictions']);\n if($course_mod_restrictions[1]==1){\n\n //X5GON 3rd OER Criteria: Final file license.\n if($resource_course_infos->course_modules[$moduleid]->course_module_file){\n //not empty file attribute infos\n if( preg_match(\"/\".$GLOBALS['glbstg_mod_fresallowedlicenses'].\"/\", $resource_course_infos->course_modules[$moduleid]->course_module_file->license) ){\n\n $module_infos=$resource_course_infos->course_modules[$moduleid];\n $module_infos->course_gen_infos = $resource_course_infos->course_gen_infos ;\n $module_infos->course_cat_infos = $resource_course_infos->course_cat_infos ;\n $nopermittedmodules=1;\n }\n\n }else{\n // Else: other type of moodle resources + category is \"OER category(Nantes case)\"\n $module_infos=$resource_course_infos->course_modules[$moduleid];\n $module_infos->course_gen_infos = $resource_course_infos->course_gen_infos ;\n $module_infos->course_cat_infos = $resource_course_infos->course_cat_infos ;\n $nopermittedmodules=1;\n\n }\n\n\n }\n\n //Y1: For FinalResources: We are interested for the moment about 'type=resource' of moodle modules.\n if ( $nopermittedmodules==1 ){\n if(is_concerned_resource( $module_infos, $GLOBALS['glbstg_mod_finalfilter_concernedmdlmodtypes'] ) == 0){\n\n $nopermittedmodules=0;\n }\n\n }\n }\n\n\n } catch (\\Exception $e) {\n //$module_infos->course_gen_infos = 'Resource not existant. Verify your request or contact Univ-Nantes Admin.';\n //return $e;\n $module_infos->response_notice=\"No permitted informations to be rendered. Check with admin.\";\n echo \"Exception occurred\";\n }\n if($nopermittedmodules==0){\n $module_infos->response_notice=\"No permitted informations to be rendered. Check with admin.\";\n }\n\n //Clean function to 'mustRenderedX5gonInfos' must be applied here.\n return cleanresponse_resource_infos($module_infos);\n\n\n }",
"function crpLicense_userapi_getmodulemeta()\n{\n\treturn array (\n\t\t'viewfunc' => 'view',\n\t\t'displayfunc' => 'display',\n\t\t'newfunc' => 'new',\n\t\t'createfunc' => 'create',\n\t\t'modifyfunc' => 'modify',\n\t\t'updatefunc' => 'update',\n\t\t'deletefunc' => 'delete',\n\t\t'titlefield' => 'name',\n\t\t'itemid' => 'id'\n\t);\n}",
"private function update_modules()\n\t{\n\t\tee()->db->select('module_name, module_version');\n\t\t$query = ee()->db->get('modules');\n\n\t\tforeach ($query->result() as $row)\n\t\t{\n\t\t\t$module = strtolower($row->module_name);\n\n\t\t\t// Only update first-party modules\n\t\t\tif ( ! in_array($module, $this->native_modules))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Send version to update class and let it do any required work\n\t\t\tif (in_array($module, $this->native_modules))\n\t\t\t{\n\t\t\t\t$path = EE_APPPATH.'/modules/'.$module.'/';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$path = PATH_THIRD.$module.'/';\n\t\t\t}\n\n\t\t\tif (file_exists($path.'upd.'.$module.'.php'))\n\t\t\t{\n\t\t\t\t$this->load->add_package_path($path);\n\n\t\t\t\t$class = ucfirst($module).'_upd';\n\n\t\t\t\tif ( ! class_exists($class))\n\t\t\t\t{\n\t\t\t\t\trequire $path.'upd.'.$module.'.php';\n\t\t\t\t}\n\n\t\t\t\t$UPD = new $class;\n\t\t\t\t$UPD->_ee_path = EE_APPPATH;\n\n\t\t\t\tif ($UPD->version > $row->module_version && method_exists($UPD, 'update') && $UPD->update($row->module_version) !== FALSE)\n\t\t\t\t{\n\t\t\t\t\tee()->db->update('modules', array('module_version' => $UPD->version), array('module_name' => ucfirst($module)));\n\t\t\t\t}\n\n\t\t\t\t$this->load->remove_package_path($path);\n\t\t\t}\n\t\t}\n\t}",
"public function getModules()\n {\n $orgid = isset($_REQUEST['orgid']) ? decode5t($_REQUEST['orgid']) : '0';\n $data = array();\n try {\n $query = $this->db->query(\"SELECT ModuleId AS module,ViewPermission as permission FROM OrgPermission WHERE OrgId= ? and ModuleId in (5,31,66,171,186,187,2)\", array(\n $orgid\n ));\n $data['permission'] = $query->result();\n }\n catch (Exception $a) {\n $data['permission'] = '0';\n }\n return $data;\n \n }",
"protected function setEngineModules()\n {\n $mods = ModulesModel::getEnabled();\n if ($mods) {\n foreach ($mods as $module) {\n $this->setModules(array($module->name => array(\n 'access' => $module->access\n )\n ));\n }\n }\n }",
"function LoadRowValues(&$rs) {\n\t\tglobal $conn, $scholarship_package;\n\t\t$scholarship_package->scholarship_package_id->setDbValue($rs->fields('scholarship_package_id'));\n\t\t$scholarship_package->start_date->setDbValue($rs->fields('start_date'));\n\t\t$scholarship_package->end_date->setDbValue($rs->fields('end_date'));\n\t\t$scholarship_package->status->setDbValue($rs->fields('status'));\n\t\t$scholarship_package->annual_amount->setDbValue($rs->fields('annual_amount'));\n\t\t$scholarship_package->grant_package_grant_package_id->setDbValue($rs->fields('grant_package_grant_package_id'));\n\t\t$scholarship_package->sponsored_student_sponsored_student_id->setDbValue($rs->fields('sponsored_student_sponsored_student_id'));\n\t\t$scholarship_package->scholarship_type->setDbValue($rs->fields('scholarship_type'));\n\t\t$scholarship_package->scholarship_type_scholarship_type->setDbValue($rs->fields('scholarship_type_scholarship_type'));\n\t\t$scholarship_package->group_id->setDbValue($rs->fields('group_id'));\n\t}",
"function LoadRowValues(&$rs) {\n\t\tglobal $conn, $scholarship_package;\n\t\t$scholarship_package->scholarship_package_id->setDbValue($rs->fields('scholarship_package_id'));\n\t\t$scholarship_package->start_date->setDbValue($rs->fields('start_date'));\n\t\t$scholarship_package->end_date->setDbValue($rs->fields('end_date'));\n\t\t$scholarship_package->status->setDbValue($rs->fields('status'));\n\t\t$scholarship_package->annual_amount->setDbValue($rs->fields('annual_amount'));\n\t\t$scholarship_package->grant_package_grant_package_id->setDbValue($rs->fields('grant_package_grant_package_id'));\n\t\t$scholarship_package->sponsored_student_sponsored_student_id->setDbValue($rs->fields('sponsored_student_sponsored_student_id'));\n\t\t$scholarship_package->scholarship_type->setDbValue($rs->fields('scholarship_type'));\n\t\t$scholarship_package->scholarship_type_scholarship_type->setDbValue($rs->fields('scholarship_type_scholarship_type'));\n\t\t$scholarship_package->group_id->setDbValue($rs->fields('group_id'));\n\t}",
"public function init_modules() {\n\t\t\t$this->dynamic_css = $this->get_core()->init_module( 'cherry-dynamic-css' );\n\n\t\t\tif ( is_admin() ) {\n\t\t\t\t$this->get_core()->init_module( 'cherry5-insert-shortcode', array() );\n\t\t\t}\n\t\t}",
"public static function getModules()\n\t{\n\t\treturn (new \\App\\Db\\Query())->select(['vtiger_tab.tabid', 'vtiger_tab.tablabel', 'tabname' => 'vtiger_tab.name'])->from('vtiger_field')\n\t\t\t->innerJoin('vtiger_tab', 'vtiger_field.tabid = vtiger_tab.tabid')->where(['uitype' => [15, 16, 33, 115], 'vtiger_field.presence' => [0, 2], 'vtiger_tab.presence' => 0])\n\t\t\t->distinct('vtiger_tab.tabid')->orderBy(['vtiger_tab.tabid' => SORT_ASC])->createCommand()->queryAllByGroup(1);\n\t}",
"private function maper(){\n\n\t\t$map = [];\n\n\t\tforeach($this::$tables as $table ){\n\n\t\t\t$tmp = explode(\"_\",$table);\n\n\t\t\tfor($i=0;$i<count($tmp);$i++){\n\n\t\t\t\t$tmp2 = array_slice($tmp,0,$i+1);\n\n\t\t\t\teval ('if(@ $map[\"'.implode('\"][\"',$tmp2).'\"]) true; else $map[\"'.implode('\"][\"',$tmp2).'\"]=[];');\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn $map;\n\n\t}",
"protected function getInfoModule() {}",
"public static function getModules(){ \n $db = new db();\n $db->connect();\n $modules = $db->selectAll('modules');\n return self::getModulesInfo($modules);\n }",
"function usp_ews_get_monitorable_modules() {\n global $DB;\n\n return array(\n 'assign' => array(\n 'defaultTime' => 'duedate',\n 'actions' => array(\n 'submitted' => \"SELECT id\n FROM {assign_submission}\n WHERE assignment = :eventid\n AND userid = :userid\n AND status = 'submitted'\",\n 'marked' => \"SELECT g.rawgrade\n FROM {grade_grades} g, {grade_items} i\n WHERE i.itemmodule = 'assign'\n AND i.iteminstance = :eventid\n AND i.id = g.itemid\n AND g.userid = :userid\n AND g.finalgrade IS NOT NULL\",\n 'passed' => \"SELECT g.finalgrade, i.gradepass\n FROM {grade_grades} g, {grade_items} i\n WHERE i.itemmodule = 'assign'\n AND i.iteminstance = :eventid\n AND i.id = g.itemid\n AND g.userid = :userid\"\n ),\n 'defaultAction' => 'submitted'\n ),\n 'assignment' => array(\n 'defaultTime' => 'timedue',\n 'actions' => array(\n 'submitted' => \"SELECT id\n FROM {assignment_submissions}\n WHERE assignment = :eventid\n AND userid = :userid\n AND (\n numfiles >= 1\n OR {$DB->sql_compare_text('data2')} <> ''\n )\",\n 'marked' => \"SELECT g.rawgrade\n FROM {grade_grades} g, {grade_items} i\n WHERE i.itemmodule = 'assignment'\n AND i.iteminstance = :eventid\n AND i.id = g.itemid\n AND g.userid = :userid\n AND g.finalgrade IS NOT NULL\",\n 'passed' => \"SELECT g.finalgrade, i.gradepass\n FROM {grade_grades} g, {grade_items} i\n WHERE i.itemmodule = 'assignment'\n AND i.iteminstance = :eventid\n AND i.id = g.itemid\n AND g.userid = :userid\"\n ),\n 'defaultAction' => 'submitted'\n ),\n 'bigbluebuttonbn' => array(\n 'defaultTime' => 'timedue',\n 'actions' => array(\n 'viewed' => \"SELECT id\n FROM {log}\n WHERE course = :courseid\n AND module = 'bigbluebuttonbn'\n AND action = 'view'\n AND cmid = :cmid\n AND userid = :userid\"\n ),\n 'defaultAction' => 'viewed'\n ),\n 'recordingsbn' => array(\n 'actions' => array(\n 'viewed' => \"SELECT id\n FROM {log}\n WHERE course = :courseid\n AND module = 'recordingsbn'\n AND action = 'view'\n AND cmid = :cmid\n AND userid = :userid\"\n ),\n 'defaultAction' => 'viewed'\n ),\n 'book' => array(\n 'actions' => array(\n 'viewed' => \"SELECT id\n FROM {log}\n WHERE course = :courseid\n AND module = 'book'\n AND action = 'view'\n AND cmid = :cmid\n AND userid = :userid\"\n ),\n 'defaultAction' => 'viewed'\n ),\n 'certificate' => array(\n 'actions' => array(\n 'awarded' => \"SELECT id\n FROM {certificate_issues}\n WHERE certificateid = :eventid\n AND userid = :userid\"\n ),\n 'defaultAction' => 'awarded'\n ),\n 'chat' => array(\n 'actions' => array(\n 'posted_to' => \"SELECT id\n FROM {chat_messages}\n WHERE chatid = :eventid\n AND userid = :userid\"\n ),\n 'defaultAction' => 'posted_to'\n ),\n 'choice' => array(\n 'defaultTime' => 'timeclose',\n 'actions' => array(\n 'answered' => \"SELECT id\n FROM {choice_answers}\n WHERE choiceid = :eventid\n AND userid = :userid\"\n ),\n 'defaultAction' => 'answered'\n ),\n 'data' => array(\n 'defaultTime' => 'timeviewto',\n 'actions' => array(\n 'viewed' => \"SELECT id\n FROM {log}\n WHERE course = :courseid\n AND module = 'data'\n AND action = 'view'\n AND cmid = :cmid\n AND userid = :userid\"\n ),\n 'defaultAction' => 'viewed'\n ),\n 'feedback' => array(\n 'defaultTime' => 'timeclose',\n 'actions' => array(\n 'responded_to' => \"SELECT id\n FROM {feedback_completed}\n WHERE feedback = :eventid\n AND userid = :userid\"\n ),\n 'defaultAction' => 'responded_to'\n ),\n 'resource' => array( // AKA file.\n 'actions' => array(\n 'viewed' => \"SELECT id\n FROM {log}\n WHERE course = :courseid\n AND module = 'resource'\n AND action = 'view'\n AND cmid = :cmid\n AND userid = :userid\"\n ),\n 'defaultAction' => 'viewed'\n ),\n 'flashcardtrainer' => array(\n 'actions' => array(\n 'viewed' => \"SELECT id\n FROM {log}\n WHERE course = :courseid\n AND module = 'flashcardtrainer'\n AND action = 'view'\n AND cmid = :cmid\n AND userid = :userid\"\n ),\n 'defaultAction' => 'viewed'\n ),\n 'folder' => array(\n 'actions' => array(\n 'viewed' => \"SELECT id\n FROM {log}\n WHERE course = :courseid\n AND module = 'folder'\n AND action = 'view'\n AND cmid = :cmid\n AND userid = :userid\"\n ),\n 'defaultAction' => 'viewed'\n ),\n 'forum' => array(\n 'defaultTime' => 'assesstimefinish',\n 'actions' => array(\n\t\t\t\t'viewed' => \"SELECT id\n\t\t\t\t\t\t\t\t\t FROM {log}\n\t\t\t\t\t\t\t\t\tWHERE course = :courseid\n\t\t\t\t\t\t\t\t\t AND module = 'forum'\n\t\t\t\t\t\t\t\t\t AND action = 'view forum' \n\t\t\t\t\t\t\t\t\t AND cmid = :cmid\n\t\t\t\t\t\t\t\t\t AND userid = :userid\",\n 'posted_to' => \"SELECT id\n FROM {forum_posts}\n WHERE userid = :userid AND discussion IN (\n SELECT id\n FROM {forum_discussions}\n WHERE forum = :eventid\n )\"\n ),\n 'defaultAction' => 'posted_to'\n ),\n 'glossary' => array(\n 'actions' => array(\n 'viewed' => \"SELECT id\n FROM {log}\n WHERE course = :courseid\n AND module = 'glossary'\n AND action = 'view'\n AND cmid = :cmid\n AND userid = :userid\"\n ),\n 'defaultAction' => 'viewed'\n ),\n 'hotpot' => array(\n 'defaultTime' => 'timeclose',\n 'actions' => array(\n 'attempted' => \"SELECT id\n FROM {hotpot_attempts}\n WHERE hotpotid = :eventid\n AND userid = :userid\",\n 'finished' => \"SELECT id\n FROM {hotpot_attempts}\n WHERE hotpotid = :eventid\n AND userid = :userid\n AND timefinish <> 0\",\n ),\n 'defaultAction' => 'finished'\n ),\n 'imscp' => array(\n 'actions' => array(\n 'viewed' => \"SELECT id\n FROM {log}\n WHERE course = :courseid\n AND module = 'imscp'\n AND action = 'view'\n AND cmid = :cmid\n AND userid = :userid\"\n ),\n 'defaultAction' => 'viewed'\n ),\n 'journal' => array(\n 'actions' => array(\n 'posted_to' => \"SELECT id\n FROM {journal_entries}\n WHERE journal = :eventid\n AND userid = :userid\"\n ),\n 'defaultAction' => 'posted_to'\n ),\n 'lesson' => array(\n 'defaultTime' => 'deadline',\n 'actions' => array(\n 'attempted' => \"SELECT id\n FROM {lesson_attempts}\n WHERE lessonid = :eventid\n AND userid = :userid\n UNION ALL\n SELECT id\n FROM {lesson_branch}\n WHERE lessonid = :eventid1\n AND userid = :userid1\",\n 'graded' => \"SELECT g.rawgrade\n FROM {grade_grades} g, {grade_items} i\n WHERE i.itemmodule = 'lesson'\n AND i.iteminstance = :eventid\n AND i.id = g.itemid\n AND g.userid = :userid\n AND g.finalgrade IS NOT NULL\"\n ),\n 'defaultAction' => 'attempted'\n ),\n 'page' => array(\n 'actions' => array(\n 'viewed' => \"SELECT id\n FROM {log}\n WHERE course = :courseid\n AND module = 'page'\n AND action = 'view'\n AND cmid = :cmid\n AND userid = :userid\"\n ),\n 'defaultAction' => 'viewed'\n ),\n 'questionnaire' => array(\n 'defaultTime' => 'closedate',\n 'actions' => array(\n 'attempted' => \"SELECT id\n FROM {questionnaire_attempts}\n WHERE qid = :eventid\n AND userid = :userid\",\n 'finished' => \"SELECT id\n FROM {questionnaire_response}\n WHERE complete = 'y'\n AND username = :userid\n AND survey_id = :eventid\",\n ),\n 'defaultAction' => 'finished'\n ),\n 'quiz' => array(\n 'defaultTime' => 'timeclose',\n 'actions' => array(\n 'attempted' => \"SELECT id\n FROM {quiz_attempts}\n WHERE quiz = :eventid\n AND userid = :userid\",\n 'finished' => \"SELECT id\n FROM {quiz_attempts}\n WHERE quiz = :eventid\n AND userid = :userid\n AND timefinish <> 0\",\n 'graded' => \"SELECT g.rawgrade\n FROM {grade_grades} g, {grade_items} i\n WHERE i.itemmodule = 'quiz'\n AND i.iteminstance = :eventid\n AND i.id = g.itemid\n AND g.userid = :userid\n AND g.finalgrade IS NOT NULL\",\n 'passed' => \"SELECT g.finalgrade, i.gradepass\n FROM {grade_grades} g, {grade_items} i\n WHERE i.itemmodule = 'quiz'\n AND i.iteminstance = :eventid\n AND i.id = g.itemid\n AND g.userid = :userid\"\n ),\n 'defaultAction' => 'finished'\n ),\n 'scorm' => array(\n 'actions' => array(\n 'attempted' => \"SELECT id\n FROM {scorm_scoes_track}\n WHERE scormid = :eventid\n AND userid = :userid\",\n 'completed' => \"SELECT id\n FROM {scorm_scoes_track}\n WHERE scormid = :eventid\n AND userid = :userid\n AND element = 'cmi.core.lesson_status'\n AND {$DB->sql_compare_text('value')} = 'completed'\",\n 'passedscorm' => \"SELECT id\n FROM {scorm_scoes_track}\n WHERE scormid = :eventid\n AND userid = :userid\n AND element = 'cmi.core.lesson_status'\n AND {$DB->sql_compare_text('value')} = 'passed'\"\n ),\n 'defaultAction' => 'attempted'\n ),\n 'turnitintool' => array(\n 'defaultTime' => 'defaultdtdue',\n 'actions' => array(\n 'submitted' => \"SELECT id\n FROM {turnitintool_submissions}\n WHERE turnitintoolid = :eventid\n AND userid = :userid\n AND submission_score IS NOT NULL\"\n ),\n 'defaultAction' => 'submitted'\n ),\n 'url' => array(\n 'actions' => array(\n 'viewed' => \"SELECT id\n FROM {log}\n WHERE course = :courseid\n AND module = 'url'\n AND action = 'view'\n AND cmid = :cmid\n AND userid = :userid\"\n ),\n 'defaultAction' => 'viewed'\n ),\n 'wiki' => array(\n 'actions' => array(\n 'viewed' => \"SELECT id\n FROM {log}\n WHERE course = :courseid\n AND module = 'wiki'\n AND action = 'view'\n AND cmid = :cmid\n AND userid = :userid\"\n ),\n 'defaultAction' => 'viewed'\n ),\n 'workshop' => array(\n 'defaultTime' => 'assessmentend',\n 'actions' => array(\n 'submitted' => \"SELECT id\n FROM {workshop_submissions}\n WHERE workshopid = :eventid\n AND authorid = :userid\",\n 'assessed' => \"SELECT s.id\n FROM {workshop_assessments} a, {workshop_submissions} s\n WHERE s.workshopid = :eventid\n AND s.id = a.submissionid\n AND a.reviewerid = :userid\n AND a.grade IS NOT NULL\",\n 'graded' => \"SELECT g.rawgrade\n FROM {grade_grades} g, {grade_items} i\n WHERE i.itemmodule = 'workshop'\n AND i.iteminstance = :eventid\n AND i.id = g.itemid\n AND g.userid = :userid\n AND g.finalgrade IS NOT NULL\"\n ),\n 'defaultAction' => 'submitted'\n ),\n );\n}",
"public function setModules()\n\t{\n \t//Zend_Registry::set('modules', $modules->getList());\n\t}",
"public function load_modules() {\n\t\tforeach ( $this->modules as $module_name ) {\n\t\t\t$module = $this->build( $module_name );\n\t\t\tif ( $module !== null ) {\n\t\t\t\t$module->init();\n\t\t\t}\n\t\t}\n\t}",
"function get_modules(){\n\trequire_once($_SERVER['DOCUMENT_ROOT'].\"/libs/database.php\");\n\t// consulta obtener los modulos con acceso\n\t$sql=\"select m.nombre from modulos m,permiso_modulo mp where mp.id_modulo=m.id_modulo and mp.id_permiso=(select id_permiso from personal where id_personal=?)\";\n\n\t// toma la pk del usuario y obtiene los datos\n\t$params = array($_SESSION[\"id_personal\"]);\n\t$data = Database::getRows($sql, $params);\n\t// inicia todos los modulos en false\n\t$_modules = array();\n\t// recorre los modulos a los que tiene acceso\n\tforeach($data as $row)\n\t{\n\t\t// cambia a true el elemento de array que le corresponde al modulo\n\t\t$_modules[$row[\"nombre\"]] = true;\t\n\t}\n\treturn $_modules;\n}",
"public function createModuleInstalls() {\n $strReturn = \"\";\n $strInstallLog = \"\";\n\n $objManager = new class_module_packagemanager_manager();\n\n //module-installs to loop?\n if(isset($_POST[\"moduleInstallBox\"]) && is_array($_POST[\"moduleInstallBox\"])) {\n $arrModulesToInstall = $_POST[\"moduleInstallBox\"];\n foreach($arrModulesToInstall as $strOneModule => $strValue) {\n\n //search the matching modules\n foreach($this->arrMetadata as $objOneMetadata) {\n if($strOneModule == \"installer_\".$objOneMetadata->getStrTitle()) {\n $objHandler = $objManager->getPackageManagerForPath($objOneMetadata->getStrPath());\n $strInstallLog .= $objHandler->installOrUpdate();\n }\n }\n\n }\n\n }\n\n class_objectfactory::getInstance()->flushCache();\n class_carrier::getInstance()->getObjDB()->flushQueryCache();\n class_module_system_module::flushCache();\n $this->loadInstaller();\n\n\n $this->strLogfile = $strInstallLog;\n $strReturn .= $this->getLang(\"installer_modules_found\");\n\n $strRows = \"\";\n $strTemplateID = $this->objTemplates->readTemplate(\"/core/module_installer/installer.tpl\", \"installer_modules_row\", true);\n $strTemplateIDInstallable = $this->objTemplates->readTemplate(\"/core/module_installer/installer.tpl\", \"installer_modules_row_installable\", true);\n\n //Loading each installer\n\n foreach($this->arrMetadata as $objOneMetadata) {\n\n //skip samplecontent\n if($objOneMetadata->getStrTitle() == \"samplecontent\")\n continue;\n\n $objHandler = $objManager->getPackageManagerForPath($objOneMetadata->getStrPath());\n\n $arrTemplate = array();\n $arrTemplate[\"module_name\"] = $objHandler->getObjMetadata()->getStrTitle();\n $arrTemplate[\"module_nameShort\"] = $objHandler->getObjMetadata()->getStrTitle();\n $arrTemplate[\"module_version\"] = $objHandler->getObjMetadata()->getStrVersion();\n\n //generate the hint\n $arrTemplate[\"module_hint\"] = \"\";\n\n if($objHandler->getVersionInstalled() !== null) {\n $arrTemplate[\"module_hint\"] .= $this->getLang(\"installer_versioninstalled\", \"system\").$objHandler->getVersionInstalled().\"<br />\";\n }\n\n //check missing modules\n $arrModules = $objHandler->getObjMetadata()->getArrRequiredModules();\n foreach($arrModules as $strOneModule => $strVersion) {\n if(trim($strOneModule) != \"\" && class_module_system_module::getModuleByName(trim($strOneModule)) === null) {\n\n //check if a corresponding module is available\n $objPackagemanager = new class_module_packagemanager_manager();\n $objPackage = $objPackagemanager->getPackage($strOneModule);\n\n if($objPackage === null || $objPackage->getBitProvidesInstaller() || version_compare($strVersion, $objPackage->getStrVersion(), \">\")) {\n $arrTemplate[\"module_hint\"] .= $this->getLang(\"installer_systemversion_needed\", \"system\").$strOneModule.\" >= \".$strVersion.\"<br />\";\n }\n\n }\n\n else if(version_compare($strVersion, class_module_system_module::getModuleByName(trim($strOneModule))->getStrVersion(), \">\")) {\n $arrTemplate[\"module_hint\"] .= $this->getLang(\"installer_systemversion_needed\", \"system\").$strOneModule.\" >= \".$strVersion.\"<br />\";\n }\n }\n\n\n\n\n if($objHandler->isInstallable()) {\n $strRows .= $this->objTemplates->fillTemplate($arrTemplate, $strTemplateIDInstallable);\n }\n else {\n $strRows .= $this->objTemplates->fillTemplate($arrTemplate, $strTemplateID);\n }\n\n }\n\n //wrap in form\n $strTemplateID = $this->objTemplates->readTemplate(\"/core/module_installer/installer.tpl\", \"installer_modules_form\", true);\n $strReturn .= $this->objTemplates->fillTemplate(array(\"module_rows\" => $strRows), $strTemplateID);\n\n $this->strOutput .= $strReturn;\n $this->strBackwardLink = $this->getBackwardLink(_webpath_.\"/installer.php?step=modeSelect\");\n $this->strForwardLink = $this->getForwardLink(_webpath_.\"/installer.php?step=samplecontent\");\n }",
"private function compileModList()\n {\n foreach ($this->shards as $key => $shard_data) {\n if (strpos($key, 'shard') !== FALSE && array_key_exists('activemods', $shard_data[HelperService::GAME_CONFIG]['ServerSettings']) && $shard_data[HelperService::SHARD_CONFIG]['ShardSettings']['enabled'] == '1') {\n $shard_mods = str_replace(' ', '', $shard_data[HelperService::GAME_CONFIG]['ServerSettings']['activemods']);\n isset($mods) ? $mods = $mods . ',' . $shard_mods : $mods = $shard_mods;\n }\n }\n if (isset($mods)) {\n $this->mod_list = array_unique(explode(',', $mods));\n } else {\n $this->no_mods = TRUE;\n }\n\n }",
"public function getModuleInfoQuery($pageID = NULL,$publicModulePageMapID = NULL){\n \n #if null we're loading in standard modules, get admin or public modules\n if(is_null($pageID) && is_null($publicModulePageMapID)) {\n #standard public\n if($_SESSION[\"domainID\"] > 0) {\n $pageID = -1;\n }\n #standard admin\n else{\n $pageID = -2;\n }\n }\n elseif(!is_null($pageID)){\n #get pages for the group\n include_once($_SERVER['DOCUMENT_ROOT'].\"/cmsAPI/pages/pages.php\");\n $pagesObj = new pages(false,NULL);\n \n #get this page\n $tempPage = $pagesObj->getRecordByID($pageID);\n \n #get all pages in the same group\n $x = mysqli_fetch_assoc($tempPage);\n $groupPages = $pagesObj->getConditionalRecord(\n array(\"groupID\",$x[\"groupID\"],true)\n );\n \n #turn our query into a list of ID's\n $pageID = $pagesObj->getQueryValueString($groupPages,\"priKeyID\");\n }\n \n /*set the priKeyID of public_module_page_map to the priKeyID for the query\n which ends up becoming the priKeyID property of our $priModObj object\n \n the if conditions in the select field list should make sure fields from the\n public_module_page_map overwrrite fields from the modules table\n */ \n $pageModuleQuery = '\n SELECT \n modules.*, \n public_module_page_map.*, \n public_pages.pageName AS pageName,\n public_pages.defPageURLParams AS defPageURLParams,\n public_module_page_map.priKeyID AS priKeyID,\n IF(CHAR_LENGTH(public_module_page_map.primaryPmpmAddEditID) > 0, public_module_page_map.primaryPmpmAddEditID,modules.primaryPmpmAddEditID) AS primaryPmpmAddEditID\n FROM modules\n LEFT JOIN public_module_page_map\n ON (modules.priKeyID = public_module_page_map.moduleID)\n LEFT JOIN public_pages\n ON (\n public_module_page_map.pageID = public_pages.priKeyID OR\n public_module_page_map.pageID = \"shortcode\"\n )\n WHERE ';\n \n /*getting all the modules for a page\n -1 is standard public modules\n -2 is standard admin modules*/\n \n /*FIND_IN_SET() lets us map a module to more than one page by seperating out\n the pageID's with ,'s in the public_module_page_map\n \n IN() is used to map a module to more than one groupID (for example \n for multi-lingual sites)*/\n\t\t\t$pageIDArray = explode(\",\",$pageID);\n\t\t\t$tempArray = array_values($pageIDArray);\n\t\t\t$firstValue = $tempArray[0];\n\t\t\t\n\t\t\t#know where we are while looping through the pageID's\n\t\t\t$x = 1;\n\n\n\t\t\t\tif($pageID !== NULL){\n\n\t\t\t\t\t\t$pageModuleQuery .= \n\t\t\t\t\t\t\t\" (FIND_IN_SET('\". \n\t\t\t\t\t\t\t$GLOBALS[\"mysqli\"]->real_escape_string($pageID) . \"' , public_module_page_map.pageID) \n\t\t\t\t\t\t\tOR public_module_page_map.pageID IN (\" . $GLOBALS[\"mysqli\"]->real_escape_string($pageID) . \")\n\t\t\t\t\t\t\tOR (\n\t\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\tpublic_pages.pageCode LIKE concat('%<div id=\\\"pmpmID',public_module_page_map.priKeyID,'%' ) OR\n\t\t\t\t\t\t\t\t\t\tpublic_pages.pageCode LIKE concat('%[pmpmID',public_module_page_map.priKeyID,'%' )\n\t\t\t\t\t\t\t\t\t) AND\n\t\t\t\t\t\t\t\t\tpublic_module_page_map.pageID = 'shortcode' AND\n\t\t\t\t\t\t\t\t\tpublic_pages.priKeyID IN (\" . $_SESSION[\"pageID\"] . \")\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t)\";\n\t\t\t\t\t\n\t\t\t\t}\n\n\t\t\t\n \n #used for thumbnail, moduleLevel > 1, pagination\n if($publicModulePageMapID !== NULL){\n\t\t\t\tif($pageID !== NULL){\n\t\t\t\t\t$pageModuleQuery .= \" OR \";\n\t\t\t\t}\n $pageModuleQuery .= \n \" public_module_page_map.priKeyID = '\". \n $GLOBALS[\"mysqli\"]->real_escape_string($publicModulePageMapID) . \"'\";\n }\n #if querying for a whole page\n else{\n $pageModuleQuery .= \" AND public_module_page_map.isActive = 1 \"; \n }\n #echo $pageModuleQuery;\n return $this->getCheckQuery($pageModuleQuery);\n }",
"public static function init(){\n self::$language = config::getMainIni('language');\n\n $system_lang = array();\n $db = new db();\n $system_language = $db->select(\n 'language',\n 'language',\n config::$vars['coscms_main']['language']\n );\n\n // create system lanugage for all modules\n if (!empty($system_language)){\n foreach($system_language as $key => $val){\n $module_lang = unserialize($val['translation']);\n $system_lang+= $module_lang;\n }\n } \n self::$dict = $system_lang;\n }",
"protected function module_form_data_to_row($data) {\n\t\tif ( empty($data) ) {\n\t\t\treturn $data;\n\t\t}\n\n\t\t// make emails lowercase and trimmed\n $data['email'] = trim( strtolower($data['email']) );\n\n $data['global_perm'] = Permission::to_decimal($data['global_perm']);\n\t\tif ( isset($data['modules']) ) {\n\t\t $modules = self::$MODULES;\n $module_perms = is_array($data['modules']) && isset($data['modules'][0]) ? $data['modules'][0] : $data['modules'];\n $indep_ids = array();\n $args = array();\n foreach ($module_perms as $name => $perm) {\n if ( isset($modules[$name]) ) {\n $id = $modules[$name]['id'];\n $indep_ids[] = $id;\n $args[$id] = Permission::to_decimal($perm);\n }\n }\n $data['modules'] = $indep_ids;\n $data['modules_args'] = $args;\n }\n\n\t\treturn $data;\n\t}",
"protected static function addModuleConfigurationsToDb()\n {\n static::_addMainConfigurationEntries();\n static::_addCredentialsConfigurationEntries();\n static::_addTransactionsConfigurationEntries();\n static::_addWpfConfigurationEntries();\n static::_addOrderConfigurationEntries();\n static::_addThreedsOptions();\n static::_addScaExemptionOptions();\n }",
"private function load_module($mod)\n\t{\n\t\t$app\t\t= Factory::getApplication();\n\t\t$user\t\t= Factory::getUser();\n\t\t$groups\t\t= implode(',', $user->getAuthorisedViewLevels());\n\t\t$lang \t\t= Factory::getLanguage()->getTag();\n\t\t$clientId \t= (int) $app->getClientId();\n\n\t\t$db\t= Factory::getDbo();\n\t\t$query = $db->getQuery(true);\n\t\t$query->select('m.id, m.title, m.module, m.position, m.content, m.showtitle, m.params');\n\t\t$query->from('#__modules AS m');\n\t\t$query->where('m.published = 1');\n\t\t$query->where('m.id = ' . $mod);\n\n\t\tif (is_numeric($mod))\n\t\t{\n\t\t\t$query->where('m.id = ' . $mod);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$query->where('m.position = \"' . $mod . '\"');\n\t\t}\n\n\t\t$date = Factory::getDate();\n\t\t$now = $date->toSql();\n\t\t$nullDate = $db->getNullDate();\n\n\t\t$query->where('(m.publish_up IS NULL OR m.publish_up = ' . $db->Quote($nullDate) . ' OR m.publish_up <= ' . $db->Quote($now) . ')');\n\t\t$query->where('(m.publish_down IS NULL OR m.publish_down = ' . $db->Quote($nullDate) . ' OR m.publish_down >= ' . $db->Quote($now) . ')');\n\t\t$query->where('m.access IN (' . $groups . ')');\n\t\t$query->where('m.client_id = ' . $clientId);\n\n\t\t// Filter by language\n\t\tif ($app->isClient('site') && $app->getLanguageFilter())\n\t\t{\n\t\t\t$query->where('m.language IN (' . $db->Quote($lang) . ',' . $db->Quote('*') . ')');\n\t\t}\n\n\t\t$query->order('position, ordering');\n\n\t\t// Set the query\n\t\t$db->setQuery($query);\n\n\t\t$modules = $db->loadObjectList();\n\n\t\tif (!$modules) return null;\n\n\t\t$options = array('style' => 'sp_xhtml');\n\t\t$output = '';\n\t\tob_start();\n\t\t\n\t\tforeach ($modules as $module)\n\t\t{\n\t\t\t$file\t\t\t\t= $module->module;\n\t\t\t$custom\t\t\t\t= substr($file, 0, 4) == 'mod_' ? 0 : 1;\n\t\t\t$module->user\t\t= $custom;\n\t\t\t$module->name\t\t= $custom ? $module->title : substr($file, 4);\n\t\t\t$module->style\t\t= null;\n\t\t\t$module->client_id = 1;\n\t\t\t$module->position\t= strtolower($module->position);\n\t\t\t$clean[$module->id]\t= $module;\n\t\t\techo ModuleHelper::renderModule($module, $options);\n\t\t}\n\n\t\t$output = ob_get_clean();\n\t\treturn $output;\n\t}",
"public function\n\tgetAvailableModules() : array\n\t{\n\t\t$moduleList_core \t= [];\n\t\t$moduleList_mantle \t= [];\n\n\t\t$procPath = CMS_SERVER_ROOT . DIR_CORE . DIR_MODULES;\n\n\t\tif(file_exists($procPath))\n\t\t{ \n\t\t\t$_dirIterator \t= new DirectoryIterator($procPath);\n\t\t\tforeach($_dirIterator as $_dirItem)\n\t\t\t{\n\t\t\t\tif($_dirItem -> isDot() || $_dirItem -> getType() !== 'dir')\n\t\t\t\t\tcontinue;\n\n\t\t\t\t$directory = $_dirItem -> getFilename();\n\n\t\t\t\tif($directory[0] === '.')\n\t\t\t\t\tcontinue;\n\n\t\t\t\t$moduleFilepath = $procPath . $directory .'/module.json'; \n\n\t\t\t\t$moduleConfig\t= file_get_contents($moduleFilepath);\n\n\t\t\t\tif($moduleConfig === false)\n\t\t\t\t\tcontinue;\n\n\t\t\t\t$moduleConfig = json_decode($moduleConfig);\n\n\t\t\t\t// Determine Scheme\n\n\t\t\t\t$pModulesInstall = new CModulesInstall;\n\n\t\t\t\t$moduleData = $pModulesInstall -> getModuleData($moduleConfig, $directory, 'core');\n\n\t\t\t\tif($moduleData === false)\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$moduleData = json_decode(json_encode($moduleData));\n\n\t\t\t\t$moduleData -> module -> module_location = $directory;\n\n\t\t\t\t$moduleList_core[]\t= $moduleData;\n\t\t\t}\n\t\t}\n\n\t\t$procPath = CMS_SERVER_ROOT . DIR_MANTLE . DIR_MODULES;\n\n\t\tif(file_exists($procPath))\n\t\t{ \n\t\t\t$_dirIterator \t= new DirectoryIterator($procPath);\n\t\t\tforeach($_dirIterator as $_dirItem)\n\t\t\t{\n\t\t\t\tif($_dirItem -> isDot() || $_dirItem -> getType() !== 'dir')\n\t\t\t\t\tcontinue;\n\n\t\t\t\t$directory = $_dirItem -> getFilename();\n\n\t\t\t\tif($directory[0] === '.')\n\t\t\t\t\tcontinue;\n\n\t\t\t\t$moduleFilepath = $procPath . $directory .'/module.json'; \n\n\t\t\t\t$moduleConfig\t= file_get_contents($moduleFilepath);\n\n\t\t\t\tif($moduleConfig === false)\n\t\t\t\t\tcontinue;\n\n\t\t\t\t$moduleConfig = json_decode($moduleConfig);\n\n\t\t\t\t// Determine Scheme\n\n\t\t\t\t$pModulesInstall = new CModulesInstall;\n\n\t\t\t\t$moduleData = $pModulesInstall -> getModuleData($moduleConfig, $directory, 'mantle');\n\n\t\t\t\tif($moduleData === false)\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$moduleData = json_decode(json_encode($moduleData));\n\n\t\t\t\t$moduleData -> module -> module_location = $directory;\n\n\t\t\t\t$moduleList_mantle[]\t= $moduleData;\n\t\t\t}\n\t\t}\n\n\t\t$availableList = [];\n\n\t\tforeach($moduleList_core as $dirModuleKey => $dirModuleItem)\n\t\t{\n\t\t\t$moduleInstalled = false;\n\n\n\t\t\tif(!isset($dirModuleItem -> module -> module_controller))\n\t\t\t{\n\t\t\t\t#tk::dbug($dirModuleItem);\n\n\t\t\t\t// aaaooohhh well ... this should not be\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tforeach($this -> modulesList as $listItem)\n\t\t\t{\n\t\t\t\tif($listItem -> module_controller === $dirModuleItem -> module -> module_controller)\n\t\t\t\t{\n\t\t\t\t\t$moduleInstalled = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif($moduleInstalled)\n\t\t\t\tcontinue;\n\n\t\t#\t$dirModuleItem -> module_type = \"core\";\n\n\t\t\t$availableList[] = $dirModuleItem;\n\t\t}\n\n\t\tforeach($moduleList_mantle as $dirModuleKey => $dirModuleItem)\n\t\t{\n\t\t\t$moduleInstalled = false;\n\n\t\t\tforeach($this -> modulesList as $listItem)\n\t\t\t{\n\t\t\t\tif($listItem -> module_controller === $dirModuleItem -> module -> module_controller)\n\t\t\t\t{\n\t\t\t\t\t$moduleInstalled = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($moduleInstalled)\n\t\t\t\tcontinue;\n\n\t\t#\t$dirModuleItem -> module_type \t\t= \"mantle\";\n\n\t\t\t$availableList[] = $dirModuleItem;\n\t\t}\n\n\n\t\treturn $availableList;\n\t}",
"function moduleData($mod, $core=true){\n\n\t$folder = ($core) ? '/app/module' : '/user/module';\n\t$config = KROOT.$folder.'/'.$mod.'/config/config.xml';\n\n\tif(!file_exists($config)) return false;\n\n\t$doc = new DOMDocument();\n\t$doc->preserveWhiteSpace = false;\n\t$doc->load($config);\n\n\t$module\t= array('folder' => $mod);\n\t$xpath \t= new DOMXPath($doc);\n\n\t$data = $xpath->query('/element/data')->item(0)->childNodes;\n\tif($data->length > 0){\n\t\tforeach($data as $e){\n\t\t\t$module[$e->nodeName] = utf8_decode($e->nodeValue);\n\t\t#\t$module[$e->nodeName] = $e->nodeValue;\n\t\t}\n\t}\n\n\t$less = $xpath->query('/element/less')->item(0)->childNodes;\n\tif($less->length > 0){\n\t\tforeach($less as $e){\n\t\t\t$module['less'][] = $folder.'/'.$mod.utf8_decode($e->nodeValue);\n\t\t#\t$module['less'][] = $folder.'/'.$mod.$e->nodeValue;\n\t\t}\n\t}\n\t\n\t$module['menu'] = ($module['menu'] != '') ? $module['menu'] : 'YES';\n\n\t$settings = $xpath->query('/element/profile/item');\n\tif($settings->length > 0){\n\t\tforeach($settings as $set){\n\t\t\t$module['profile'][] = array(\n\t\t\t\t'code' => $set->getAttributeNode('code')->nodeValue,\n\t\t\t\t'type' => $set->getAttributeNode('type')->nodeValue,\n\t\t\t\t'name' => $set->getAttributeNode('name')->nodeValue\n\t\t\t);\n\t\t}\n\t}\n\n\t$dependencies = $xpath->query('//element/dependencies/module');\n\tif($dependencies->length > 0){\n\t\tforeach($dependencies as $dep){\n\t\t\t$module['dependencies'][] = $dep->nodeValue;\n\t\t}\n\t}\n\n\t$module['needPatch']\t= file_exists(KROOT.$folder.'/'.$mod.'/config/patch-todo.xml');\n\t$module['rePatch']\t\t= file_exists(KROOT.$folder.'/'.$mod.'/config/patch-done.xml');\n\t$module['isCore']\t\t= $core;\n\n\tif($module['panelIcon'] == ''){\n\t\t$module['panelIcon'] = NULL;\n\t}else{\n\t\t$module['panelIcon'] = $this->helperReplace($module['panelIcon'], array(\n\t\t\t'moduleFolder' => $mod,\n\t\t));\n\t}\n\t\n\t$config = $this->dbMulti(\"\n\t\tSELECT configName, configValue\n\t\tFROM k_config\n\t\tWHERE configName NOT LIKE 'jsonCache%' AND configModule='\".basename($mod).\"'\"\n\t);\n\n\t$module['config'] = array();\n\tif(sizeof($config) > 0){\n\t\tforeach($config as $e){\n\t\t\t$v = $e['configValue'];\n\t\t\t$module['config'][$e['configName']] = $v;\n\t\t}\n\t}\n\t\n\n\treturn $module;\n}",
"public function getMenuModule() {\r\n\r\n $sql = $this->db->query(\"SELECT * FROM ms_user_role LEFT JOIN ms_role_det ON\"\r\n . \" userro_roleid = roledet_roleid LEFT JOIN ms_menu ON menuid = roledet_menuid\"\r\n . \" WHERE menu_parent_id = -1 AND userro_krid = '\" . ses_krid . \"' ORDER BY menu_urut ASC\");\r\n if ($sql->num_rows() > 0) {\r\n return $sql->result_array();\r\n }\r\n return null;\r\n }",
"public function getModuleList(){\n $qb = $this->createQueryBuilder();\n $qb->module('system')->query('modulelistnames');\n return $this->execute($qb);\n }",
"protected function blankModule(): array\n {\n return [\n BswModule\\Menu\\Module::class => ['sort' => Abs::MODULE_MENU_SORT],\n BswModule\\Header\\Module::class => ['sort' => Abs::MODULE_HEADER_SORT],\n BswModule\\Crumbs\\Module::class => ['sort' => Abs::MODULE_CRUMBS_SORT, 'crumbs' => $this->crumbs],\n BswModule\\Tabs\\Module::class => ['sort' => Abs::MODULE_TABS_SORT],\n BswModule\\Welcome\\Module::class => ['sort' => Abs::MODULE_WELCOME_SORT],\n BswModule\\Operate\\Module::class => ['sort' => Abs::MODULE_OPERATE_SORT],\n BswModule\\Footer\\Module::class => ['sort' => Abs::MODULE_FOOTER_SORT],\n BswModule\\Modal\\Module::class => ['sort' => Abs::MODULE_MODAL_SORT],\n BswModule\\Drawer\\Module::class => ['sort' => Abs::MODULE_DRAWER_SORT],\n BswModule\\Result\\Module::class => ['sort' => Abs::MODULE_RESULT_SORT],\n ];\n }",
"public function uultra_modules_deactivate_activate_membership()\r\n\t{\r\n\t\t$module_list = array();\r\n\t\t$modules = $_POST[\"modules_list\"]; \r\n\t\t$package_id = $_POST[\"package_id\"]; \r\n\t\t\r\n\t\t\r\n\t\tif($modules!=\"\")\r\n\t\t{\r\n\t\t\t$modules =rtrim($modules,\"|\");\r\n\t\t\t$module_list = explode(\"|\", $modules);\t\t\t\r\n\t\t\t$modules_disalowed = serialize($module_list);\r\n\t\t\r\n\t\t}\r\n\t\t\r\n\t\tprint_r($module_list);\r\n\t\t\t\t\r\n\t\t//update custom\t\t\r\n\t\t$defaultmodules = $this->uultra_get_modules_for_membership($package_id);\r\n\t\t\r\n\t\t//user menu modules\r\n\t\t$user_menu_modules = $this->uultra_get_user_navigator_for_membership($package_id);\r\n\t\t\r\n\t\t//user menu modules added by admin\r\n\t\t$user_menu_modules_by_admin = $this->uultra_get_custom_modules_for_membership($package_id);\r\n\t\t\r\n\t\t$html = '';\r\n\t\t\r\n\t\t$modules_array = array();\r\n\t\t$i = 1;\r\n\t\tforeach($defaultmodules as $key => $module)\r\n\t\t{\r\n\t\t\tif(!$this->check_if_in_deactivate_array($module_list, $key))\r\n\t\t\t{\r\n\t\t\t\t//if (strpos($modules,$key) !== true) {\r\n\t\t\t\t\t\r\n\t\t\t\t//set position and custom settings\t\t\t\t\t\t\t\r\n\t\t\t\tif(isset($user_menu_modules[$key]))\r\n\t\t\t\t{\r\n\t\t\t\t\t$module[\"position\"] = $i;\r\n\t\t\t\t\r\n\t\t\t\t}else{\r\n\t\t\t\t\t\r\n\t\t\t\t\t$module[\"position\"] = $i;\r\n\t\t\t\t\r\n\t\t\t\t}\t\t\r\n\t\t\t\t\r\n\t\t\t\t$modules_array[$key] = $module;\t\t\t\t\t\t\t\r\n\t\t\t\t$i++;\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\t\r\n\t\t\t\techo \"disallowed: \" . $key;\r\n\t\t\t\t\r\n\t\t\t}\t\r\n\t\t\r\n\t\t}\r\n\t\t\r\n\t\tif(is_array($user_menu_modules_by_admin) && $user_menu_modules_by_admin!=\"\")\r\n\t\t{\r\n\t\t\t\r\n\t\t\t$modules_array = $modules_array + $user_menu_modules_by_admin;\t\t\r\n\t\t}\r\n\t\tprint_r($modules_array);\r\n\t\tupdate_option('userultra_default_user_features_custom_package_'.$package_id.'',$modules_array);\t\t\t\t\t\r\n\t\tupdate_option('uultra_excluded_user_modules_package_'.$package_id.'',$modules_disalowed);\r\n\t\tdie();\r\n\t\r\n\t}",
"public static function getModulesInfo($modules) {\n foreach ($modules as $key => $val) {\n $ret = self::getModuleInfo($val); \n if (!$ret) {\n common::echoStatus('NOTICE', 'y', \"We could not find any legel git repo for module $val[module_name]\");\n unset($modules[$key]);\n }\n $modules[$key] = $ret; \n }\n return $modules;\n }",
"public function getMapXLS_SQL(){\n \n if(array_key_exists($this->itemType, $this->parentMap)){\n $revArray=array_flip($this->parentMap[$this->itemType]);\n return $revArray;\n }\n else{\n return \"Error: Invalid item type \".$this->itemType;\n }\n }",
"function get_mdlmodule_infos($moduleid){\n\n $DB=$GLOBALS['GLBMDL_DB'];\n $module_infos=new stdClass();\n try {\n\n $module_infos= $DB->get_record('course_modules', array('id' =>$moduleid));\n $resource_course_infos=new stdClass();\n $resource_course_infos=get_course_infos($module_infos->course, $DB);\n\n $module_infos=$resource_course_infos->course_modules[$moduleid];\n $module_infos->course_gen_infos = $resource_course_infos->course_gen_infos ;\n $module_infos->course_cat_infos = $resource_course_infos->course_cat_infos ;\n\n\n } catch (\\Exception $e) {\n //$module_infos->course_gen_infos = 'Resource not existant. Verify your request or contact Univ-Nantes Admin.';\n return $e;\n echo \"Exception occurred\";\n }\n\n //Clean function to 'mustRenderedX5gonInfos' must be applied here.\n return cleanresponse_resource_infos($module_infos);\n\n }",
"public function __construct($fieldsObjectOrArray)\r\n {\r\n \r\n parent::__construct($fieldsObjectOrArray);\r\n $this->mExtraTable = 'modules';\r\n $this->mContentType = 'MODULE'; \r\n $this->mExtraFieldDescriptions = array( \r\n \t'modules_php_class' => array('type'=>'varchar', 'label'=> 'PHP Class') , \r\n 'modules_json_params' => array('type'=>'varchar', 'label'=> 'JSON Params') ,\r\n 'modules_body' => array('type'=>'varchar', 'label'=> 'BOdy') ,\r\n 'modules_site_code' => array('type'=>'varchar', 'label'=> 'site code') ,\r\n ); \r\n }",
"public function loadModuleData() {}",
"public function modules()\n {\n $this->load->model('Basic_model');\n $filepath = dirname(__FILE__) . '/modules.txt';\n $myfile = fopen($filepath, \"r\") or die(\"Unable to open file!\");\n $modules = fread($myfile, filesize($filepath));\n $arr = explode(',', $modules);\n foreach ($arr as $value) {\n $data = [\n 'role_id' => 10,\n 'module_id' => $this->get_cat_id($value, 'modules'),\n ];\n // $this->Basic_model->insert('roles_modules', $data);\n }\n fclose($myfile);\n }",
"function getConnectorModules() {\n $sql = \"SELECT module_guid, module_class, module_type\n FROM %s\n WHERE module_type = 'connector'\n AND module_guid != '79f18e7c40824a0f975363346716ff62'\n ORDER BY module_class ASC\";\n $sqlParams = array($this->tableModules);\n $result = array();\n if ($res = $this->databaseQueryFmt($sql, $sqlParams)) {\n while ($row = $res->fetchRow(DB_FETCHMODE_ASSOC)) {\n $result[$row['module_guid']] = $row['module_class'];\n }\n }\n return $result;\n }",
"private function _processModuleDefaults()\n\t{\n\t\t$new_local_defaults = array();\n\t\t\n\t\t//local default file\n\t\t$local_default_module_file = DIR_SECURE_INI.'/site_module_local_defaults.ini';\n\t\t\n\t\t//load the site ini file\n\t if(is_file(DIR_SECURE_INI.'/site_module_config.ini'))\n\t {\n\t \t$a_site_module_config = parse_ini_file(DIR_SECURE_INI.'/site_module_config.ini',true); \n\t } elseif (is_file(DIR_IOW_APP_INI.'/site_module_config.ini')) {\n\t \t$a_site_module_config = parse_ini_file(DIR_IOW_APP_INI.'/site_module_config.ini',true); \n\t } else {\n\t \t$msg = 'The INI file site_module_config can not be found anywhere!';\n\t \tthrow new \\RuntimeException($msg); \n\t }\n\t \n\t //load the local defaults that overwrite the preset defaults\n \tif(is_file($local_default_module_file))\n\t {\n\t \t$local_defaults = parse_ini_file($local_default_module_file,true);\n\t \t\n\t \tforeach($local_defaults as $local_name => $local_info)\n\t \t{\n\t\t \t$overwrite_defaults[$local_name] = $local_info;\n\t \t}\n\t }\n\t \n\t //key sort \n\t ksort($a_site_module_config);\n\t \n\t foreach($_POST as $key => $value)\n\t {\n\t\t $posted[$key] = $value;\n\t }\n\t \n\t //load the system defaults for each module\n \tforeach ($a_site_module_config as $moduleName => $info)\n \t{\n\t\t\t//DIR_IOW_MODULES\n\t\t\tif(is_file(DIR_MODULES.'/'.$moduleName.'/defaults.ini')) {\n\t\t\t\t//DIR_IOW_MODULES\n\t\t \t$module_defaults = parse_ini_file(DIR_MODULES.'/'.$moduleName.'/defaults.ini',true);\n\t\t \t\n\t\t \tforeach($module_defaults as $default_name => $default_info)\n\t\t \t{\n\t\t\t \t$all_defaults[$default_name] = $default_info['default'];\n\t\t\t \t\n\t\t\t \tif(isset($posted[$default_name]) && $posted[$default_name] != $all_defaults[$default_name] )\n\t\t\t \t{\n\t\t\t\t \t$new_local_defaults[$default_name] = $posted[$default_name];\n\t\t\t \t} else {\n\t\t\t\t \t$new_local_defaults[$default_name] = $all_defaults[$default_name];\n\t\t\t \t}\n\t\t \t} \n\t\t } \n\t }\n\t \n\t $this->_iniProcess = new \\core\\app\\classes\\ini\\write_ini();\n\t \n\t if(!$this->_iniProcess->write_php_ini($new_local_defaults, $local_default_module_file))\n\t\t{\n\t\t\t$this->_content_a['error_a']['ERROR - DEFAULT MODOULE'] = \"There was a problem with the site config file {$local_default_module_file}\";\n\t\t}\n\n\t\treturn;\n\t}",
"public function prepare_data()\n {\n $schedules = wp_get_schedules();\n foreach ($schedules as $key => $data) {\n $scheds['internal_name'] = $key;\n $scheds = array_merge($scheds, $data);\n $modscheds[] = $scheds;\n }\n return $modscheds;\n }",
"function usp_ews_get_active_monitorable_modules() {\n global $DB;\n\n\t$fields = 'name';\n\t$active_site_modules = array();\n\t\n\t// get records of modules thoses are activve in site level\n\t$active_site_modules_records = $DB->get_records('modules', array('visible'=>'1'), '', $fields);\n\t\n\tforeach ($active_site_modules_records as $usp_ews_module=>$details) {\n\t\t$active_site_modules[] = $details->name;\n\t}\n\t\n\t$monitored_modules = usp_ews_get_monitorable_modules();\n\n\tforeach ($monitored_modules as $modules=>$detail) {\n\t\tif(!in_array($modules, $active_site_modules))\t{\n\t\t\tunset($monitored_modules[$modules]);\n\t\t}\n\t}\n\n\treturn $monitored_modules;\n}",
"function xh_finalModules()\r\n\t{\r\n\t}",
"function deactivate_custom_modules()\n{\n $db = Db::getInstance();\n $modulesDirOnDisk = [];\n $modules = scandir(_PS_MODULE_DIR_, SCANDIR_SORT_NONE);\n foreach ($modules as $name) {\n if (!in_array($name, ['.', '..', 'index.php', '.htaccess']) && @is_dir(_PS_MODULE_DIR_ . $name . DIRECTORY_SEPARATOR) && @file_exists(_PS_MODULE_DIR_ . $name . DIRECTORY_SEPARATOR . $name . '.php')) {\n if (!preg_match('/^[a-zA-Z0-9_-]+$/', $name)) {\n exit(Tools::displayError() . ' (Module ' . $name . ')');\n }\n $modulesDirOnDisk[] = $name;\n }\n }\n\n $module_list_xml = _PS_ROOT_DIR_ . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'xml' . DIRECTORY_SEPARATOR . 'modules_list.xml';\n\n if (!file_exists($module_list_xml)) {\n $module_list_xml = _PS_ROOT_DIR_ . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'modules_list.xml';\n if (!file_exists($module_list_xml)) {\n return false;\n }\n }\n\n $nativeModules = @simplexml_load_file($module_list_xml);\n if ($nativeModules) {\n $nativeModules = $nativeModules->modules;\n }\n $arrNativeModules = [];\n if (!empty($nativeModules)) {\n foreach ($nativeModules as $nativeModulesType) {\n if (in_array($nativeModulesType['type'], ['native', 'partner'])) {\n $arrNativeModules[] = '\"\"';\n foreach ($nativeModulesType->module as $module) {\n $arrNativeModules[] = '\"' . pSQL($module['name']) . '\"';\n }\n }\n }\n }\n $arrNonNative = [];\n if ($arrNativeModules) {\n $arrNonNative = $db->executeS('\n \t\tSELECT *\n \t\tFROM `' . _DB_PREFIX_ . 'module` m\n \t\tWHERE name NOT IN (' . implode(',', $arrNativeModules) . ') ');\n }\n\n $uninstallMe = ['undefined-modules'];\n if (is_array($arrNonNative)) {\n foreach ($arrNonNative as $k => $aModule) {\n $uninstallMe[(int) $aModule['id_module']] = $aModule['name'];\n }\n }\n\n if (!is_array($uninstallMe)) {\n $uninstallMe = [$uninstallMe];\n }\n\n foreach ($uninstallMe as $k => $v) {\n $uninstallMe[$k] = '\"' . pSQL($v) . '\"';\n }\n\n $return = Db::getInstance()->execute('\n\tUPDATE `' . _DB_PREFIX_ . 'module` SET `active` = 0 WHERE `name` IN (' . implode(',', $uninstallMe) . ')');\n\n if (count(Db::getInstance()->executeS('SHOW TABLES LIKE \\'' . _DB_PREFIX_ . 'module_shop\\'')) > 0) {\n foreach ($uninstallMe as $k => $uninstall) {\n $return &= Db::getInstance()->execute('DELETE FROM `' . _DB_PREFIX_ . 'module_shop` WHERE `id_module` = ' . (int) $k);\n }\n }\n\n return $return;\n}",
"function loadSubModules()\n{\n $debug_prefix = debug_indent(\"Module->loadSubModules() {$this->ModuleID}:\");\n $submodule_elements = $this->_map->selectChildrenOfFirst('SubModules', null, null, true, true);\n if(count($submodule_elements) > 0){\n foreach($submodule_elements as $submodule_element){\n $submodule = $submodule_element->createObject($this->ModuleID);\n $subModuleID = $submodule_element->getAttr('moduleID', true);\n $this->SubModules[$subModuleID] = $submodule;\n print \"$debug_prefix Submodule $subModuleID parsed.\\n\";\n unset($submodule);\n }\n\n //special for best practices: add the IsBestPractice SummaryField\n if(isset($this->SubModules['bpc'])){\n $this->useBestPractices = true;\n $recordIDField = end($this->PKFields);\n\n $field_object = MakeObject(\n $this->ModuleID,\n 'IsBestPractice',\n 'SummaryField',\n array(\n 'name' => 'IsBestPractice',\n 'type' => 'tinyint',\n 'summaryFunction' => 'count',\n 'summaryField' => 'BestPracticeID',\n 'summaryKey' => 'RelatedRecordID',\n 'summaryModuleID' => 'bpc',\n 'localKey' => $recordIDField,\n 'phrase' => 'Is Best Practice|Whether the associated record is a best practice'\n )\n );\n//print \"best practice auto field\";\n//print_r($field_object);\n//die();\n $this->ModuleFields['IsBestPractice'] = $field_object;\n }\n\n //copies submodule conditions to summary fields\n foreach($this->ModuleFields as $fieldName => $field){\n if('summaryfield' == strtolower(get_class($field))){\n if(!$field->isGlobal){\n\n if(isset($this->SubModules[$field->summaryModuleID])){\n $subModule =& $this->SubModules[$field->summaryModuleID];\n if(count($subModule->conditions) > 0){\n //$field->conditions = $subModule->conditions;\n $field->conditions = array_merge($subModule->conditions, (array)$field->conditions);\n $this->ModuleFields[$fieldName] = $field;\n }\n unset($subModule);\n } else {\n trigger_error(\"The summaryfield '{$field->name}' requires a '{$field->summaryModuleID}' submodule.\", E_USER_ERROR);\n }\n }\n }\n }\n }\n debug_unindent();\n}",
"public function uultra_reload_user_modules_membership()\r\n\t{\r\n\t\t$package_id = $_POST[\"package_id\"];\t\t\r\n\t\t$modules = $this->uultra_get_modules_for_membership($package_id);\t\t\t\r\n\t\t\r\n\t\t$html = '';\r\n\t\tforeach($modules as $key => $module)\r\n\t\t{\r\n\t\t\t$checked = '';\t\t\t\r\n\t\t\t\r\n\t\t\tif ($this->check_if_disallowed_array_membership($key, $package_id))\r\n\t\t\t{\r\n\t\t\t\t$checked = 'checked=\"checked\"';\r\n\t\t\t}\t\t\t\t\r\n\t\t\t\r\n\t\t\t$html .= '<li class=\"uultra-profile-widget rounded\" id=\"'.$key.'\"><input name=\"uultra-modules[]\" type=\"checkbox\" value=\"'.$key.'\" class=\"uultra-my-modules-checked\" '.$checked.'/><label for=\"checkbox1\"><span></span>'.$module[\"title\"].'</label></li>';\r\n\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\techo $html;\r\n\t\tdie();\r\n\t\t\r\n\t}",
"private function setValues()\n {\n foreach($this->data as $type => $values)\n if(!preg_match('/(library)/i', $type))\n foreach($values as $key => $value)\n $this->{strtolower($type)}[$key] = $value;\n }",
"public function mappingAction(){\n\t\t$params = $this->_request->getParams();\n $rows = array();\n\t\t\n foreach ($params['text00'] as $key => $val) {\n if (($key > 0) && ($params['tChange'][$key])) {\n\t\t\t\t$rows[$key]['CHANGE'] \t= $params['tChange'][$key]; // CHANGE\n\t\t\t\t$rows[$key]['ROW_ID'] \t= $params['text00'][$key]; // ROW ID\n\t\t\t\t$rows[$key]['PERIOD_BUDGET'] = $params['text02'][$key]; // PERIOD_BUDGET\n\t\t\t\t$rows[$key]['BA_CODE'] \t\t= $params['text03'][$key]; // BA_CODE\n\t\t\t\t$rows[$key]['ROTASI'] \t\t= $params['text09'][$key]; // ROTASI\n\t\t\t\t$rows[$key]['DOSIS'] \t= $params['text10'][$key]; // DOSIS\n\t\t\t\t$rows[$key]['PRICE'] \t\t= $params['text12'][$key]; // PRICE\n\t\t\t\t\n\t\t\t\t//deklarasi var utk inherit module\n\t\t\t\t$rows[$key]['key_find'] \t\t= $params['text03'][$key]; // BA_CODE\n }\n }\n\t\treturn $rows;\n\t}",
"public function prepareDataModules($inputData) {\n\t\t\t$data = array();\n\t\t\t$modules = array_values($inputData);\n\n\t\t\t$items = array();\n\t\t\tforeach($modules as $module_name) {\n\t\t\t\t$item_arr = array();\n\t\t\t\t$item_arr['attribute:label'] = getLabel('module-' . $module_name);\n\t\t\t\t$item_arr['node:module'] = $module_name;\n\t\t\t\t$items[] = $item_arr;\n\t\t\t}\n\n\t\t\t$data['nodes:module'] = $items;\n\t\t\treturn $data;\n\t\t}",
"function filter_dash_modules( $modules ) {\n \n $modules[] = 'My Tickets';\n \n //currently not using this\n //$this->add_template( 'dash_latesttickets', dirname( __FILE__ ) . '/dash_latesttickets.php' );\n \n return $modules;\n }",
"function prepareFields() {\r\n\t\t$data = array_keys($this->modx->getFieldMeta('msProductData'));\r\n\t\tforeach ($this->resourceArray as $k => $v) {\r\n\t\t\tif (is_array($v) && in_array($k, $data)) {\r\n\t\t\t\t$tmp = $this->resourceArray[$k];\r\n\t\t\t\t$this->resourceArray[$k] = array();\r\n\t\t\t\tforeach ($tmp as $v2) {\r\n\t\t\t\t\tif (!empty($v2)) {\r\n\t\t\t\t\t\t$this->resourceArray[$k][] = array('value' => $v2);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (empty($this->resourceArray['vendor'])) {\r\n\t\t\t$this->resourceArray['vendor'] = '';\r\n\t\t}\r\n\t}",
"public function init_modules() {\n\n\t\tif ( wp_doing_ajax() ) {\n\t\t\t$this->maybe_load_module_on_ajax();\n\t\t} else {\n\t\t\t$this->maybe_load_module();\n\t\t}\n\t}",
"function getColumnsListbyBlock($module,$block)\n\t{\n\t\tglobal $adb;\n\t\t$tabid = getTabid($module);\n\t\tglobal $current_user;\n\t\t\n\t\t$sql = \"select ec_field.* from ec_field INNER JOIN ec_def_org_field ON ec_def_org_field.fieldid=ec_field.fieldid AND ec_def_org_field.visible=0\";\n\t\t$sql.= \" where ec_field.tabid=\".$tabid.\" and ec_field.block in (\".$block.\") and\";\n\t\t$sql.= \" ec_field.displaytype in (1,2) union select ec_field.* from ec_field where ec_field.displaytype=3 and ec_field.block in (\".$block.\") and ec_field.tabid=\".$tabid;\n\t\t$sql.= \" order by sequence\";\n\t\t$result = $adb->query($sql);\n\t\t$noofrows = $adb->num_rows($result);\n\t\t//Added on 14-10-2005 -- added ticket id in list\n\t\t/*\n\t\tchanged by dingjianting on 2008-07-31 for delete ticket id in listview and Fenzu\n\t\tif($module == 'HelpDesk' && $block == 25)\n\t\t{\n\t\t\t$module_columnlist['ec_crmentity:crmid::HelpDesk_Ticket_ID:I'] = 'Ticket ID';\n\t\t}\n\t\t*/\n\t\t//Added to include ec_activity type in ec_activity ec_fenzu list\n\t\tif($module == 'Calendar' && $block == 19)\n\t\t{\n\t\t\t$module_columnlist['ec_activity:activitytype:activitytype:Calendar_Activity_Type:C'] = 'Activity Type';\n\t\t}\n\n\t\tfor($i=0; $i<$noofrows; $i++)\n\t\t{\n\t\t\t$fieldtablename = $adb->query_result($result,$i,\"tablename\");\n\t\t\t$fieldcolname = $adb->query_result($result,$i,\"columnname\");\n\t\t\t$fieldname = $adb->query_result($result,$i,\"fieldname\");\n\t\t\t$fieldtype = $adb->query_result($result,$i,\"typeofdata\");\n\t\t\t$fieldtype = explode(\"~\",$fieldtype);\n\t\t\t$fieldtypeofdata = $fieldtype[0];\n\t\t\t$fieldlabel = $adb->query_result($result,$i,\"fieldlabel\");\n\t\t\tif($fieldlabel == \"Related To\")\n\t\t\t{\n\t\t\t\t$fieldlabel = \"Related to\";\n\t\t\t}\n\t\t\tif($fieldlabel == \"Start Date & Time\")\n\t\t\t{\n\t\t\t\t$fieldlabel = \"Start Date\";\n\t\t\t\tif($module == 'Calendar' && $block == 19)\n\t\t\t\t\t$module_columnlist['ec_activity:time_start::Calendar_Start_Time:I'] = 'Start Time';\n\n\t\t\t}\n\t\t\t$fieldlabel1 = str_replace(\" \",\"_\",$fieldlabel);\n\t\t\t$optionvalue = $fieldtablename.\":\".$fieldcolname.\":\".$fieldname.\":\".$module.\"_\".$fieldlabel1.\":\".$fieldtypeofdata;\n\t\t\t//added to escape attachments fields in Fenzu as we have multiple attachments\n\t\t\tif($module != 'HelpDesk' || $fieldname !='filename')\n\t\t\t\t$module_columnlist[$optionvalue] = $fieldlabel;\n\t\t\tif($fieldtype[1] == \"M\")\n\t\t\t{\n\t\t\t\t$this->mandatoryvalues[] = \"'\".$optionvalue.\"'\";\n\t\t\t\t$this->showvalues[] = $fieldlabel;\n\t\t\t}\n\t\t}\n\t\treturn $module_columnlist;\n\t}",
"function loadModule($moduleID = null, $field = null){\r\n if ($moduleID === 0 || $moduleID == \"\") {\r\n return YiiTables::getInstance(TBL_MODULES);;\r\n }\r\n if($field == null){\r\n $field = \"a.id, a.title, a.alias, a.cdate, a.mdate, a.ordering, a.position, a.module, a.description, a.status + 2*(b.status - 1) as status, a.params\";\r\n }\r\n \r\n $command = $this->_db->createCommand()->select($field)\r\n ->from(TBL_MODULES . \" as a\")\r\n ->rightjoin(TBL_EXTENSIONS . \" as b\", \" ON a.module = b.folder\");\r\n if($conditions != null) $command->where(\"a.id = $moduleID\");\r\n $items = $command->queryRow();\r\n return $items;\r\n }",
"function getModos() {\r\n // arreglo para la determinacion del tipo de la tabla\r\n // 1 si se les puede agregar registros 0 si no se puede\r\n $modos['inventario_equipo']=1;\r\n $modos['inventario_estado']=1;\r\n $modos['inventario_grupo']=1;\r\n $modos['inventario_marca']=1;\r\n $modos['obligacion_clausula']=1;\r\n $modos['obligacion_componente']=1;\r\n $modos['documento_tipo']=1;\r\n $modos['documento_tema']=1;\r\n $modos['documento_subtema']=1;\r\n $modos['documento_estado']=1;\r\n $modos['documento_estado_respuesta']=1;\r\n $modos['documento_actor']=1;\r\n $modos['documento_tipo_actor']=1;\r\n $modos['riesgo_probabilidad']=1;\r\n $modos['riesgo_categoria']=1;\r\n $modos['riesgo_impacto']=1;\r\n $modos['compromiso_estado']=1;\r\n $modos['departamento']=0;\r\n $modos['departamento_region']=0;\r\n $modos['municipio']=0;\r\n $modos['operador']=0;\r\n return $modos;\r\n }",
"public function getModuleConfig() {\n $this->data['config_value'] = array_merge($this->helper_setting->getSetting($this->module_code),$this->helper_setting->getSetting('module_'.$this->module_code));\n }",
"public function getRawModuleMenuData() {}"
] | [
"0.5945336",
"0.56704086",
"0.56704086",
"0.56704086",
"0.5653592",
"0.55858815",
"0.55317426",
"0.5512988",
"0.53946906",
"0.53876394",
"0.53248733",
"0.5235498",
"0.5235498",
"0.5227403",
"0.51914734",
"0.51908815",
"0.51805174",
"0.5176732",
"0.51482505",
"0.5115132",
"0.5109843",
"0.5100445",
"0.509007",
"0.5045326",
"0.5017061",
"0.5017061",
"0.49811515",
"0.49753603",
"0.49243733",
"0.49064046",
"0.49025673",
"0.49006706",
"0.48976648",
"0.48965043",
"0.48911223",
"0.48813403",
"0.4867519",
"0.48501825",
"0.4850074",
"0.48500505",
"0.4847805",
"0.48445398",
"0.4843794",
"0.48312804",
"0.48293567",
"0.4820221",
"0.4814512",
"0.48143223",
"0.48107666",
"0.48071525",
"0.48009735",
"0.47986364",
"0.479733",
"0.479733",
"0.47951078",
"0.4793313",
"0.47923598",
"0.4791023",
"0.47892123",
"0.4778284",
"0.4775204",
"0.47717044",
"0.4770861",
"0.47496474",
"0.47487175",
"0.47397777",
"0.47316128",
"0.4730547",
"0.4728248",
"0.4724033",
"0.47214466",
"0.47174236",
"0.47133657",
"0.4702004",
"0.47003248",
"0.46996146",
"0.469729",
"0.46970114",
"0.469118",
"0.46863642",
"0.46836764",
"0.46790498",
"0.4674943",
"0.46742305",
"0.46665546",
"0.46613833",
"0.46534932",
"0.46523264",
"0.46512845",
"0.46510497",
"0.46489567",
"0.46300542",
"0.46261913",
"0.46241856",
"0.46241546",
"0.4623311",
"0.46112707",
"0.46071634",
"0.4601675",
"0.45993698",
"0.4594753"
] | 0.0 | -1 |
magic function __set to set the attributes of the User model | public function __set($name, $value)
{
switch($name) {
case 'APPLICANTS_FAMILY_DATA_SIBLINGS_ID':
//if the id isn't null, you shouldn't update it!
if( !is_null($this->APPLICANTS_FAMILY_DATA_SIBLINGS_ID) ) {
throw new Exception('Cannot update APPLICANTS_FAMILY_DATA_SIBLINGS_ID!');
}
break;
}
//set the attribute with the value
$this->$name = $value;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testSetUserAttributes()\n {\n }",
"public function testSetAllUserAttributes()\n {\n }",
"public function set()\n\t{\n\t\t$this->created_at = date(TIMESTAMP_FORMAT);\n $user = new SessionUser();\n\t\t$this->created_by = $user->getID();\t\t\n\t}",
"private function _setIdentity(){\n $this->_setUserData($this->getClassUser()->getIdentity());\n }",
"public function initUserAttributes()\n {\n }",
"public function setUserAttribute(Model $user)\n {\n $this->attributes['userable_id'] = $user->getKey();\n $this->attributes['userable_type'] = $user->getMorphClass();\n }",
"public function setUser($user)\n{\n$this->user = $user;\n\nreturn $this;\n}",
"public function setUserAttributes();",
"public function _setAttribute($user) {\n $this->user_id = $user->id;\n $this->auth_key = \\Yii::$app->security->generateRandomString(); \n $this->status = self::STATUS_LOGIN;\n }",
"public function setCreatedByAttribute(){\n $this->attributes['created_by'] = Auth::user()->id;\n }",
"public function __set($name, $value ) {\r\n \r\n // first check whether the given name is valid attribute or not\r\n // for that we are gonna use a switch statement\r\n switch($name) {\r\n \r\n case \"username\" :\r\n $this -> first_name = $value;\r\n break;\r\n default : return \"Invalid\"; // when the passes attribute doesnt exist\r\n }\r\n }",
"abstract public function set();",
"public function setAttributes();",
"function setUser($user) {\n $this->userObject = $user;\n }",
"public function __SET($att, $valor){\r\n $this->$att = $valor;\r\n}",
"public function set($user, array $input);",
"function SetUser(&$user)\n\t{\n\t\t$this->userId = $user->userId;\n\t}",
"public function __SET($attr, $value){ //Establece valor y atributo\n\n\t\t\t$this->$attr=$value;\n\t\t}",
"function set_user($user)\n\t{\n\t\t$this->user=$user;\n\t}",
"public function __set( $name, $value )\n {\n\t\t\tif( property_exists( \"UserSVC\", $name ) )\n\t\t\t\t$this->$name = $value;\n }",
"public function set_user_info($data){\n\t\t\treturn $result=$this->save($data);\n\t\t}",
"function setUser( $user )\r\n {\r\n if ( is_a( $user, \"eZUser\" ) )\r\n {\r\n $userID = $user->id();\r\n\r\n $this->UserID = $userID;\r\n }\r\n }",
"private function __setUser() {\n // Create the (helper) user object from the authenticated subject if present\n $subject = \\Native5\\Identity\\SecurityUtils::getSubject();\n if ($subject->isAuthenticated()) {\n $this->user = \\Akzo\\User\\Service::getInstance()->getUser(\n $subject->getPrincipal()['username'],\n $subject\n );\n }\n }",
"function set_user($user)\r\n {\r\n $this->set_default_property(self :: PROPERTY_USER, $user);\r\n }",
"function set_user($user)\r\n {\r\n $this->set_default_property(self :: PROPERTY_USER, $user);\r\n }",
"public function __set($key, $value)\n {\n $valid_update = array(\n 'name' => 'name',\n 'content' => 'content',\n 'author' => 'author',\n 'date_modified' => 'date_modified',\n 'date_created' => 'date_created',\n 'draft' => 'draft'\n );\n \n if ($read_only)\n {\n if ($key != 'id')\n {\n if ($key == 'author')\n {\n if (is_string($value) and strlen($value) == 32)\n {\n $value = new User($value);\n }\n \n if (is_object($value) and isset($value->id))\n {\n $this->user = $value;\n }\n else\n {\n exLog(\"Pages->__set(): Could not update author. Neither user ID nor user Object given as value.\");\n }\n }\n else if ($key == 'draft')\n {\n $value = ($value); // Force BOOL\n $this->draft = ($value);\n }\n else\n {\n $this->$key = $value;\n }\n }\n else\n {\n exLog('Page->__set(): ID is not editable');\n }\n }\n else\n {\n if (in_array($key, $valid_update))\n {\n if ($key == 'author')\n {\n if (is_string($value) and strlen($value) == 32)\n {\n $value = new User($value);\n }\n \n if (is_object($value) and isset($value->id))\n {\n query(SharedPage::$statements['update_with_id'], 'author', $value->id, $this->id);\n $this->user = $value;\n }\n else\n {\n exLog(\"Pages->__set(): Could not update author. Neither user ID nor user Object given as value.\");\n }\n }\n else if ($key == 'draft')\n {\n $value = ($value); // Force BOOL\n query(SharedPage::$statements['update_with_id'], 'draft', '1', $this->id);\n $this->draft = ($value);\n }\n else\n {\n array_flip($valid_update);\n query(SharedPage::$statements['update_with_id'], $valid_update[$key], $value, $this->id);\n $this->$key = $value;\n }\n }\n else\n {\n exLog(\"Pages->__set(): Cannot update $key in mysql, only local copy modified.\");\n $this->$key = $value;\n }\n }\n }",
"protected function setUserModel()\n {\n if ($model = $this->getUserModel()) {\n Models::setUsersModel($model);\n }\n }",
"public function set_user($user) {\n $this->user = $user;\n }",
"public function __set($property, $value) {\n // object then proxy it to the Uuser object\n if(strpos($property, '__user__') > -1) {\n $property = str_replace('__user__', '', $property);\n\n if($this->user == NULL)\n $this->user = new User();\n\n $this->user->{$property} = $value;\n }\n }",
"public function setAttributes($arr) {\n foreach($arr as $key => $val) {\n switch($key) {\n case \"id\":\n case \"user_id\":\n //casting null to int will return 0; don't want that\n if ($val !== null) {\n $this->id_ = (int) $val;\n }\n break; \n case \"username\":\n $this->username_ = $val;\n break; \n case \"email\":\n $this->email_ = $val;\n break; \n case \"displayName\":\n case \"display_name\":\n $this->displayName_ = $val;\n break; \n case \"firstName\":\n case \"first_name\":\n $this->firstName_ = $val;\n break; \n case \"lastName\":\n case \"last_name\":\n $this->lastName_ = $val;\n break; \n case \"postalCode\":\n case \"postal_code\":\n $this->postalCode_ = $val;\n break; \n case \"isVerified\":\n case \"is_verified\":\n $this->isVerified_ = (int) $val;\n break; \n case \"privileges\":\n //might be a string of comma-separated numbers, or an array\n if (is_array($val)) {\n $this->privileges_ = $val;\n } else if ($val !== null) {\n //clear array first\n unset($this->privileges_);\n $this->privileges_ = array();\n $tmp = explode(\",\", $val);\n foreach($tmp as $v){\n if (is_numeric($v)) {\n //$this->privileges_[(int) $v] = 1;\n $this->privileges_[] = (int) $v;\n }\n }\n \n }\n break;\n\n default:\n //ignore any others\n }\n }\n }",
"public function setUser($user) {\n\n $this->user = $user;\n }",
"public function setUser()\n\t{\n\t\t$user = User::getInstance();\n\t\t\n\t\tif ( $this->session->get( 'user_id' ) ) {\n\t\t\t$user->set( 'id', $this->session->get( 'user_id' ) );\n\t\t\t$user->read();\n\t\t}\n\t}",
"private function setUsers(): void\n {\n // They only need to be loaded once\n if (!empty($this->users)) {\n return;\n }\n\n /** @var Customer $customer */\n $customer = $this->collection->getApplicationVersion()->getApplication()->getCustomer();\n\n // Get the users for the created_at and updated_at attributes\n $userRepository = $this->entityManager->getRepository(User::class);\n\n $this->users = $userRepository->findAllByCustomer($customer, true, [\n 'user.id',\n 'user.firstName AS first_name',\n 'user.insertion',\n 'user.lastName AS last_name',\n 'CASE WHEN (user.insertion IS NULL OR user.insertion = \\'\\') THEN CONCAT(user.firstName, \\' \\', user.lastName) ELSE CONCAT(user.firstName, \\' \\', user.insertion, \\' \\', user.lastName) END AS full_name',\n 'user.createdAt AS created_at',\n 'user.updatedAt AS updated_at',\n ]);\n\n // Map the users array so that the ID is key\n $this->users = Collect::keyBy($this->users, 'id');\n }",
"public function setUserEntity( UserEntity $user ) { $this->user = $user; }",
"function setUser(mofilmUser $inUser) {\n\t\tif ( $inUser !== $this->_User ) {\n\t\t\t$this->_User = $inUser;\n\t\t\t$this->setModified();\n\t\t}\n\t\treturn $this;\n\t}",
"public function setUserAttribute($user)\n {\n if (is_scalar($user)) {\n $user = User::findOrFail($user);\n }\n\n $this->user()->associate($user);\n }",
"function set_user_setting( $user, $key, $value )\n {\n //Unimplemented\n }",
"protected function setUsers()\n {\n $this->users = new Users;\n $this->users->read();\n \n $this->data['users'] = $this->users;\n }",
"public function setUSer(UserInterface $user): self;",
"public static function setters();",
"public function setEmail($email)\n\n{\n\n$this->email = $email;\n\n}",
"abstract function setUserProfileProperty($user, $property_name, $property);",
"public function setUser($user)\n {\n $this->_user = $user;\n }",
"protected abstract function setFields();",
"public function setUser($user){\n\t\t$this->user = $user;\n\t}",
"public function initializeUser($user)\n {\n $this->user = $user;\n $this->setAttribute('id', $user, 'user');\n }",
"function __set($attr_name, $value) {\n // in $attr_name, replace _ with \" \"\n $attr_name = str_replace('_', ' ', $attr_name);\n $attr_name = ucwords($attr_name);\n $attr_name = str_replace(' ', '', $attr_name);\n $function = \"set$attr_name\";\n //var_dump($function);\n $this->$function($value);\n }",
"public function set()\n {\n $args = func_get_args();\n\n if ( count($args) == 2 )\n {\n $this->attributes[$args[0]] = $args[1];\n }\n elseif ( count($args) == 1 && is_array($args[0]) ) \n {\n $this->attributes = ( array_merge($this->attributes, $args[0]) );\n }\n\n return $this;\n }",
"public function set($data);",
"public function setter() {\n return $this->belongsTo('App\\User', 'marketer');\n }",
"public function testUpdateUser()\n {\n }",
"public function setUser($user)\n {\n $this->user = Auth::user();\n }",
"public function setUser(object $userObjs){\n \n $this->user->setUser($userObjs);\n }",
"protected function setOverrides()\n {\n $config = $this->app['config']->get('cartalyst.sentinel');\n\n $users = $config['users']['model'];\n\n $roles = $config['roles']['model'];\n\n $persistences = $config['persistences']['model'];\n\n if (class_exists($users)) {\n if (method_exists($users, 'setRolesModel')) {\n forward_static_call_array([$users, 'setRolesModel'], [$roles]);\n }\n\n if (method_exists($users, 'setPersistencesModel')) {\n forward_static_call_array([$users, 'setPersistencesModel'], [$persistences]);\n }\n\n if (method_exists($users, 'setPermissionsClass')) {\n forward_static_call_array([$users, 'setPermissionsClass'], [$config['permissions']['class']]);\n }\n }\n\n if (class_exists($roles) && method_exists($roles, 'setUsersModel')) {\n forward_static_call_array([$roles, 'setUsersModel'], [$users]);\n }\n\n if (class_exists($persistences) && method_exists($persistences, 'setUsersModel')) {\n forward_static_call_array([$persistences, 'setUsersModel'], [$users]);\n }\n }",
"public function setUser( $user )\r\n {\r\n $this->_user = $user;\r\n }",
"public function __set($name, $value)\n\t{\n\t\tswitch($name) {\n\t\t\tcase 'USER_GROUP_ID':\n\t\t\t\t//if the id isn't null, you shouldn't update it!\n\t\t\t\tif( !is_null($this->USER_GROUP_ID) ) {\n\t\t\t\t\tthrow new Exception('Cannot update USER_GROUP_ID!');\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t\t\t\n\t\t//set the attribute with the value\n\t\t$this->$name = $value;\n\t}",
"public function setUser($value)\n {\n return $this->set('User', $value);\n }",
"public function setUser($value)\n {\n return $this->set('User', $value);\n }",
"public function setUser($value)\n {\n return $this->set('User', $value);\n }",
"public function setUser($value)\n {\n return $this->set('User', $value);\n }",
"public function setUser($value)\n {\n return $this->set('User', $value);\n }",
"public function setUser($value)\n {\n return $this->set('User', $value);\n }",
"public function setUser($value)\n {\n return $this->set('User', $value);\n }",
"public function setUser($value)\n {\n return $this->set('User', $value);\n }",
"public function setUser($value)\n {\n return $this->set('User', $value);\n }",
"public function setUser($value)\n {\n return $this->set('User', $value);\n }",
"public function setUser($value)\n {\n return $this->set('User', $value);\n }",
"public function setUser($value)\n {\n return $this->set('User', $value);\n }",
"public function setUser($value)\n {\n return $this->set('User', $value);\n }",
"public function setUser($value)\n {\n return $this->set('User', $value);\n }",
"public function setUser($value)\n {\n return $this->set('User', $value);\n }",
"public function setUser($value)\n {\n return $this->set('User', $value);\n }",
"public function setUser($value)\n {\n return $this->set('User', $value);\n }",
"public function setUser($value)\n {\n return $this->set('User', $value);\n }",
"public function setUser($value)\n {\n return $this->set('User', $value);\n }",
"public function setUser($value)\n {\n return $this->set('User', $value);\n }",
"public function setUser($value)\n {\n return $this->set('User', $value);\n }",
"public function setUser($value)\n {\n return $this->set('User', $value);\n }",
"public function setUser($value)\n {\n return $this->set('User', $value);\n }",
"public function setUser($value)\n {\n return $this->set('User', $value);\n }",
"public function setUser($value)\n {\n return $this->set('User', $value);\n }",
"public function setUserIdAttribute($input)\n {\n $this->attributes['user_id'] = $input ? $input : null;\n }",
"public function setUserIdAttribute($input)\n {\n $this->attributes['user_id'] = $input ? $input : null;\n }",
"public function setUserIdAttribute($input)\n {\n $this->attributes['user_id'] = $input ? $input : null;\n }",
"public function setUserIdAttribute($input)\n {\n $this->attributes['user_id'] = $input ? $input : null;\n }",
"public function setUserIdAttribute($input)\n {\n $this->attributes['user_id'] = $input ? $input : null;\n }",
"public function setUserIdAttribute($input)\n {\n $this->attributes['user_id'] = $input ? $input : null;\n }",
"public function setUserIdAttribute($input)\n {\n $this->attributes['user_id'] = $input ? $input : null;\n }",
"public function setUserIdAttribute($input)\n {\n $this->attributes['user_id'] = $input ? $input : null;\n }",
"public function setUser($value)\n {\n if ($value !== null) {\n $this->_user = $value;\n } else {\n $this->_user = Zend_Gdata_Photos::DEFAULT_USER;\n }\n }",
"public function setUserId() {\n $this->user_id = $user_id;\n }",
"public function setUser($user) {\r\n\t\t$this->user = $user;\r\n\t}",
"public function testSetAndGetUserID()\r\n {\r\n $testObj = $this->_createMockModel();\r\n $baseObj = $this->_createMockModel();\r\n\r\n // Set the User ID\r\n $testObj->setUserID(99);\r\n\r\n // Assert that a change occurred in the test object\r\n $this->assertNotEquals($testObj, $baseObj);\r\n\r\n // Assert that User ID field was updated\r\n $this->assertEquals(99, $testObj->getUserID());\r\n\r\n // Assert that no other return values were affected\r\n $this->_assertModelsSameExcept($testObj, $baseObj, 'UserID');\r\n }",
"private function __setAuthUser()\n {\n $authUser = $this->request->session()->read('Auth');\n\n $accountType = 'FREE';\n if (!empty($authUser)) {\n $accountType = $authUser['User']['account_type'];\n }\n\n $this->set(compact('authUser', 'accountType'));\n }",
"public function setUser($aUser){\n $this->user = $aUser;\n }",
"public function __set($name, $value)\n { \n //set the attribute with the value\n $this->$name = $value;\n }",
"public function setUser($user)\n {\n $this->_user = $user;\n }",
"private function _update() {\n\n $this->db->replace(XCMS_Tables::TABLE_USERS, $this->getArray());\n $this->attributes->save();\n\n }",
"abstract public function set($in): void;",
"public function testSetAndGetUserName()\r\n {\r\n $testObj = $this->_createMockModel();\r\n $baseObj = $this->_createMockModel();\r\n\r\n // Set the Username\r\n $testObj->setUserName('testUserName');\r\n\r\n // Assert that a change occurred in the test object\r\n $this->assertNotEquals($testObj, $baseObj);\r\n\r\n // Assert that Username field was updated\r\n $this->assertEquals('testUserName', $testObj->getUserName());\r\n\r\n // Assert that no other return values were affected\r\n $this->_assertModelsSameExcept($testObj, $baseObj, 'UserName');\r\n }",
"public function setCurrentUser($user){\n $this->user = $user;\n }"
] | [
"0.70624894",
"0.6941756",
"0.6779873",
"0.6688796",
"0.65628785",
"0.6488684",
"0.6429985",
"0.64272714",
"0.63778",
"0.6330435",
"0.62896156",
"0.6260077",
"0.625488",
"0.6209203",
"0.6181243",
"0.61812425",
"0.6176599",
"0.61657405",
"0.61397165",
"0.6133676",
"0.611486",
"0.61088586",
"0.60969883",
"0.6091183",
"0.6091183",
"0.60909986",
"0.60773987",
"0.6050278",
"0.6043436",
"0.6023129",
"0.60048264",
"0.60039735",
"0.59999865",
"0.599754",
"0.5990912",
"0.59720665",
"0.5970658",
"0.59645545",
"0.5956216",
"0.5931386",
"0.59219116",
"0.5883121",
"0.58697104",
"0.5867811",
"0.5858946",
"0.5850818",
"0.58416665",
"0.5837567",
"0.58328557",
"0.58138055",
"0.58115655",
"0.5810259",
"0.5803092",
"0.5798831",
"0.5783882",
"0.5782637",
"0.577287",
"0.577287",
"0.577287",
"0.577287",
"0.577287",
"0.577287",
"0.577287",
"0.577287",
"0.577287",
"0.577287",
"0.577287",
"0.577287",
"0.577287",
"0.577287",
"0.577287",
"0.577287",
"0.577287",
"0.577287",
"0.577287",
"0.577287",
"0.577287",
"0.577287",
"0.577287",
"0.577287",
"0.577287",
"0.57693064",
"0.57693064",
"0.57693064",
"0.57693064",
"0.57693064",
"0.57693064",
"0.57693064",
"0.57693064",
"0.5751501",
"0.5750465",
"0.5744487",
"0.57374346",
"0.5737399",
"0.57271475",
"0.57251835",
"0.5716684",
"0.5681956",
"0.5681679",
"0.56799436",
"0.56794"
] | 0.0 | -1 |
Display a listing of the resource. | public function index()
{
$delivery_approvals = DeliveryApproval::all();
$users_array = Helpers::getUserArray(User::all());
return view('deliveryapprovals.index', [
'delivery_approvals' => $delivery_approvals,
'users_array' => $users_array,
]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }",
"public function listing();",
"function index() {\n\t\t$this->show_list();\n\t}",
"public function actionList() {\n $this->_getList();\n }",
"public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }",
"public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }",
"public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }",
"function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}",
"public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }",
"public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }",
"public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}",
"function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}",
"public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }",
"public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}",
"public function actionRestList() {\n\t $this->doRestList();\n\t}",
"public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}",
"public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }",
"public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }",
"public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}",
"public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}",
"public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }",
"public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }",
"public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }",
"public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }",
"public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}",
"public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }",
"public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}",
"public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }",
"public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}",
"public function index()\n {\n $this->list_view();\n }",
"public function index()\n {\n $this->list_view();\n }",
"public function index()\n {\n $this->list_view();\n }",
"public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }",
"public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }",
"public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}",
"public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }",
"public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }",
"public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }",
"public function index()\n {\n return Resources::collection(Checking::paginate());\n }",
"public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }",
"public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }",
"public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }",
"public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }",
"public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }",
"public function view(){\n\t\t$this->buildListing();\n\t}",
"public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }",
"public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }",
"public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }",
"public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }",
"public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }",
"public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }",
"public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }",
"public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }",
"public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }",
"public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}",
"public function listAction() {}",
"public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }",
"public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }",
"public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }",
"public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }",
"public function executeList()\n {\n $this->setTemplate('list');\n }",
"public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }",
"function listing() {\r\n\r\n }",
"public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }",
"public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }",
"public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}",
"public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }",
"public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }",
"public function _index(){\n\t $this->_list();\n\t}",
"public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}",
"function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}",
"public function index()\n {\n $this->booklist();\n }",
"public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }",
"public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }",
"public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }",
"public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }",
"public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }",
"public function indexAction() {\n $this->_forward('list');\n }",
"public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }",
"public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }",
"public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}",
"public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }",
"public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }",
"public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }",
"public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }",
"public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }",
"public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }",
"public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}",
"public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }",
"public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }",
"public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }",
"public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}",
"public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }",
"public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }",
"public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }",
"public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }",
"public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }",
"public function index()\n {\n return view('admin.resources.index');\n }",
"public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}"
] | [
"0.7446777",
"0.736227",
"0.73005503",
"0.72478926",
"0.71631265",
"0.71489686",
"0.7131636",
"0.7105969",
"0.71029514",
"0.7101372",
"0.70508176",
"0.6995128",
"0.69890636",
"0.6934895",
"0.6900203",
"0.6899281",
"0.6891734",
"0.6887235",
"0.68670005",
"0.6849741",
"0.6830523",
"0.6802689",
"0.6797",
"0.67957735",
"0.67871135",
"0.6760129",
"0.67427456",
"0.6730486",
"0.67272323",
"0.67255723",
"0.67255723",
"0.67255723",
"0.67177945",
"0.6707866",
"0.6706713",
"0.6704375",
"0.6664782",
"0.6662871",
"0.6660302",
"0.6659404",
"0.6656656",
"0.6653517",
"0.6647965",
"0.6620322",
"0.66185474",
"0.6618499",
"0.6606105",
"0.6600617",
"0.65996987",
"0.6594775",
"0.6587389",
"0.6585109",
"0.6581641",
"0.6581017",
"0.6577157",
"0.65747666",
"0.6572513",
"0.65721947",
"0.6570553",
"0.65646994",
"0.6563556",
"0.6554194",
"0.65529937",
"0.65460825",
"0.65368485",
"0.653429",
"0.65328294",
"0.6526759",
"0.6526695",
"0.6526284",
"0.65191334",
"0.65183175",
"0.65174305",
"0.651703",
"0.65141153",
"0.6507088",
"0.65061647",
"0.6504046",
"0.64942145",
"0.6491893",
"0.64883405",
"0.6486392",
"0.6485077",
"0.64846045",
"0.6478858",
"0.64756656",
"0.64726377",
"0.6471126",
"0.64701074",
"0.6467418",
"0.6462195",
"0.64618355",
"0.6459199",
"0.6457831",
"0.6454631",
"0.64533997",
"0.6451915",
"0.6450861",
"0.6449301",
"0.64492667",
"0.64469045"
] | 0.0 | -1 |
Show the form for creating a new resource. | public function create()
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return view('admin.resources.create');\n }",
"public function create(){\n\n return view('resource.create');\n }",
"public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}",
"public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }",
"public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }",
"public function create()\n {\n return view ('forms.create');\n }",
"public function create ()\n {\n return view('forms.create');\n }",
"public function create()\n\t{\n\t\treturn view('faith.form');\n\t}",
"public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }",
"public function create()\n {\n return view(\"request_form.form\");\n }",
"public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }",
"public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle école'\n\t\t) ) );\n\t}",
"public function create()\n {\n return view($this->forms . '.create');\n }",
"public function create()\n {\n return view('restful.add');\n }",
"public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }",
"public function create()\n {\n return view('admin.createform');\n }",
"public function create()\n {\n return view('admin.forms.create');\n }",
"public function create()\n {\n return view('backend.student.form');\n }",
"public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }",
"public function create()\n {\n return view('client.form');\n }",
"public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }",
"public function create()\n {\n return view('Form');\n }",
"public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }",
"public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}",
"public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }",
"public function create()\n {\n return view('backend.schoolboard.addform');\n }",
"public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}",
"public function create()\n {\n //\n return view('form');\n }",
"public function create()\n {\n return view('rests.create');\n }",
"public function create()\n {\n return $this->showForm();\n }",
"public function create()\n {\n return $this->showForm();\n }",
"public function create()\n {\n return view(\"Add\");\n }",
"public function create(){\n return view('form.create');\n }",
"public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }",
"public function create()\n {\n\n return view('control panel.student.add');\n\n }",
"public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}",
"public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }",
"public function create()\n {\n return $this->cView(\"form\");\n }",
"public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }",
"public function create()\n {\n return view(\"dresses.form\");\n }",
"public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}",
"public function createAction()\n {\n// $this->view->form = $form;\n }",
"public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }",
"public function create()\n {\n return view('fish.form');\n }",
"public function create()\n {\n return view('users.forms.create');\n }",
"public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }",
"public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}",
"public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }",
"public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }",
"public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }",
"public function create()\n {\n return view('essentials::create');\n }",
"public function create()\n {\n return view('student.add');\n }",
"public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}",
"public function create()\n {\n return view('url.form');\n }",
"public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }",
"public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}",
"public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }",
"public function create()\n {\n return view('libro.create');\n }",
"public function create()\n {\n return view('libro.create');\n }",
"public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n return view('crud/add'); }",
"public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}",
"public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n return view(\"List.form\");\n }",
"public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}",
"public function create()\n {\n //load create form\n return view('products.create');\n }",
"public function create()\n {\n return view('article.addform');\n }",
"public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }",
"public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}",
"public function create()\n {\n return view('saldo.form');\n }",
"public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}",
"public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }",
"public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }",
"public function create()\n {\n return view('admin.inverty.add');\n }",
"public function create()\n {\n return view('Libro.create');\n }",
"public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }",
"public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }",
"public function create()\n {\n return view(\"familiasPrograma.create\");\n }",
"public function create()\n {\n return view('admin.car.create');\n }",
"public function create()\n {\n return view('admin.car.create');\n }",
"public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}",
"public function create()\n {\n return view(\"create\");\n }",
"public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}",
"public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }",
"public function create()\n {\n return view('forming');\n }",
"public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }",
"public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }",
"public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }",
"public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }",
"public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }",
"public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}",
"public function create()\n {\n return view('student::students.student.create');\n }",
"public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}"
] | [
"0.75948673",
"0.75948673",
"0.75863165",
"0.7577412",
"0.75727344",
"0.7500887",
"0.7434847",
"0.7433956",
"0.73892003",
"0.73531085",
"0.73364776",
"0.73125",
"0.7296102",
"0.7281891",
"0.72741455",
"0.72424185",
"0.7229325",
"0.7226713",
"0.7187349",
"0.7179176",
"0.7174283",
"0.7150356",
"0.71444064",
"0.71442676",
"0.713498",
"0.71283126",
"0.7123691",
"0.71158516",
"0.71158516",
"0.71158516",
"0.7112176",
"0.7094388",
"0.7085711",
"0.708025",
"0.70800644",
"0.70571953",
"0.70571953",
"0.70556754",
"0.70396435",
"0.7039549",
"0.7036275",
"0.703468",
"0.70305896",
"0.7027638",
"0.70265305",
"0.70199823",
"0.7018007",
"0.7004984",
"0.7003889",
"0.7000935",
"0.69973785",
"0.6994679",
"0.6993764",
"0.6989918",
"0.6986989",
"0.6966502",
"0.69656384",
"0.69564354",
"0.69518244",
"0.6951109",
"0.6947306",
"0.69444615",
"0.69423944",
"0.6941156",
"0.6937871",
"0.6937871",
"0.6936686",
"0.69345254",
"0.69318026",
"0.692827",
"0.69263744",
"0.69242257",
"0.6918349",
"0.6915889",
"0.6912884",
"0.691146",
"0.69103104",
"0.69085974",
"0.69040126",
"0.69014287",
"0.69012105",
"0.6900397",
"0.68951064",
"0.6893521",
"0.68932164",
"0.6891899",
"0.6891616",
"0.6891616",
"0.6889246",
"0.68880934",
"0.6887128",
"0.6884732",
"0.68822503",
"0.68809193",
"0.6875949",
"0.68739206",
"0.68739134",
"0.6870358",
"0.6869779",
"0.68696856",
"0.686877"
] | 0.0 | -1 |
Store a newly created resource in storage. | public function store(Request $request)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function store($data, Resource $resource);",
"public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }",
"public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }",
"public function createStorage();",
"public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }",
"public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }",
"public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }",
"function storeAndNew() {\n $this->store();\n }",
"public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }",
"public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }",
"public function store()\n\t{\n\t\t\n\t\t//\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}"
] | [
"0.72865677",
"0.7145327",
"0.71325725",
"0.6640912",
"0.66209733",
"0.65685713",
"0.652643",
"0.65095705",
"0.64490104",
"0.637569",
"0.63736665",
"0.63657933",
"0.63657933",
"0.63657933",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437"
] | 0.0 | -1 |
Display the specified resource. | public function show($id)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function show(Resource $resource)\n {\n // not available for now\n }",
"public function show(Resource $resource)\n {\n //\n }",
"function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }",
"private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }",
"function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}",
"public function show(ResourceSubject $resourceSubject)\n {\n //\n }",
"public function show(ResourceManagement $resourcesManagement)\n {\n //\n }",
"public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function retrieve(Resource $resource);",
"public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }",
"public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function show(Dispenser $dispenser)\n {\n //\n }",
"public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }",
"public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}",
"public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }",
"public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }",
"function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}",
"public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }",
"public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }",
"public function get(Resource $resource);",
"public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }",
"public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }",
"function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}",
"public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }",
"function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}",
"public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function show(rc $rc)\n {\n //\n }",
"public function show(Resolucion $resolucion)\n {\n //\n }",
"public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show(Resena $resena)\n {\n }",
"public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }",
"public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }",
"public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}",
"public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }",
"public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }",
"public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }",
"public function display()\n\t{\n\t\tparent::display();\n\t}",
"public function get_resource();",
"public function show()\n\t{\n\t\t\n\t}",
"function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}",
"public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }",
"public function display($title = null)\n {\n echo $this->fetch($title);\n }",
"public function display(){}",
"public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}",
"public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}",
"public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }",
"#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}",
"public function display() {\n echo $this->render();\n }",
"public function show($id)\n\t{\n\t//\n\t}",
"public function show($id)\n\t{\n\t//\n\t}",
"function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }",
"public function show($id)\n {\n //\n $this->_show($id);\n }",
"public function show()\n\t{\n\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {}",
"static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}",
"public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}",
"public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }",
"public abstract function display();",
"abstract public function resource($resource);",
"public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}",
"public function show( $id ) {\n\t\t//\n\t}",
"public function show( $id ) {\n\t\t//\n\t}",
"public function show(Response $response)\n {\n //\n }",
"public function show()\n {\n return auth()->user()->getResource();\n }",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}"
] | [
"0.8233718",
"0.8190437",
"0.6828712",
"0.64986944",
"0.6495974",
"0.6469629",
"0.6462615",
"0.6363665",
"0.6311607",
"0.62817234",
"0.6218966",
"0.6189695",
"0.61804265",
"0.6171014",
"0.61371076",
"0.61207956",
"0.61067593",
"0.6105954",
"0.6094066",
"0.6082806",
"0.6045245",
"0.60389996",
"0.6016584",
"0.598783",
"0.5961788",
"0.59606946",
"0.5954321",
"0.59295714",
"0.59182066",
"0.5904556",
"0.59036547",
"0.59036547",
"0.59036547",
"0.5891874",
"0.58688277",
"0.5868107",
"0.58676815",
"0.5851883",
"0.58144855",
"0.58124036",
"0.58112013",
"0.5803467",
"0.58012545",
"0.5791527",
"0.57901084",
"0.5781528",
"0.5779676",
"0.5757105",
"0.5756208",
"0.57561266",
"0.57453394",
"0.57435393",
"0.57422745",
"0.5736634",
"0.5736634",
"0.5730559",
"0.57259274",
"0.5724891",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5718969",
"0.5713412",
"0.57091093",
"0.5706405",
"0.57057405",
"0.5704541",
"0.5704152",
"0.57026845",
"0.57026845",
"0.56981397",
"0.5693083",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962"
] | 0.0 | -1 |
Show the form for editing the specified resource. | public function edit($id)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }",
"public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }",
"public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }",
"public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function edit()\n {\n return view('hirmvc::edit');\n }",
"public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}",
"public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }",
"public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}",
"public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }",
"public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }",
"private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }",
"public function edit($id)\n {\n return $this->showForm('update', $id);\n }",
"public function edit($id)\n {\n return $this->showForm('update', $id);\n }",
"public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }",
"public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }",
"public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}",
"public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }",
"public function edit($model, $form);",
"function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}",
"public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}",
"public function edit()\n { \n return view('admin.control.edit');\n }",
"public function edit(Form $form)\n {\n //\n }",
"public function edit()\n {\n return view('common::edit');\n }",
"public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }",
"public function edit()\n {\n return view('admin::edit');\n }",
"public function edit()\n {\n return view('admin::edit');\n }",
"public function edit()\r\n {\r\n return view('petro::edit');\r\n }",
"public function edit($id)\n {\n // show form edit user info\n }",
"public function edit()\n {\n return view('escrow::edit');\n }",
"public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }",
"public function edit()\n {\n return view('commonmodule::edit');\n }",
"public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}",
"public function edit()\n {\n return view('catalog::edit');\n }",
"public function edit()\n {\n return view('catalog::edit');\n }",
"public function edit(form $form)\n {\n //\n }",
"public function actionEdit($id) { }",
"public function edit()\n {\n return view('admincp::edit');\n }",
"public function edit()\n {\n return view('scaffold::edit');\n }",
"public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }",
"public function edit()\n {\n return view('Person.edit');\n }",
"public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }",
"public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}",
"public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }",
"public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}",
"public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }",
"public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }",
"public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }",
"function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}",
"public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }",
"public function edit($id)\n {\n return $this->showForm($id);\n }",
"public function edit($id)\n {\n return $this->showForm($id);\n }",
"protected function _edit(){\n\t\treturn $this->_editForm();\n\t}",
"public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }",
"public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }",
"public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}",
"public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}",
"public function edit($id)\n {\n return view('models::edit');\n }",
"public function edit()\n {\n return view('home::edit');\n }",
"public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }",
"public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }",
"public function edit()\n {\n return view('user::edit');\n }",
"public function edit()\n {\n return view('user::edit');\n }",
"public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }",
"public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }",
"public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit($id)\n {\n return view('consultas::edit');\n }",
"public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }",
"public function edit()\n {\n return view('dashboard::edit');\n }",
"public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }",
"public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }",
"public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }",
"public function edit() {\n return view('routes::edit');\n }",
"public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }",
"public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }",
"public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit($id)\n {\n return view('cataloguemodule::edit');\n }",
"public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }",
"public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }",
"public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }",
"public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }",
"public function edit()\n {\n return view('website::edit');\n }",
"public function edit()\n {\n return view('inventory::edit');\n }",
"public function edit()\n {\n return view('initializer::edit');\n }",
"public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }",
"public function edit($id)\n {\n return view('backend::edit');\n }",
"public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }",
"public function edit($id)\n {\n return view('crm::edit');\n }",
"public function edit($id)\n {\n return view('crm::edit');\n }",
"public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }",
"public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}",
"public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }",
"public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}",
"public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }",
"public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }",
"public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }",
"public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }",
"public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }",
"public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}"
] | [
"0.78550774",
"0.7692893",
"0.7273195",
"0.7242132",
"0.7170847",
"0.70622855",
"0.7053459",
"0.6982539",
"0.69467914",
"0.6945275",
"0.6941114",
"0.6928077",
"0.69019294",
"0.68976134",
"0.68976134",
"0.6877213",
"0.68636996",
"0.68592185",
"0.68566656",
"0.6844697",
"0.68336326",
"0.6811471",
"0.68060875",
"0.68047357",
"0.68018645",
"0.6795623",
"0.6791791",
"0.6791791",
"0.6787701",
"0.67837197",
"0.67791027",
"0.677645",
"0.6768301",
"0.6760122",
"0.67458534",
"0.67458534",
"0.67443407",
"0.67425704",
"0.6739898",
"0.6735328",
"0.6725465",
"0.6712817",
"0.6693891",
"0.6692419",
"0.6688581",
"0.66879624",
"0.6687282",
"0.6684741",
"0.6682786",
"0.6668777",
"0.6668427",
"0.6665287",
"0.6665287",
"0.66610634",
"0.6660843",
"0.66589665",
"0.66567147",
"0.66545695",
"0.66527975",
"0.6642529",
"0.6633056",
"0.6630304",
"0.6627662",
"0.6627662",
"0.66192114",
"0.6619003",
"0.66153085",
"0.6614968",
"0.6609744",
"0.66086483",
"0.66060555",
"0.6596137",
"0.65950733",
"0.6594648",
"0.65902114",
"0.6589043",
"0.6587102",
"0.65799844",
"0.65799403",
"0.65799177",
"0.657708",
"0.65760696",
"0.65739626",
"0.656931",
"0.6567826",
"0.65663105",
"0.65660435",
"0.65615267",
"0.6561447",
"0.6561447",
"0.65576506",
"0.655686",
"0.6556527",
"0.6555543",
"0.6555445",
"0.65552044",
"0.65543956",
"0.65543705",
"0.6548264",
"0.65475875",
"0.65447706"
] | 0.0 | -1 |
Update the specified resource in storage. | public function update(Request $request, $id)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }",
"public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }",
"public function update(Request $request, Resource $resource)\n {\n //\n }",
"public function updateStream($resource);",
"public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }",
"protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }",
"public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }",
"public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }",
"public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}",
"public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }",
"public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }",
"protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }",
"public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }",
"public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }",
"public function update($path);",
"public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }",
"public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }",
"public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }",
"public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}",
"public function updateStream($path, $resource, Config $config)\n {\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }",
"public function update($data) {}",
"public function update($data) {}",
"public function putStream($resource);",
"public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }",
"public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }",
"public function update($entity);",
"public function update($entity);",
"public function setResource($resource);",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }",
"public function isUpdateResource();",
"public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }",
"public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }",
"public function store($data, Resource $resource);",
"public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }",
"public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }",
"public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }",
"public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }",
"public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }",
"public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }",
"public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }",
"public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }",
"public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }",
"public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }",
"public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }",
"public function update(Qstore $request, $id)\n {\n //\n }",
"public function update(IEntity $entity);",
"protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }",
"public function update($request, $id);",
"function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}",
"public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }",
"public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }",
"protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }",
"abstract public function put($data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function testUpdateSupplierUsingPUT()\n {\n }",
"public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }",
"public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }",
"public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }",
"public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }",
"public abstract function update($object);",
"public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }",
"public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }",
"public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }",
"public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }",
"public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }",
"public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }",
"public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }",
"public function update($entity)\n {\n \n }",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }",
"public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }",
"public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }",
"public function update($id, $input);",
"public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }",
"public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}",
"public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }",
"public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }",
"public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }",
"public function update($id);",
"public function update($id);",
"private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }",
"public function put($path, $data = null);",
"public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }",
"public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }",
"public function update(Entity $entity);",
"public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }",
"public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}",
"public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }",
"public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }",
"public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }",
"public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }",
"public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }"
] | [
"0.7425105",
"0.70612276",
"0.70558053",
"0.6896673",
"0.6582159",
"0.64491373",
"0.6346954",
"0.62114537",
"0.6145042",
"0.6119944",
"0.61128503",
"0.6099993",
"0.6087866",
"0.6052593",
"0.6018941",
"0.60060275",
"0.59715486",
"0.5946516",
"0.59400934",
"0.59377414",
"0.5890722",
"0.5860816",
"0.5855127",
"0.5855127",
"0.58513457",
"0.5815068",
"0.5806887",
"0.57525045",
"0.57525045",
"0.57337505",
"0.5723295",
"0.5714311",
"0.5694472",
"0.5691319",
"0.56879413",
"0.5669989",
"0.56565005",
"0.56505877",
"0.5646085",
"0.5636683",
"0.5633498",
"0.5633378",
"0.5632906",
"0.5628826",
"0.56196684",
"0.5609126",
"0.5601397",
"0.55944353",
"0.5582592",
"0.5581908",
"0.55813426",
"0.5575312",
"0.55717176",
"0.55661047",
"0.55624634",
"0.55614686",
"0.55608666",
"0.55599797",
"0.55599797",
"0.55599797",
"0.55599797",
"0.55599797",
"0.55573726",
"0.5556878",
"0.5554201",
"0.5553069",
"0.55530256",
"0.5543788",
"0.55435944",
"0.55412996",
"0.55393505",
"0.55368495",
"0.5535236",
"0.5534954",
"0.55237365",
"0.5520468",
"0.55163723",
"0.55125296",
"0.5511168",
"0.5508345",
"0.55072427",
"0.5502385",
"0.5502337",
"0.5501029",
"0.54995877",
"0.54979175",
"0.54949397",
"0.54949397",
"0.54946727",
"0.5494196",
"0.54941916",
"0.54925025",
"0.5491807",
"0.5483321",
"0.5479606",
"0.5479408",
"0.5478678",
"0.54667485",
"0.5463411",
"0.5460588",
"0.5458525"
] | 0.0 | -1 |
Remove the specified resource from storage. | public function destroy($id)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }",
"public function destroy(Resource $resource)\n {\n //\n }",
"public function removeResource($resourceID)\n\t\t{\n\t\t}",
"public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }",
"public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }",
"public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }",
"public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }",
"protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }",
"public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }",
"public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }",
"public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }",
"public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}",
"public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}",
"public function delete(): void\n {\n unlink($this->getPath());\n }",
"public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }",
"public function remove($path);",
"function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}",
"public function delete(): void\n {\n unlink($this->path);\n }",
"private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }",
"public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }",
"public function remove() {}",
"public function remove() {}",
"public function remove();",
"public function remove();",
"public function remove();",
"public function remove();",
"function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}",
"public function deleteImage(){\n\n\n Storage::delete($this->image);\n }",
"public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }",
"public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}",
"public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }",
"public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }",
"public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}",
"public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }",
"public function deleteImage(){\n \tStorage::delete($this->image);\n }",
"public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }",
"public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }",
"public function destroy($id)\n {\n Myfile::find($id)->delete();\n }",
"public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }",
"public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }",
"public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }",
"public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }",
"public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }",
"public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }",
"public function delete($path);",
"public function delete($path);",
"public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }",
"public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }",
"public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }",
"public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }",
"public function delete($path, $data = null);",
"public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }",
"public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }",
"public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }",
"public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }",
"public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }",
"public function del($path){\n\t\treturn $this->remove($path);\n\t}",
"public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }",
"public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}",
"public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }",
"public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }",
"public function revoke($resource, $permission = null);",
"public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }",
"function delete($path);",
"public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}",
"public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }",
"public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }",
"public function remove($filePath){\n return Storage::delete($filePath);\n }",
"public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }",
"public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }",
"public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }",
"public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }",
"function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }",
"public function remove($id);",
"public function remove($id);",
"public function deleted(Storage $storage)\n {\n //\n }",
"public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }",
"public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }",
"public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }",
"public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }",
"function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}",
"public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }",
"public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}",
"public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }",
"public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }"
] | [
"0.6672584",
"0.6659381",
"0.6635911",
"0.6632799",
"0.6626075",
"0.65424126",
"0.65416265",
"0.64648265",
"0.62882507",
"0.6175931",
"0.6129922",
"0.60893893",
"0.6054415",
"0.60428125",
"0.60064924",
"0.59337646",
"0.5930772",
"0.59199584",
"0.5919811",
"0.5904504",
"0.5897263",
"0.58962846",
"0.58951396",
"0.58951396",
"0.58951396",
"0.58951396",
"0.5880124",
"0.58690923",
"0.5863659",
"0.5809161",
"0.57735413",
"0.5760811",
"0.5753559",
"0.57492644",
"0.5741712",
"0.57334286",
"0.5726379",
"0.57144034",
"0.57096",
"0.5707689",
"0.5705895",
"0.5705634",
"0.5703902",
"0.5696585",
"0.5684331",
"0.5684331",
"0.56780374",
"0.5677111",
"0.5657287",
"0.5648262",
"0.5648085",
"0.5648012",
"0.5640759",
"0.5637738",
"0.5629985",
"0.5619264",
"0.56167465",
"0.5606877",
"0.56021434",
"0.5601949",
"0.55992156",
"0.5598557",
"0.55897516",
"0.5581397",
"0.5566926",
"0.5566796",
"0.55642897",
"0.55641",
"0.5556583",
"0.5556536",
"0.5550097",
"0.5543172",
"0.55422723",
"0.5540013",
"0.5540013",
"0.55371785",
"0.55365825",
"0.55300397",
"0.552969",
"0.55275744",
"0.55272335",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.5525997",
"0.5525624",
"0.5523911",
"0.5521122",
"0.5517412"
] | 0.0 | -1 |
Includes the files needed for the Bookings | function wpbs_include_files_booking()
{
// Get booking dir path
$dir_path = plugin_dir_path(__FILE__);
// Include main Booking class
if (file_exists($dir_path . 'class-booking.php')) {
include $dir_path . 'class-booking.php';
}
// Include the db layer classes
if (file_exists($dir_path . 'class-object-db-bookings.php')) {
include $dir_path . 'class-object-db-bookings.php';
}
if (file_exists($dir_path . 'class-object-meta-db-bookings.php')) {
include $dir_path . 'class-object-meta-db-bookings.php';
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function includes() {\n\t\trequire_once( PRODUCT_LIST_DIR . 'classes/class-product_list.php' );\n\t\t//require_once( PRODUCT_LIST_DIR . 'classes/class-yc_admin_cursos-settings.php' );\n\t}",
"public function includes() {\n \n include_once( 'widgets/carousel.php' );\n include_once( 'widgets/fancy-text.php' );\n include_once( 'widgets/grid.php' );\n include_once( 'widgets/maps.php' );\n include_once( 'widgets/pricing-table.php' );\n include_once( 'widgets/progress-bar.php' );\n include_once( 'widgets/vertical-scroll.php' );\n \n }",
"static function loadFiles()\r\n\t{\r\n\t\t//required files\r\n\t\t\r\n\t\t//load bibliotek\r\n\t\t$paths = array(rp_self.\"lib/\");\r\n\t\t$to_header = array();\r\n\t\tforeach($paths as $path)\r\n\t\t{\r\n\t\t\t$scan = scandir($path);\r\n\t\t\tforeach($scan as $file)\r\n\t\t\t{\r\n\t\t\t\tif(is_file($path.$file))\r\n\t\t\t\t{\r\n\t\t\t\t\t$ext = explode(\".\", $file);\r\n\t\t\t\t\t$ext = $ext[1];\r\n\t\t\t\t\tif($ext == \"php\")\r\n\t\t\t\t\t\trequire_once($path.$file);\r\n\t\t\t\t\t\r\n\t\t\t\t\t//tilføj script tag til header hvis det er javascript\r\n\t\t\t\t\tif($ext == 'js')\r\n\t\t\t\t\t\t$to_header[] = '<script type=\"text/javascript\" src=\"'.$path.$file.'\"></script>';\r\n\t\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn implode('', $to_header);\r\n\t}",
"private function includes(){\n\n\t\tinclude( WPTT_ICS_FEED_FOLDER . '/EasyPeasyICS.php' );\n\n\t}",
"public function includes() {\n\n\t\t/**\n\t\t * Core classes.\n\t\t */\n\t\tinclude_once F9JOBS_ABSPATH . 'includes/f9jobs-core-functions.php';\n\t\tinclude_once F9JOBS_ABSPATH . 'includes/class-f9jobs-post-types.php';\n\t\tinclude_once F9JOBS_ABSPATH . 'includes/class-f9jobs-install.php';\n\t}",
"public function assembleBook()\n {\n $this->app->edition('id', $this->app['publishing.id']);\n\n // variables needed to hold the list of images and fonts of the book\n $bookImages = array();\n $bookFonts = array();\n\n // prepare the temp directory used to build the book\n $bookTempDir = $this->app['app.dir.cache']\n .'/'.$this->app['publishing.book.slug']\n .'-'.$this->app['publishing.edition'];\n\n $this->app->get('filesystem')->mkdir(array(\n $bookTempDir,\n $bookTempDir.'/book',\n $bookTempDir.'/book/META-INF',\n $bookTempDir.'/book/OEBPS',\n $bookTempDir.'/book/OEBPS/css',\n $bookTempDir.'/book/OEBPS/images',\n $bookTempDir.'/book/OEBPS/fonts',\n ));\n\n // generate easybook CSS file\n if ($this->app->edition('include_styles')) {\n $this->app->renderThemeTemplate(\n 'style.css.twig',\n array('resources_dir' => '..'),\n $bookTempDir.'/book/OEBPS/css/easybook.css'\n );\n\n // copy book fonts and prepare font data for ebook manifest\n $this->app->get('filesystem')->copy(\n $this->app['app.dir.resources'].'/Fonts/Inconsolata/Inconsolata.ttf',\n $bookTempDir.'/book/OEBPS/fonts/Inconsolata.ttf'\n );\n $bookFonts[] = array(\n 'id' => 'font-1',\n 'filePath' => 'fonts/Inconsolata.ttf',\n 'mediaType' => 'application/octet-stream'\n );\n }\n\n // generate custom CSS file\n $customCss = $this->app->getCustomTemplate('style.css');\n if (file_exists($customCss)) {\n $this->app->get('filesystem')->copy(\n $customCss,\n $bookTempDir.'/book/OEBPS/css/styles.css',\n true\n );\n }\n\n // each book element will generate an HTML page\n // use automatic slugs (chapter-1, chapter-2, ...) instead of\n // semantic slugs (lorem-ipsum, dolor-sit-amet, ...)\n $this->app->set('publishing.slugs', array());\n $items = array();\n foreach ($this->app['publishing.items'] as $item) {\n $pageName = array_key_exists('number', $item['config'])\n ? $item['config']['element'].' '.$item['config']['number']\n : $item['config']['element'];\n\n $slug = $this->app->get('slugger')->slugify(trim($pageName));\n\n $item['slug'] = $slug;\n // TODO: document this new item property\n $item['fileName'] = $slug.'.html';\n $items[] = $item;\n }\n // update `publishing items` with the new slug value\n $this->app->set('publishing.items', $items);\n\n // generate one HTML page for every book item\n $items = array();\n foreach ($this->app['publishing.items'] as $item) {\n $this->app->renderThemeTemplate('chunk.twig', array(\n 'item' => $item,\n 'has_custom_css' => file_exists($customCss),\n ),\n $bookTempDir.'/book/OEBPS/'.$item['fileName']\n );\n }\n\n // copy book images and prepare image data for ebook manifest\n if (file_exists($imagesDir = $this->app['publishing.dir.contents'].'/images')) {\n $images = $this->app->get('finder')->files()->in($imagesDir);\n\n $i = 1;\n foreach ($images as $image) {\n $this->app->get('filesystem')->copy(\n $image->getPathName(),\n $bookTempDir.'/book/OEBPS/images/'.$image->getFileName()\n );\n\n $bookImages[] = array(\n 'id' => 'figure-'.$i++,\n 'filePath' => 'images/'.$image->getFileName(),\n 'mediaType' => 'image/'.pathinfo($image->getFilename(), PATHINFO_EXTENSION)\n );\n }\n }\n\n // look for cover images\n $cover = null;\n if (null != $image = $this->app->getCustomCoverImage()) {\n list($width, $height, $type) = getimagesize($image);\n $cover = array(\n 'height' => $height,\n 'width' => $width,\n 'filePath' => 'images/'.basename($image),\n 'mediaType' => image_type_to_mime_type($type)\n );\n\n // copy the cover image\n $this->app->get('filesystem')->copy(\n $image,\n $bookTempDir.'/book/OEBPS/images/'.basename($image)\n );\n }\n\n // generate book cover\n $this->app->renderThemeTemplate('cover.twig', array(\n 'cover' => $cover\n ),\n $bookTempDir.'/book/OEBPS/titlepage.html'\n );\n\n // generate OPF file\n $this->app->renderThemeTemplate('content.opf.twig', array(\n 'cover' => $cover,\n 'has_custom_css' => file_exists($customCss),\n 'fonts' => $bookFonts,\n 'images' => $bookImages\n ),\n $bookTempDir.'/book/OEBPS/content.opf'\n );\n\n // generate NCX file\n $this->app->renderThemeTemplate('toc.ncx.twig', array(),\n $bookTempDir.'/book/OEBPS/toc.ncx'\n );\n\n // generate container.xml and mimetype files\n $this->app->renderThemeTemplate('container.xml.twig', array(),\n $bookTempDir.'/book/META-INF/container.xml'\n );\n $this->app->renderThemeTemplate('mimetype.twig', array(),\n $bookTempDir.'/book/mimetype'\n );\n\n // compress book contents as ZIP file and rename to .epub\n // TODO: the name of the book file (book.epub) must be configurable\n Toolkit::zip($bookTempDir.'/book', $bookTempDir.'/book.zip');\n $this->app->get('filesystem')->copy(\n $bookTempDir.'/book.zip',\n $this->app['publishing.dir.output'].'/book.epub',\n true\n );\n\n // remove temp directory used to build the book\n $this->app->get('filesystem')->remove($bookTempDir);\n }",
"private function includes() {\n \t$includes = array(\n \t\t'/includes/event-custom-post-type.php',\n \t\t'/includes/shortcodes.php',\n \t\t'/includes/display-helper.php',\n \t\t'/includes/query-helper.php'\n \t);\n \t\n \t$admin_includes = array();\n \t\n \tif ( file_exists( dirname( __FILE__ ) . '/includes/cmb2/init.php' ) ) {\n \trequire_once dirname( __FILE__ ) . '/includes/cmb2/init.php';\n } elseif ( file_exists( dirname( __FILE__ ) . '/includes/CMB2/init.php' ) ) {\n \trequire_once dirname( __FILE__ ) . '/includes/CMB2/init.php';\n }\n \n \t// Load files\n \tforeach ( $includes as $file ) {\n \t\tif ( file_exists( dirname( __FILE__ ) . $file ) ) {\n \t\t\trequire_once dirname( __FILE__ ) . $file;\n \t\t}\n \t}\n \n \t// Load admin files\n \tif ( is_admin() ) {\n \t\tforeach ( $admin_includes as $file ) {\n \t\t\tif ( file_exists( dirname( __FILE__ ) . $file ) ) {\n \t\t\t\trequire_once dirname( __FILE__ ) . $file;\n \t\t\t}\n \t\t}\n \t}\n }",
"public function includes(){\n\t\t// Load the Email Designer class\n\t\trequire_once( trailingslashit( plugin_dir_path( __FILE__ ) ) . 'includes/class-email-designer.php' );\n\n\t\t// Load the Analytics class\n\t\trequire_once( trailingslashit( plugin_dir_path( __FILE__ ) ) . 'includes/class-analytics.php' );\n\t}",
"private static function load_files() {\n\t\t\t// Classes.\n\t\t\tinclude_once ASTRA_ADDON_EXT_ADVANCED_HEADERS_DIR . 'classes/class-astra-ext-advanced-headers-data.php';\n\t\t\t// Load Astra Breadcrumbs.\n\t\t\tinclude_once ASTRA_ADDON_EXT_ADVANCED_HEADERS_DIR . 'classes/astra-breadcrumbs.php';\n\t\t}",
"public function includes() {\n include_once('default/default-interface.php');\n include_once('default/default-model.php');\n include_once('default/customer-completed-order.php');\n include_once('default/customer-completed-pre-order.php');\n include_once('default/notify-import-finished.php');\n include_once('default/notify-low-balance.php');\n include_once('default/notify-preorder.php');\n include_once('default/order-error.php');\n \n include_once('prepare/class-wp-emaila-custom-post.php');\n include_once('prepare/class-wp-radio-taxonomy.php');\n include_once('prepare/class-wp-email-custom-post-generator.php');\n \n include_once('wp-send-code-mail.php');\n include_once('wp-admin-error-mail.php');\n include_once('wp-admin-general-error.php');\n include_once('wp-admin-import-finished.php');\n }",
"public function includes() {\n\t\trequire_once( plugin_dir_path( __FILE__ ) . 'class-productflow-admin.php' );\n\t\trequire_once( plugin_dir_path( __FILE__ ) . 'class-productflow-filters.php' );\n\t}",
"function includes() {\r\n\t\t\trequire_once( trailingslashit( RV_PORTFOLIO_DIR ) . 'inc/public/class-rv-portfolio-registration.php' );\r\n\t\t}",
"private function includes() {\n\t\t\t// By default, comments are disjoined from the other post types.\n\t\t\trequire_once( $this->includes_dir . 'comments.php' );\n\n\t\t\t// Settings\n\t\t\trequire_once( $this->includes_dir . 'settings.php' );\n\t\t}",
"public function includes()\n {\n require_once(__DIR__ . '/Widgets/SuperglobalsWidget.php');\n }",
"public function wrp_includes(){\n\n //Our test class\n\t\t//include_once WRP_ABSPATH . 'includes/class-wrp-test.php';\n\t\t\n\t\t//REST API extension class\n\t\tinclude_once WRP_ABSPATH . 'includes/class-wrp-rest.php';\n\n\t\t//Flow2b API setting\n\t\tinclude_once WRP_ABSPATH . 'includes/api_setting.php';\n\n\t\t//Our hooks class\n\t\tinclude_once WRP_ABSPATH . 'includes/class-wrp-hooks.php';\n\n\t}",
"public function includes() {\n\t\t/**\n\t\t * Gateway Class.\n\t\t */\n\t\tinclude_once( paytwit_PATH . 'class-gateway.php' );\n\n\t}",
"private function _include_files() {\n\n require_once( KP_DIR_PATH . 'includes/korapay-shortcode.php' );\n require_once( KP_DIR_PATH . 'includes/korapay-admin-settings.php' );\n require_once( KP_DIR_PATH . 'includes/korapay-payment-list-class.php' );\n require_once( KP_DIR_PATH . 'includes/vc-elements/simple-vc-pay-now-form.php' );\n\n if ( is_admin() ) {\n require_once( KP_DIR_PATH . 'includes/korapay-tinymce-plugin-class.php' );\n }\n\n }",
"public function includes() {\n\n\t\t// gateway classes\n\t\trequire_once( $this->get_plugin_path() . '/includes/abstract-wc-gateway-elavon-converge.php' );\n\t\trequire_once( $this->get_plugin_path() . '/includes/class-wc-gateway-elavon-converge-credit-card.php' );\n\t\trequire_once( $this->get_plugin_path() . '/includes/class-wc-gateway-elavon-converge-echeck.php' );\n\t\trequire_once( $this->get_plugin_path() . '/includes/class-wc-gateway-elavon-converge-token.php' );\n\t\trequire_once( $this->get_plugin_path() . '/includes/class-wc-gateway-elavon-converge-tokens-handler.php' );\n\n\t\t// payment forms\n\t\trequire_once( $this->get_plugin_path() . '/includes/payment-forms/class-wc-elavon-converge-payment-form.php' );\n\t\trequire_once( $this->get_plugin_path() . '/includes/payment-forms/class-wc-elavon-converge-echeck-payment-form.php' );\n\t}",
"private static function _includes()\n {\n /**\n * Includes\n */\n include_once 'functions/register-post-types.php';\n include_once 'functions/register-taxonomies.php';\n include_once 'functions/register-menus.php';\n }",
"private function include_widgets_files() {\n\t\trequire_once( __DIR__ . '/widgets/be-counter.php' );\n\t\trequire_once( __DIR__ . '/widgets/be-post.php' );\n\t\trequire_once( __DIR__ . '/widgets/subhead-bodycopy.php' );\n\t\trequire_once( __DIR__ . '/widgets/heading-media-bodycopy.php' );\n\t\trequire_once( __DIR__ . '/widgets/sidebar.php' );\n\t\trequire_once( __DIR__ . '/widgets/useful-links-info.php' );\n\t\trequire_once( __DIR__ . '/widgets/accordion-navigation-tabs.php' );\n\t\trequire_once( __DIR__ . '/widgets/content-filter.php' );\n\t\trequire_once( __DIR__ . '/widgets/secondary-ctas.php' );\n\t\trequire_once( __DIR__ . '/widgets/alert-banner.php' );\n\t\trequire_once( __DIR__ . '/widgets/alert-banner.php' );\n\t\trequire_once( __DIR__ . '/widgets/resources.php' );\n\t\trequire_once( __DIR__ . '/widgets/repeater-resources.php' );\n\t\trequire_once( __DIR__ . '/widgets/card-lrg.php' );\n\t\trequire_once( __DIR__ . '/widgets/be-promo.php' );\n\t\trequire_once( __DIR__ . '/widgets/be-latest-resources.php' );\n\t\trequire_once( __DIR__ . '/widgets/be-popular-results.php' );\n\t\trequire_once( __DIR__ . '/widgets/be-top-faq.php' );\n\t\trequire_once( __DIR__ . '/widgets/be-card-carousel.php' );\n\t\t// M.8.3 Card lrg (landing page)\n\t}",
"public function includes() {\n\t\trequire_once( 'metabox.php' );\n\t}",
"public function include_files(){\r\n\r\n require( WOOLENTOR_ADDONS_PL_PATH_PRO.'includes/helper-function.php' );\r\n require( WOOLENTOR_ADDONS_PL_PATH_PRO.'classes/class.assest_management.php' );\r\n require( WOOLENTOR_ADDONS_PL_PATH_PRO.'classes/class.widgets_control.php' );\r\n require( WOOLENTOR_ADDONS_PL_PATH_PRO.'classes/class.my_account.php' );\r\n require( WOOLENTOR_ADDONS_PL_PATH_PRO.'classes/class.wc-shortcode-products.php' );\r\n if( !empty( woolentor_get_option_pro( 'productcheckoutpage', 'woolentor_woo_template_tabs', '0' ) ) ){\r\n require( WOOLENTOR_ADDONS_PL_PATH_PRO.'classes/class.checkout_page.php' );\r\n }\r\n\r\n // Admin Setting file\r\n if( is_admin() ){\r\n require( WOOLENTOR_ADDONS_PL_PATH_PRO.'includes/licence/WooLentorPro.php' );\r\n require( WOOLENTOR_ADDONS_PL_PATH_PRO.'includes/custom-metabox.php' );\r\n }\r\n\r\n // Builder File\r\n if( woolentor_get_option_pro( 'enablecustomlayout', 'woolentor_woo_template_tabs', 'on' ) == 'on' ){\r\n include( WOOLENTOR_ADDONS_PL_PATH_PRO.'includes/wl_woo_shop.php' );\r\n if( !is_admin() && woolentor_get_option_pro( 'enablerenamelabel', 'woolentor_rename_label_tabs', 'off' ) == 'on' ){\r\n include( WOOLENTOR_ADDONS_PL_PATH_PRO.'includes/rename_label.php' );\r\n }\r\n require( WOOLENTOR_ADDONS_PL_PATH_PRO.'classes/class.third_party.php' );\r\n }\r\n\r\n // Sale Notification\r\n if( woolentor_get_option_pro( 'enableresalenotification', 'woolentor_sales_notification_tabs', 'off' ) == 'on' ){\r\n if( woolentor_get_option_pro( 'notification_content_type', 'woolentor_sales_notification_tabs', 'actual' ) == 'fakes' ){\r\n include( WOOLENTOR_ADDONS_PL_PATH_PRO. 'includes/class.sale_notification_fake.php' );\r\n }else{\r\n include( WOOLENTOR_ADDONS_PL_PATH_PRO. 'includes/class.sale_notification.php' );\r\n }\r\n }\r\n \r\n // WooLentor Extension\r\n require( WOOLENTOR_ADDONS_PL_PATH_PRO.'classes/class.extension.php' );\r\n\r\n }",
"private function includes() {\n\t\t// functions\n\t\tinclude_once( 'includes/kopa-core-functions.php' );\n\n\t\t// settings class (special important class)\n\t\tinclude_once( 'includes/admin/class-kopa-admin-settings.php' );\n\n\t\t// frontend assets class\n\t\tinclude_once( 'includes/class-kopa-frontend-assets.php' );\n\n\t\t// abstract widget class\n\t\tinclude_once( 'includes/abstracts/abstract-kopa-widget.php' );\n\n\t\tif ( defined( 'DOING_AJAX' ) ) {\n\t\t\t$this->ajax_includes();\n\t\t}\n\n\t\tif ( is_admin() ) {\n\t\t\tinclude_once( 'includes/admin/class-kopa-admin.php' );\n\t\t}\n\n\t}",
"public function include_files()\n\t{\n\t\trequire_once(WP_PARSI_DIR . 'includes/settings.php');\n\t\tglobal $wpp_settings;\n\t\t$wpp_settings = wp_parsi_get_settings();\n\n\t\t$files = array(\n\t\t\t'parsidate',\n\t\t\t'general',\n\t\t\t'fixes-archive',\n\t\t\t'fixes-permalinks',\n\t\t\t'fixes-dates',\n\t\t\t'fixes-misc',\n\t\t\t'admin/styles-fix',\n\t\t\t'admin/lists-fix',\n\t\t\t'admin/other-fix',\n\t\t\t'fixes-calendar',\n\t\t\t'fixes-archives',\n\t\t\t'plugins/woocommerce',\n\t\t\t'plugins/edd',\n\t\t\t'widget/widget_archive',\n\t\t\t'widget/widget_calendar'\n\t\t);\n\n\t\tforeach ($files as $file)\n\t\t\trequire_once(WP_PARSI_DIR . 'includes/' . $file . '.php');\n\n\t\tif (get_locale() == 'fa_IR')\n\t\t\tload_textdomain('wp-parsidate', WP_PARSI_DIR . 'parsi-languages/fa_IR.mo');\n\n\t\tadd_action('widgets_init', array($this, 'register_widget'));\n\t}",
"public function includes() {\r\n\t\t//Insert here all needed models\r\n\t\tglobal $wpdb;\r\n\r\n\t\t//Insert here all needed models\r\n\t\trequire_once MD_PLUGIN_DIR.'models/class-md-market-downloads-model.php';\r\n\t\t$this->MD_Model = new MD_Market_Downloads_Model($wpdb);\r\n\r\n\t\trequire_once $this->admin_url.'controller/class-md-browse-files-table.php';\r\n\r\n\t\tif(isset($_GET['post_type']) && $_GET['post_type'] == 'market-reports'){\r\n\t\t\t$this->files_table = new MD_Browse_Files_Table($wpdb);\t\r\n\t\t}\r\n\t\t\r\n\t}",
"public function assembleBook()\n {\n $book = $this->app->render('book.twig', array(\n 'items' => $this->app['publishing.items']\n ));\n $temp = tempnam(sys_get_temp_dir(), 'easybook_');\n fputs(fopen($temp, 'w+'), $book);\n\n // use PrinceXML to transform the HTML book into a PDF book\n $prince = $this->app->get('prince');\n $prince->setBaseURL($this->app['publishing.dir.contents'].'/images');\n\n // Prepare and add stylesheets before PDF conversion\n if ($this->app->edition('include_styles')) {\n $defaultStyles = tempnam(sys_get_temp_dir(), 'easybook_style_');\n $this->app->render('@theme/style.css.twig', array(\n 'resources_dir' => $this->app['app.dir.resources'].'/'\n ),\n $defaultStyles\n );\n\n $prince->addStyleSheet($defaultStyles);\n }\n\n // TODO: custom book styles could also be defined with Twig\n $customCss = $this->app->getCustomTemplate('style.css');\n if (file_exists($customCss)) {\n $prince->addStyleSheet($customCss);\n }\n\n // TODO: the name of the book file (book.pdf) must be configurable\n $errorMessages = array();\n $prince->convert_file_to_file($temp, $this->app['publishing.dir.output'].'/book.pdf', $errorMessages);\n\n // show PDF conversion errors\n if (count($errorMessages) > 0) {\n foreach ($errorMessages as $message) {\n echo $message[0].': '.$message[2].' ('.$message[1].')'.\"\\n\";\n }\n }\n }",
"function _includes() {\n require_once($this->plugin_dir . 'include/actions_class.php');\n require_once($this->plugin_dir . 'include/admin_actions_class.php');\n require_once($this->plugin_dir . 'include/admin_filters_class.php');\n require_once($this->plugin_dir . 'include/ui_class.php');\n require_once($this->plugin_dir . 'include/widget_class.php');\n require_once($this->plugin_dir . 'include/extra_help_class.php');\n require_once($this->plugin_dir . 'include/mobile-listener.php');\n }",
"private function require_files() {\n\t\tif ( file_exists( ABSPATH . '/wp-admin/includes/screen.php' ) ) {\n\t\t\tinclude_once ABSPATH . '/wp-admin/includes/screen.php';\n\t\t}\n\t\tinclude_once ABSPATH . '/wp-admin/includes/template.php';\n\t\tinclude_once ABSPATH . '/wp-admin/includes/misc.php';\n\t\tinclude_once ABSPATH . '/wp-admin/includes/class-wp-upgrader.php';\n\t\tinclude_once ABSPATH . '/wp-admin/includes/plugin.php';\n\t}",
"private function includes()\n\t\t{\n\t\t\trequire_once dirname( __FILE__ ) . '/sf-class-sanitize.php';\n\t\t\trequire_once dirname( __FILE__ ) . '/sf-class-format-options.php';\n\t\t\tnew SF_Sanitize;\n\t\t}",
"protected function load_files() {\n\t\trequire_once __DIR__ . '/class-papi-admin-meta-handler.php';\n\t\trequire_once __DIR__ . '/class-papi-admin-option-handler.php';\n\t\trequire_once __DIR__ . '/class-papi-admin-entry-post.php';\n\t\trequire_once __DIR__ . '/class-papi-admin-entry-taxonomy.php';\n\t\trequire_once __DIR__ . '/class-papi-admin-columns.php';\n\t\trequire_once __DIR__ . '/class-papi-admin-page-type-switcher.php';\n\t}",
"public function includes() {\n\n\t\t\tinclude_once $this->includes_path() . 'class-cyprus-images.php';\n\t\t\tinclude_once $this->includes_path() . 'extensions/menu/class-cyprus-menu-manager.php';\n\t\t\tinclude_once $this->includes_path() . 'class-cyprus-sidebars.php';\n\t\t\tinclude_once $this->includes_path() . 'contact-form.php';\n\n\t\t\t// Widgets.\n\t\t\tinclude_once $this->includes_path() . 'widgets/widget-aboutme.php';\n\t\t\tinclude_once $this->includes_path() . 'widgets/widget-adcode.php';\n\t\t\tinclude_once $this->includes_path() . 'widgets/widget-ad125.php';\n\t\t\tinclude_once $this->includes_path() . 'widgets/widget-ad300.php';\n\t\t\tinclude_once $this->includes_path() . 'widgets/widget-tweets.php';\n\t\t\tinclude_once $this->includes_path() . 'widgets/widget-instagram.php';\n\t\t\tinclude_once $this->includes_path() . 'widgets/widget-recentposts.php';\n\t\t\tinclude_once $this->includes_path() . 'widgets/widget-relatedposts.php';\n\t\t\tinclude_once $this->includes_path() . 'widgets/widget-authorposts.php';\n\t\t\tinclude_once $this->includes_path() . 'widgets/widget-popular.php';\n\t\t\tinclude_once $this->includes_path() . 'widgets/widget-fblikebox.php';\n\t\t\tinclude_once $this->includes_path() . 'widgets/widget-social.php';\n\t\t\tinclude_once $this->includes_path() . 'widgets/widget-catposts.php';\n\t\t\tinclude_once $this->includes_path() . 'widgets/widget-postslider.php';\n\n\t\t\t// Load WooCommerce.\n\t\t\trequire_if_theme_supports( 'woocommerce', $this->includes_path() . 'vendors/woocommerce/woocommerce-init.php' );\n\t\t}",
"private function packFiles()\n {\n // load core\n $this->builder->putVehicle($this->builder->createVehicle('xPDOFileVehicle', [\n 'vehicle_class' => 'xPDOFileVehicle',\n 'object' => [\n 'source' => __DIR__ . '/../core/components/' . self::PKG_NAME,\n 'target' => \"return MODX_CORE_PATH . 'components/';\"\n ]\n ]));\n\n // load assets\n $this->builder->putVehicle($this->builder->createVehicle('xPDOFileVehicle', [\n 'vehicle_class' => 'xPDOFileVehicle',\n 'object' => [\n 'source' => __DIR__ . '/../assets/components/' . self::PKG_NAME,\n 'target' => \"return MODX_ASSETS_PATH . 'components/';\"\n ]\n ]));\n }",
"public function processIncludes() {}",
"private function include_widgets_files() {\n\t\trequire_once( __DIR__ . '/widgets/ele-subcats.php' );\n\t}",
"public function includes()\n {\n add_action('plugins_loaded', array($this, 'load_php_files'), 10);\n add_action('init', array(__CLASS__, 'prefix_add_api_endpoints'));\n add_action('template_redirect', array($this, 'prefix_do_api'));\n add_filter('posts_request', array($this, 'disable_main_query_wordpress'), 10, 2);\n add_action('wp_enqueue_scripts', array($this, 'register_js_script'), 5);\n }",
"public function include_classes() {\n\t\trequire MOP__PLUGIN_DIR . 'includes/class-cpt-student.php';\n\t\trequire MOP__PLUGIN_DIR . 'includes/class-student-widget.php';\n\t}",
"public function load_files() {\n\n\t\t// Load our admin-related functions.\n\t\tif ( is_admin() ) {\n\t\t\trequire_once( GUPR_DIR . 'lib/admin.php' );\n\t\t}\n\t}",
"private function include_widgets_files() {\n\t\t\n\t\t require_once( __DIR__ . '/widgets/main-slider.php' );\n\t\t\n\t\t require_once( __DIR__ . '/widgets/call-to-action-text.php' );\n\t\t require_once( __DIR__ . '/widgets/call-to-action-image.php' );\n\t\t require_once( __DIR__ . '/widgets/project-facts.php' );\n\t\t require_once( __DIR__ . '/widgets/noble-cause.php' );\n\t\t\n\t\t require_once( __DIR__ . '/widgets/fancy-heading.php' );\n\t\t\n\t\t \n\t\t require_once( __DIR__ . '/widgets/timeline.php' );\n\t\t\n\t\t require_once( __DIR__ . '/widgets/CPT/wp-elementor-events.php' );\n\t\t require_once( __DIR__ . '/widgets/CPT/wp-elementor-events-cta.php' );\n\t\n\t\t require_once( __DIR__ . '/widgets/CPT/wp-elementor-woo.php' );\n\t\t require_once( __DIR__ . '/widgets/CPT/wp-elementor-posts.php' );\n\t\t\n\t\t require_once( __DIR__ . '/widgets/gallery.php' );\n\t\t require_once( __DIR__ . '/widgets/sub-header.php' );\n\n\n\t\t require_once( __DIR__ . '/widgets/call-to-action-small-box.php' );\n\t\t require_once( __DIR__ . '/widgets/call-to-action-banner.php' );\n\t\t require_once( __DIR__ . '/widgets/call-to-action-contact.php' );\n\t\t\n\t\t require_once( __DIR__ . '/widgets/newsletter.php' );\n\t}",
"public function loadIncludes() {\n // TODO: better way to skip load includes.\n $this->addCSS($this->env->dir['tmp_files'] . '/css.min.css');\n $this->addJS('/tmp/js.min.js');\n }",
"protected function _includes() {\r\n\t\t\tinclude_once LP_ADDON_PAYIR_PAYMENT_INC . 'class-lp-gateway-payir.php';\r\n\t\t}",
"public function includes() {\n\n\t\t// template functions\n\t\trequire_once( $this->get_plugin_path() . '/includes/wc-pip-template-functions.php' );\n\n\t\t// abstract class\n\t\trequire_once( $this->get_plugin_path() . '/includes/abstract-wc-pip-document.php' );\n\n\t\t// invoices\n\t\trequire_once( $this->get_plugin_path() . '/includes/class-wc-pip-document-invoice.php' );\n\n\t\t// packing lists\n\t\trequire_once( $this->get_plugin_path() . '/includes/class-wc-pip-document-packing-list.php' );\n\t\trequire_once( $this->get_plugin_path() . '/includes/class-wc-pip-document-pick-list.php' );\n\n\t\t// handler\n\t\t$this->handler = $this->load_class( '/includes/class-wc-pip-handler.php', 'WC_PIP_Handler' );\n\n\t\t// print documents\n\t\t$this->print = $this->load_class( '/includes/class-wc-pip-print.php', 'WC_PIP_Print' );\n\n\t\t// document emails\n\t\t$this->emails = $this->load_class( '/includes/class-wc-pip-emails.php', 'WC_PIP_Emails' );\n\n\t\tif ( is_admin() ) {\n\t\t\t// admin side\n\t\t\t$this->admin_includes();\n\t\t} else {\n\t\t\t// frontend side\n\t\t\t$this->frontend = $this->load_class( '/includes/frontend/class-wc-pip-frontend.php', 'WC_PIP_Frontend' );\n\t\t}\n\n\t\t// ajax\n\t\tif ( is_ajax() ) {\n\t\t\t$this->ajax = $this->load_class( '/includes/class-wc-pip-ajax.php', 'WC_PIP_Ajax' );\n\t\t}\n\n\t\t// template customizer\n\t\t$this->customizer = $this->load_class( '/includes/admin/class-wc-pip-customizer.php', 'WC_PIP_Customizer' );\n\n\t\t// integrations\n\t\t$this->integrations = $this->load_class( '/includes/integrations/class-wc-pip-integrations.php', 'WC_PIP_Integrations' );\n\t}",
"public function includeLibs()\n {\n $string = '';\n\n if($this->css_files)\n {\n foreach( $this->css_files as &$css_file )\n {\n $string .= '<link rel=\"stylesheet\" href=\"' . $css_file . '\" type=\"text/css\" />';\n }\n }\n \n if($this->js_files)\n {\n foreach( $this->js_files as &$js_file )\n {\n $string .= PHP_EOL . '<script src=\"' . $js_file . '\" type=\"text/javascript\"></script>';\n }\n }\n $this->tpl->assign(\"libs\", $string . PHP_EOL);\n }",
"public function includes() {\n\n\t\t\tinclude_once $this->plugin_dir( 'admin/includes/class-monstroid-dashboard-interface.php' );\n\t\t\tinclude_once $this->plugin_dir( 'admin/includes/class-monstroid-dashboard-updater.php' );\n\t\t\tinclude_once $this->plugin_dir( 'admin/includes/class-monstroid-dashboard-notices.php' );\n\t\t\tinclude_once $this->plugin_dir( 'admin/includes/class-monstroid-dashboard-ui-handlers.php' );\n\t\t\tinclude_once $this->plugin_dir( 'admin/includes/class-monstroid-dashboard-filesystem.php' );\n\n\t\t}",
"protected function _includes() {\n\t\t\tinclude_once LP_ADDON_STRIPE_ADVANCED_PAYMENT_INC . 'functions.php';\n\t\t\tinclude_once LP_ADDON_STRIPE_ADVANCED_PAYMENT_INC . 'class-lp-gateway-stripe.php';\n\t\t}",
"function includes() {\n\t\trequire_once(dirname(__FILE__) . '/functions/helpers/class-theater-helpers-time.php');\n\n\t\trequire_once(dirname(__FILE__) . '/functions/wpt_listing.php');\n\t\trequire_once(dirname(__FILE__) . '/functions/event/class-theater-event-archive.php');\n\t\trequire_once(dirname(__FILE__) . '/functions/event/class-theater-event-order.php');\n\n\t\trequire_once(dirname(__FILE__) . '/functions/template/wpt_template.php');\t\n\t\trequire_once(dirname(__FILE__) . '/functions/template/wpt_template_placeholder.php');\t\n\t\trequire_once(dirname(__FILE__) . '/functions/template/wpt_template_placeholder_filter.php');\t\n\n\t\trequire_once(dirname(__FILE__) . '/functions/wpt_production.php');\n\t\trequire_once(dirname(__FILE__) . '/functions/wpt_production_permalink.php');\t\n\t\trequire_once(dirname(__FILE__) . '/functions/wpt_production_template.php');\t\n\t\trequire_once(dirname(__FILE__) . '/functions/wpt_production_widget.php');\n\n\t\trequire_once(dirname(__FILE__) . '/functions/wpt_productions.php');\n\t\trequire_once(dirname(__FILE__) . '/functions/wpt_productions_admin.php');\t\n\t\trequire_once(dirname(__FILE__) . '/functions/wpt_productions_list_table.php');\t\n\n\t\trequire_once(dirname(__FILE__) . '/functions/wpt_event.php');\n\t\trequire_once(dirname(__FILE__) . '/functions/wpt_event_admin.php');\t\n\t\trequire_once(dirname(__FILE__) . '/functions/wpt_event_editor.php');\t\n\t\trequire_once(dirname(__FILE__) . '/functions/wpt_event_template.php');\t\n\n\t\trequire_once(dirname(__FILE__) . '/functions/wpt_events.php');\n\t\trequire_once(dirname(__FILE__) . '/functions/wpt_events_widget.php');\n\n\t\trequire_once(dirname(__FILE__) . '/functions/wpt_setup.php');\n\t\trequire_once(dirname(__FILE__) . '/functions/wpt_season.php');\n\t\trequire_once(dirname(__FILE__) . '/functions/wpt_widget.php');\n\t\trequire_once(dirname(__FILE__) . '/functions/wpt_admin.php');\n\t\trequire_once(dirname(__FILE__) . '/functions/wpt_status.php');\n\t\trequire_once(dirname(__FILE__) . '/functions/wpt_feeds.php');\t\n\t\t\n\t\trequire_once(dirname(__FILE__) . '/functions/transient/class-theater-transient.php');\t\n\t\trequire_once(dirname(__FILE__) . '/functions/transient/class-theater-transients.php');\t\n\t\t\t\n\t\trequire_once(dirname(__FILE__) . '/functions/wpt_listing_page.php');\t\n\t\trequire_once(dirname(__FILE__) . '/functions/wpt_calendar.php');\t\n\t\trequire_once(dirname(__FILE__) . '/functions/wpt_context.php');\t\n\t\trequire_once(dirname(__FILE__) . '/functions/wpt_filter.php');\t\n\t\trequire_once(dirname(__FILE__) . '/functions/wpt_cart.php');\t\n\t\trequire_once(dirname(__FILE__) . '/functions/wpt_tags.php');\t\n\n\t\trequire_once(dirname(__FILE__) . '/functions/extensions/wpt_extensions_updater.php');\t\n\t\trequire_once(dirname(__FILE__) . '/functions/extensions/wpt_extensions_promo.php');\t\n\n\t\trequire_once(dirname(__FILE__) . '/functions/wpt_importer.php');\t\n\n\n\t\tif (is_admin()) {\n\t\t} else {\n\t\t\trequire_once(dirname(__FILE__) . '/functions/wpt_frontend.php');\n\t\t}\n\t\trequire_once(dirname(__FILE__) . '/integrations/wordpress-seo.php');\n\t\trequire_once(dirname(__FILE__) . '/integrations/jetpack-featured-content.php');\n\t\t\n\t\trequire_once(dirname(__FILE__) . '/functions/deprecated/class-wpt-order.php');\n\t\trequire_once(dirname(__FILE__) . '/functions/deprecated/class-theater-custom-css.php');\n\t\t\n\t}",
"public function includes() {\n\n\t\t\t/**\n\t\t\t * Functions used in frontend and admin\n\t\t\t */\n\t\t\tinclude_once( 'inc/wd-core-functions.php' );\n\n\t\t\tif ( $this->is_request( 'admin' ) ) {\n\t\t\t\tinclude_once( 'inc/admin/class-wd-admin.php' );\n\t\t\t}\n\n\t\t\tif ( $this->is_request( 'frontend' ) ) {\n\t\t\t\tinclude_once( 'inc/frontend/wd-functions.php' );\n\t\t\t\tinclude_once( 'inc/frontend/wd-template-hooks.php' );\n\t\t\t\tinclude_once( 'inc/frontend/class-wd-shortcode.php' );\n\t\t\t}\n\t\t}",
"public static function menu_generator_listing() {\n\t\t\t\n\t\t\t#enqueue scripts\n\t\t\twp_enqueue_script('js-scripts', plugins_url( '/menu-generator/scripts/ajax_listings.js' ) );\n\t\t\twp_register_style(\"menu-style\", plugins_url( '/menu-generator/styles/main.css' ) );\n wp_enqueue_style( 'menu-style');\n\t\t\t\n\t\t\tinclude_once \"include/inclistings.php\";\n\n\t\t}",
"private static function loadLibs(){\n $file = Storange::getBaseWowPath().'wow/lib/readbeans/rb.php';\n if(file_exists($file)){\n include_once $file;\n }\n }",
"function _develop_action__theme__include_files() {\n\tinclude_once __DIR__ . '/class-calyx-server-state.php';\n\tinclude_once __DIR__ . '/samples/class-calyx-cpt-sample.php';\n}",
"public function includes() {\n\n include_once( 'includes/mapti-core-functions.php' );\n include_once( 'includes/mapti-conditional-functions.php' );\n\n if ( is_admin() ) {\n include_once( 'includes/admin/class-mapti-admin.php' );\n }\n\n // Load template loader\n if ( ! is_admin() || defined( 'DOING_AJAX' ) ) {\n include_once( 'includes/myarcade_api.php' );\n include_once( 'includes/class-mapti-template-loader.php' );\n include_once( 'includes/class-mapti-frontend-scripts.php' );\n }\n\n // Query class\n $this->query = include( 'includes/class-mapti-query.php' );\n\n include_once( 'includes/class-mapti-post-types.php' );\n include_once( 'includes/mapti-template-functions.php' );\n }",
"function includes() {\n\t\t// Settings\n\t\trequire_once( 'includes/admin/class-alg-wc-custom-order-numbers-settings-section.php' );\n\t\t$settings = array();\n\t\t$settings[] = require_once( 'includes/admin/class-alg-wc-custom-order-numbers-settings-general.php' );\n\t\tif ( is_admin() && get_option( 'alg_custom_order_numbers_version', '' ) !== $this->version ) {\n\t\t\tforeach ( $settings as $section ) {\n\t\t\t\tforeach ( $section->get_settings() as $value ) {\n\t\t\t\t\tif ( isset( $value['default'] ) && isset( $value['id'] ) ) {\n\t\t\t\t\t\t$autoload = isset( $value['autoload'] ) ? ( bool ) $value['autoload'] : true;\n\t\t\t\t\t\tadd_option( $value['id'], $value['default'], '', ( $autoload ? 'yes' : 'no' ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tupdate_option( 'alg_custom_order_numbers_version', $this->version );\n\t\t}\n\t\t// Core\n\t\trequire_once( 'includes/class-alg-wc-custom-order-numbers-core.php' );\n\t}",
"public function includes()\n {\n include_once('class-wc-pos-admin-post-actions.php');\n include_once('class-wc-pos-admin-menus.php');\n\n if (version_compare(WC_VERSION, '2.6', '>=')) {\n include_once('class-wc-pos-admin-notices.php');\n } else {\n include_once('class-wc-pos-admin-notices-v2.5.5.php');\n }\n include_once('class-wc-pos-admin-orders-page.php');\n\n\n /***********************/\n\n // Setup/welcome\n if (!empty($_GET['page'])) {\n switch ($_GET['page']) {\n case WC_POS_TOKEN . '-setup' :\n include_once('class-wc-pos-admin-setup-wizard.php');\n break;\n case WC_POS_TOKEN . '-about' :\n include_once('class-wc-pos-admin-welcome.php');\n break;\n case WC_POS_TOKEN . '-print' :\n include_once('class-wc-pos-admin-print-report.php');\n break;\n }\n }\n\n }",
"private function include_widgets_files() {\n\t\trequire_once( __DIR__ . '/widgets/dropdown.php' );\n\t}",
"public function writingPapers() {\n\t\t$pageTitle = 'Writing Papers';\n\t\t// $stylesheet = '';\n\n\t\tinclude_once SYSTEM_PATH.'/view/header.php';\n\t\tinclude_once SYSTEM_PATH.'/view/academic-help/writing-papers.php';\n\t\tinclude_once SYSTEM_PATH.'/view/footer.php';\n\t}",
"function gsn_web_services_require_files() {\n\t$abspath = dirname( __FILE__ );\n\trequire_once $abspath . '/classes/gsn-apiclient.php';\n\trequire_once $abspath . '/classes/gsn-plugin-base.php';\n\trequire_once $abspath . '/classes/gsn-web-services.php';\n}",
"public function buildAutoloadInformationFiles() {}",
"public function export_addFilesFromRelations() {}",
"private function includeFiles(){\n foreach($this->files as $file){\n require implode('', $file);\n $class_name = $this->getClassNameFromFileName($file);\n $this->classes[$file['name']] = new $class_name();\n }\n }",
"public function includes(){\r\n \t\trequire_once( TMM_ABSPATH . '/admin/post-type/team-member.php' );\r\n \t\trequire_once( TMM_ABSPATH . '/admin/taxonomy/member-type.php' );\r\n \t\trequire_once( TMM_ABSPATH . '/admin/metabox/team-member-metabox.php' );\r\n \t\trequire_once( TMM_ABSPATH . '/admin/shortcode/team-members-shortcode.php' );\r\n \t\trequire_once( TMM_ABSPATH . '/admin/templates/single-team-member.php' );\r\n \t\trequire_once( TMM_ABSPATH . '/admin/templates/archive-team-member.php' );\r\n \t\trequire_once( TMM_ABSPATH . '/admin/settings/settings.php' );\r\n \t\trequire_once( TMM_ABSPATH . '/admin/settings/shortcode-builder-button.php' );\r\n\r\n \t\t//enqueue stylesheets\r\n \t\tadd_action( 'wp_enqueue_scripts', array( $this, 'enqueue_styles' ) );\r\n \t}",
"private function require_files() {\n\n /**\n * Fixes plugins_url() for plugins located in /lib\n */\n add_filter( 'plugins_url', function( $plugins_url, $path, $plugin ) {\n if ( false !== stripos( $plugin, get_template_directory() ) ) {\n $plugins_url = get_template_directory_uri() . str_replace( WP_PLUGIN_URL . get_template_directory(), '', $plugins_url );\n }\n return $plugins_url;\n }, 10, 3 );\n\n // Include WP_oEmbed class\n require_once ABSPATH . WPINC . '/class-oembed.php';\n\n if ( defined( 'WP_CLI' ) && WP_CLI ) {\n require_once dirname( __FILE__ ) . '/inc/cli/class-cli.php';\n require_once dirname( __FILE__ ) . '/inc/cli/class-cli-clusters.php';\n }\n\n if ( is_admin() ) {\n $this->admin = Admin\\Admin::get_instance();\n $this->homepage_settings = Admin\\Homepage_Settings::get_instance();\n $this->cluster_tools = Admin\\Cluster_Tools::get_instance();\n $this->taxonomy_tools = Admin\\Taxonomy_Tools::get_instance();\n // Will be reimplemented after our move to MailChimp. See #2426\n // $this->newsletter_testing = Newsletter_Testing::get_instance();\n } else {\n $this->frontend = Frontend::get_instance();\n }\n\n $this->scripts_styles = Scripts_Styles::get_instance();\n $this->utilities = Utils::get_instance();\n $this->taxonomies = Taxonomies::get_instance();\n $this->single_option_taxonomies = Single_Option_Taxonomies::get_instance();\n $this->post_types = Types::get_instance();\n $this->user_management = User_Management::get_instance();\n $this->shortcode_manager = Shortcode_Manager::get_instance();\n $this->adverts = Adverts::get_instance();\n $this->ad_kill_switch = Admin\\Ad_Kill_Switch::get_instance();\n $this->slots = Posts\\Slots\\Slots::get_instance();\n $this->feeds = Feeds::get_instance();\n $this->featured_posts = Featured_Posts::get_instance();\n $this->icons = Icons::get_instance();\n $this->cron_management = Cron_Management::get_instance();\n $this->menus = Menus::get_instance();\n $this->menu_icons = Menu_Icons::get_instance();\n $this->component_previews = Component_Previews::get_instance();\n $this->page_cache = Page_Cache::get_instance();\n\n // Target Audience Messaging\n $this->audience = Audience::get_instance();\n $this->message_spot = Message_Spot::get_instance();\n $this->conversion_prompts = Conversion_Prompts::get_instance();\n $this->message_banner = Message_Banner::get_instance();\n\n // Metrics\n $this->metricbots = MetricBots::get_instance();\n $this->weekly_traffic_metric = Weekly_Traffic_Metric::get_instance();\n $this->newsletter_signups_by_page_metric = Newsletter_Signups_By_Page_Metric::get_instance();\n $this->yesterdays_email_metric = Yesterdays_Email_Metric::get_instance();\n\n // Emails\n $this->emails = Email::get_instance();\n $this->email_groups = Email_Groups::get_instance();\n $this->breaking_news_emails = Breaking_News_Emails::get_instance();\n $this->newsletter_emails = Newsletter_Emails::get_instance();\n $this->follow_updates = Follow_Updates::get_instance();\n $this->schedule_follow_updates = Schedule_Follow_Updates::get_instance();\n\n }",
"public function includes() {\n\n\t\t\t/**\n\t\t\t * Functions used in frontend and admin\n\t\t\t */\n\t\t\tinclude_once( 'inc/wlfp-core-functions.php' );\n\n\t\t\tif ( $this->is_request( 'admin' ) ) {\n\t\t\t\tinclude_once( 'inc/admin/class-wlfp-admin.php' );\n\t\t\t}\n\n\t\t\tif ( $this->is_request( 'ajax' ) ) {\n\n\t\t\t}\n\n\t\t\tif ( $this->is_request( 'frontend' ) ) {\n\t\t\t\tinclude_once( 'inc/frontend/wlfp-functions.php' );\n\t\t\t}\n\t\t}",
"public function gatherFileData()\n {\n $files = get_included_files();\n\n $fileList = array();\n\n $fileTotals = array(\n \"count\" => count($files),\n \"size\" => 0,\n \"largest\" => 0,\n );\n\n foreach($files as $key => $file) {\n $size = filesize($file);\n\n $fileList[] = array(\n 'name' => str_replace(BASEPATH, '/', $file),\n 'size' => $this->getReadableFileSize($size)\n );\n\n $fileTotals['size'] += $size;\n\n if($size > $fileTotals['largest']) $fileTotals['largest'] = $size;\n }\n\n $fileTotals['size'] = $this->getReadableFileSize($fileTotals['size']);\n $fileTotals['largest'] = $this->getReadableFileSize($fileTotals['largest']);\n\n $this->output['files'] = $fileList;\n $this->output['fileTotals'] = $fileTotals;\n }",
"public function includes() {\n\t\t\t//require_once(ABSPATH . 'wp-admin/includes/nav-menu.php');\n\t\t}",
"private function includes()\n {\n }",
"private function autoload_scripts() {\n\t\t\n\t}",
"public function includes(){\n\n\t\t// include all helper functions\n\t\tinclude_once( 'includes/class-wc-name-your-price-helpers.php' );\n\n\t\t// include admin class to handle all backend functions\n\t\tif( is_admin() )\n\t\t\tinclude_once( 'includes/admin/class-name-your-price-admin.php' );\n\n\t\t// include the front-end functions\n\t\tif ( ! is_admin() || defined('DOING_AJAX') ) {\n\t\t\tinclude_once( 'includes/class-wc-name-your-price-display.php' );\n\t\t\t$this->display = new WC_Name_Your_Price_Display();\n\n\t\t\tinclude_once( 'includes/class-wc-name-your-price-cart.php' );\n\t\t\t$this->cart = new WC_Name_Your_Price_Cart();\n\t\t}\n\n\t\tif ( WC_Name_Your_Price_Helpers::is_woocommerce_2_1() ) {\n\t\t\tinclude_once( 'includes/wc-21-functions.php' );\n\t\t} else {\n\t\t\tinclude_once( 'includes/wc-20-functions.php' );\n\t\t}\n\n\t}",
"function verArchivos() {\n\t\t$archivos_incluidos = get_included_files();\n\t\techo \"<pre>\";\n\t\tprint_r( $archivos_incluidos );\n\t\techo \"</pre>\";\n\t}",
"public function includes() {\n\t\t\trequire_once( CHERRY_SITE_SHORTCODES_DIR . 'includes/public/tools.php' );\n\n\t\t\t$this->shortcodes();\n\t\t}",
"function calendar_files()\n\t{\t\t\n\t\techo '\n\t\t\t\t<link type=\"text/css\" href=\"'.SITEPATH.'/administrator/calendar/themes/base/jquery.ui.all.css\" rel=\"stylesheet\" />\n\t\t\t\t<script type=\"text/javascript\" src=\"'.SITEPATH.'/administrator/calendar/jquery-1.4.2.js\"></script>\n\t\t\t\t<script type=\"text/javascript\" src=\"'.SITEPATH.'/administrator/calendar/ui/jquery.ui.core.js\"></script>\n\t\t\t\t<script type=\"text/javascript\" src=\"'.SITEPATH.'/administrator/calendar/ui/jquery.ui.widget.js\"></script>\n\t\t\t\t<script type=\"text/javascript\" src=\"'.SITEPATH.'/administrator/calendar/ui/jquery.ui.datepicker.js\"></script>\n\t\t\t\t<link type=\"text/css\" href=\"'.SITEPATH.'/administrator/calendar/demos.css\" rel=\"stylesheet\" />\n\t\t';\n\t}",
"protected function generateFiles()\n {\n $includedHeaderFiles = $this->phalconH->generate();\n $this->phalconC->generate($includedHeaderFiles);\n\n $this->configM4->generate();\n $this->configW32->generate();\n\n copy($this->sourceDir . '/php_phalcon.h', $this->outputDir . '/php_phalcon.h');\n $this->processKernelGlobals();\n }",
"private function includes() {\n // Include our session manager\n require_once( NF_PLUGIN_DIR . 'classes/session.php' );\n // Include our sub object.\n require_once( NF_PLUGIN_DIR . 'classes/sub.php' );\n // Include our subs object.\n require_once( NF_PLUGIN_DIR . 'classes/subs.php' );\n // Include our subs CPT.\n require_once( NF_PLUGIN_DIR . 'classes/subs-cpt.php' );\n // Include our form object.\n require_once( NF_PLUGIN_DIR . 'classes/form.php' );\n // Include our form sobject.\n require_once( NF_PLUGIN_DIR . 'classes/forms.php' );\n // Include our field, notification, and sidebar registration class.\n require_once( NF_PLUGIN_DIR . 'classes/register.php' );\n // Include our 'nf_action' watcher.\n require_once( NF_PLUGIN_DIR . 'includes/actions.php' );\n // Include our single notification object\n require_once( NF_PLUGIN_DIR . 'classes/notification.php' );\n // Include our notifications object\n require_once( NF_PLUGIN_DIR . 'classes/notifications.php' );\n // Include our notification table object\n require_once( NF_PLUGIN_DIR . 'classes/notifications-table.php' );\n // Include our base notification type\n require_once( NF_PLUGIN_DIR . 'classes/notification-base-type.php' );\n // Include add form button and modal\n require_once( NF_PLUGIN_DIR . 'classes/add-form-modal.php' );\n\n if ( is_admin () ) {\n // Include our step processing stuff if we're in the admin.\n require_once( NF_PLUGIN_DIR . 'includes/admin/step-processing.php' );\n require_once( NF_PLUGIN_DIR . 'classes/step-processing.php' );\n\n // Include our download all submissions php files\n require_once( NF_PLUGIN_DIR . 'classes/download-all-subs.php' );\n\n\n $upgraded_from = get_option( 'nf_version_upgraded_from', FALSE );\n if( $upgraded_from && version_compare( $upgraded_from, '2.9', '<=') ) {\n\n // Include Upgrade Base Class\n require_once( NF_PLUGIN_DIR . 'includes/admin/upgrades/class-upgrade.php');\n\n // Include Upgrades\n require_once( NF_PLUGIN_DIR . 'includes/admin/upgrades/upgrade-functions.php' );\n require_once( NF_PLUGIN_DIR . 'includes/admin/upgrades/upgrades.php' );\n require_once( NF_PLUGIN_DIR . 'includes/admin/upgrades/convert-forms-reset.php' );\n\n // Include Upgrade Handler\n require_once( NF_PLUGIN_DIR . 'includes/admin/upgrades/upgrade-handler-page.php');\n require_once( NF_PLUGIN_DIR . 'includes/admin/upgrades/class-upgrade-handler.php');\n }\n }\n\n // Include our upgrade files.\n require_once( NF_PLUGIN_DIR . 'includes/admin/welcome.php' );\n\n // Include deprecated functions and filters.\n require_once( NF_PLUGIN_DIR . 'includes/deprecated.php' );\n\n /* Legacy includes */\n\n /* Require Core Files */\n require_once( NINJA_FORMS_DIR . \"/includes/ninja-settings.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/database.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/functions.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/activation.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/register.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/shortcode.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/widget.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/field-type-groups.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/eos.class.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/from-setting-check.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/reply-to-check.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/import-export.php\" );\n\n require_once( NINJA_FORMS_DIR . \"/includes/display/scripts.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/display/upgrade-functions.php\" );\n\n // Include Processing Functions if a form has been submitted.\n require_once( NINJA_FORMS_DIR . \"/includes/display/processing/class-ninja-forms-processing.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/display/processing/class-display-loading.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/display/processing/pre-process.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/display/processing/process.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/display/processing/post-process.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/display/processing/save-sub.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/display/processing/filter-msgs.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/display/processing/fields-pre-process.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/display/processing/fields-process.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/display/processing/fields-post-process.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/display/processing/req-fields-pre-process.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/display/processing/honeypot.php\" );\n\n //Display Form Functions\n require_once( NINJA_FORMS_DIR . \"/includes/display/form/display-form.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/display/form/not-logged-in.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/display/fields/display-fields.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/display/form/response-message.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/display/fields/label.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/display/fields/help.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/display/fields/desc.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/display/form/form-title.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/display/fields/field-error-message.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/display/form/form-wrap.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/display/form/form-cont.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/display/form/fields-wrap.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/display/form/required-label.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/display/form/open-form-tag.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/display/form/close-form-tag.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/display/form/hidden-fields.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/display/form/form-visibility.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/display/form/sub-limit.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/display/form/nonce.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/display/form/honeypot.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/display/fields/restore-progress.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/display/fields/inside-label-hidden.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/display/fields/field-type.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/display/fields/default-value-filter.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/display/fields/calc-field-class.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/display/fields/clear-complete.php\" );\n\n\n //Require EDD autoupdate file\n if( !class_exists( 'EDD_SL_Plugin_Updater' ) ) {\n // load our custom updater if it doesn't already exist\n require_once(NINJA_FORMS_DIR.\"/includes/EDD_SL_Plugin_Updater.php\");\n }\n\n require_once( NINJA_FORMS_DIR . \"/includes/class-extension-updater.php\" );\n\n require_once( NINJA_FORMS_DIR . \"/includes/admin/scripts.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/admin/sidebar.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/admin/tabs.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/admin/post-metabox.php\" );\n\n require_once( NINJA_FORMS_DIR . \"/includes/admin/ajax.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/admin/admin.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/admin/sidebar-fields.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/admin/display-screen-options.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/admin/register-screen-options.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/admin/register-screen-help.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/admin/output-tab-metabox.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/admin/form-preview.php\" );\n require_once( NINJA_FORMS_DIR . \"/classes/notices-class.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/admin/notices.php\" );\n\n //Edit Field Functions\n require_once( NINJA_FORMS_DIR . \"/includes/admin/edit-field/edit-field.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/admin/edit-field/label.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/admin/edit-field/placeholder.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/admin/edit-field/hr.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/admin/edit-field/req.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/admin/edit-field/custom-class.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/admin/edit-field/help.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/admin/edit-field/desc.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/admin/edit-field/li.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/admin/edit-field/remove-button.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/admin/edit-field/save-button.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/admin/edit-field/calc.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/admin/edit-field/user-info-fields.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/admin/edit-field/post-meta-values.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/admin/edit-field/input-limit.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/admin/edit-field/sub-settings.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/admin/edit-field/autocomplete-off.php\" );\n\n /* * * * ninja-forms - Main Form Editing Page\n\n /* Tabs */\n\n /* Form List */\n require_once( NINJA_FORMS_DIR . \"/includes/admin/pages/ninja-forms/tabs/form-list/form-list.php\" );\n\n /* Form Settings */\n require_once( NINJA_FORMS_DIR . \"/includes/admin/pages/ninja-forms/tabs/form-settings/form-settings.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/admin/pages/ninja-forms/tabs/form-settings/help.php\" );\n\n /* Field Settings */\n require_once( NINJA_FORMS_DIR . \"/includes/admin/pages/ninja-forms/tabs/field-settings/field-settings.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/admin/pages/ninja-forms/tabs/field-settings/empty-rte.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/admin/pages/ninja-forms/tabs/field-settings/edit-field-ul.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/admin/pages/ninja-forms/tabs/field-settings/help.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/admin/pages/ninja-forms/tabs/field-settings/sidebars/def-fields.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/admin/pages/ninja-forms/tabs/field-settings/sidebars/fav-fields.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/admin/pages/ninja-forms/tabs/field-settings/sidebars/template-fields.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/admin/pages/ninja-forms/tabs/field-settings/sidebars/layout-fields.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/admin/pages/ninja-forms/tabs/field-settings/sidebars/user-info.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/admin/pages/ninja-forms/tabs/field-settings/sidebars/payment-fields.php\" );\n\n /* Form Preview */\n require_once( NINJA_FORMS_DIR . \"/includes/admin/pages/ninja-forms/tabs/form-preview/form-preview.php\" );\n\n\n /* * * * ninja-forms-settings - Settings Page\n\n /* Tabs */\n\n /* General Settings */\n require_once( NINJA_FORMS_DIR . \"/includes/admin/pages/ninja-forms-settings/tabs/general-settings/general-settings.php\" );\n\n /* Label Settings */\n require_once( NINJA_FORMS_DIR . \"/includes/admin/pages/ninja-forms-settings/tabs/label-settings/label-settings.php\" );\n\n /* License Settings */\n require_once( NINJA_FORMS_DIR . \"/includes/admin/pages/ninja-forms-settings/tabs/license-settings/license-settings.php\" );\n\n\n /* * * * ninja-forms-impexp - Import / Export Page\n\n /* Tabs */\n\n /* Import / Export Forms */\n require_once( NINJA_FORMS_DIR . \"/includes/admin/pages/ninja-forms-impexp/tabs/impexp-forms/impexp-forms.php\" );\n\n /* Import / Export Fields */\n require_once( NINJA_FORMS_DIR . \"/includes/admin/pages/ninja-forms-impexp/tabs/impexp-fields/impexp-fields.php\" );\n\n /* Import / Export Submissions */\n require_once( NINJA_FORMS_DIR . \"/includes/admin/pages/ninja-forms-impexp/tabs/impexp-subs/impexp-subs.php\" );\n\n /* Backup / Restore */\n require_once( NINJA_FORMS_DIR . \"/includes/admin/pages/ninja-forms-impexp/tabs/impexp-backup/impexp-backup.php\" );\n\n /* * * * ninja-forms-subs - Submissions Review Page\n\n /* Tabs */\n\n /* * * ninja-forms-addons - Addons Manager Page\n\n /* Tabs */\n\n /* Manage Addons */\n require_once( NINJA_FORMS_DIR . \"/includes/admin/pages/ninja-forms-addons/tabs/addons/addons.php\" );\n\n /* System Status */\n require_once( NINJA_FORMS_DIR . \"/includes/classes/class-nf-system-status.php\" );\n\n /* Require Pre-Registered Fields */\n require_once( NINJA_FORMS_DIR . \"/includes/fields/textbox.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/fields/checkbox.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/fields/list.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/fields/hidden.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/fields/organizer.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/fields/submit.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/fields/spam.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/fields/timed-submit.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/fields/hr.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/fields/desc.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/fields/textarea.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/fields/password.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/fields/rating.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/fields/calc.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/fields/country.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/fields/tax.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/fields/credit-card.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/fields/number.php\" );\n require_once( NINJA_FORMS_DIR . \"/includes/fields/recaptcha.php\" );\n\n require_once( NINJA_FORMS_DIR . \"/includes/admin/save.php\" );\n }",
"public function includes()\n {\n // Incluir functions.php\n include_once( WI_ABSPATH . 'functions.php' );\n }",
"function includes()\r\n {\r\n \r\n do_action('cart_converter_includes_action');\r\n }",
"protected function generateAllNeededFiles()\n\t{\n\t\t$this->settleRepositoryIfNotExists();\n\n\t\t$this->generateJob();\n\n\t\t$this->generateRequestIfGuarded();\n\n\t\t$this->generatePipes();\n\t}",
"public function loadBookingInformation()\n {\n $this->booking = Booking::with([\n 'usedCoupon',\n 'bookingPeriods',\n 'bookingAddOns.addOn',\n 'AdhocItems',\n ])->find(json_decode($this->request->booking, true)['id']);\n }",
"public function getConcatenateFiles() {}",
"function get_bookings( $all_bookings = false ){\n\t\t$confirmed = array();\n\t\tforeach ( $this->load() as $EM_Booking ){\n\t\t\tif( $EM_Booking->booking_status == 1 || (get_option('dbem_bookings_approval') == 0 && $EM_Booking->booking_status == 0) || $all_bookings ){\n\t\t\t\t$confirmed[] = $EM_Booking;\n\t\t\t}\n\t\t}\n\t\t$EM_Bookings = new EM_Bookings($confirmed);\n\t\treturn $EM_Bookings;\t\t\n\t}",
"public function includeHead()\n {\n require_once __DIR__ . '/templates/head.php';\n }",
"private function packResources()\n {\n $resources = include_once __DIR__ . '/elements/resources.php';\n if (!is_array($resources)) {\n $this->modx->log(modX::LOG_LEVEL_ERROR, 'Cannot build resources');\n } else {\n foreach ($resources as $resource) {\n $this->builder->putVehicle($this->builder->createVehicle($resource, [\n xPDOTransport::UNIQUE_KEY => 'id',\n xPDOTransport::PRESERVE_KEYS => true,\n xPDOTransport::UPDATE_OBJECT => true\n ]));\n }\n $this->modx->log(modX::LOG_LEVEL_INFO, 'Packaged in ' . count($resources) . ' resources.');\n }\n }",
"public function showBookings()\n {\n return $this->render('account/bookings.html.twig');\n }",
"protected function initFileIncluded() {\n\t\treturn [\n\t\t\t'JQUERY' => env_checker()['JQUERY'],\n\t\t\t'POPPER' => env_checker()['POPPER'],\n\t\t\t'TWBS_CSS' => env_checker()['TWBS_CSS'],\n\t\t\t'TWBS_JS' => env_checker()['TWBS_JS'],\n\t\t\t'title' => 'Sistem Informasi'\n\t\t];\n\t}",
"private function IncludeLibraries()\n {\n foreach ($this->libraries_files as $library_folder => $library_files) {\n foreach ($library_files as $library_file) {\n $path = \"Lib/\" . $library_folder . \"/\" . $library_file . \".php\";\n if (file_exists($path))\n include $path;\n else\n throw new Exception(\"There is no a file named '{$path}'.\", 404);\n }\n }\n }",
"public function print_includes() {\r\n $final_includes = '';\r\n\r\n foreach ($this->includes as $include) {\r\n // Check if it's a JS or a CSS file \r\n if (preg_match('/js$/', $include)) {\r\n // It's a JS file \r\n $final_includes .= '<script type=\"text/javascript\" src=\"' . $include . '\"></script>';\r\n } elseif (preg_match('/css$/', $include)) {\r\n // It's a CSS file \r\n $final_includes .= '<link href=\"' . $include . '\" rel=\"stylesheet\" type=\"text/css\" />';\r\n }\r\n\r\n return $final_includes;\r\n }\r\n }",
"public function includes() {\n new Updater($this->license_base, $this->product_version, $this->license_type);\n }",
"static function include_scripts(){\n\t\t//self::include_css();\n\t\tself::include_js();\n\t}",
"public function include_json_folders()\n {\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 addFileToBasket()\n {\n\n /*$header = $this->file->getHeader();\n if($header !== array('type','title','isbn','price','authors')){\n throw new Exception('File header is not correct');\n }*/\n\n $data = $this->getFileData();\n\n foreach ($data as $key => $value) {\n $bookFactory = new BookFactory();\n $book = $bookFactory->makeBook($value['title'], $value['authors'], $value['isbn'], $value['price'], $value['type']);\n\n $this->basket->addBook($book);\n }\n }",
"public function indexAction() {\n $books = Book::getAllBooks();\n require_once('views/bookList.php');\n }",
"function opaljob_includes( $path, $ifiles=array() ){\n\n if( !empty($ifiles) ){\n foreach( $ifiles as $key => $file ){\n $file = $path.'/'.$file; \n if(is_file($file)){\n require($file);\n }\n } \n }else {\n\n $files = glob($path);\n foreach ($files as $key => $file) {\n if(is_file($file)){\n require($file);\n \n }\n }\n }\n}",
"public function includes() {\n\n\t\t\tif ( ( ! is_admin() || defined( 'DOING_AJAX' ) ) && ! defined( 'DOING_CRON' ) ) {\n\t\t\t\tinclude_once( 'inc/frontend-functions.php' );\n\t\t\t}\n\n\t\t\tif ( defined( 'DOING_AJAX' ) ) {\n\t\t\t\tinclude_once( 'inc/ajax-functions.php' );\n\t\t\t}\n\t\t}",
"public function include_entries(){\n\t\tglobal $entries_list, $entries_detail;\n\n\t\t// Load the Entries List class\n\t\trequire_once( trailingslashit( plugin_dir_path( __FILE__ ) ) . 'includes/class-entries-list.php' );\n\t\t$entries_list = new VisualFormBuilder_Pro_Entries_List();\n\n\t\t// Load the Entries Details class\n\t\trequire_once( trailingslashit( plugin_dir_path( __FILE__ ) ) . 'includes/class-entries-detail.php' );\n\t\t$entries_detail = new VisualFormBuilder_Pro_Entries_Detail();\n\t}",
"public static function loadSectionFiles() {\n\t\tforeach (scandir( dirname(__FILE__) . Route::ROUTE_SECTION_DIR) as $filename) {\n\n\t\t $path = dirname(__FILE__) . Route::ROUTE_SECTION_DIR . '/' . $filename;\n\n\t\t if (is_file($path)) {\n\t\t\t\t$path_parts = pathinfo($path);\n\t\t \t$basename = $path_parts['filename'];\n\n\t\t \tif (self::endsWith($basename, Route::ROUTE_SECTION_SUFFIX)) {\n\t\t\t require_once $path;\n\t\t\t call_user_func(array($basename , 'init'));\n\t\t \t}\n\t\t }\n\t\t}\n\t}",
"protected function getFilesToProcess()\n {\n return array(\n 'custom/modules/Quotes/metadata/detailviewdefs.php',\n );\n }",
"function TS_VCSC_FilesRegistrations() {\r\n\t\t\trequire_once($this->registrations_dir . 'ts_vcsc_registrations_files.php');\r\n\t\t}",
"public function enableConcatenateFiles() {}",
"private static function includeRequiredFiles($solutionDir)\n {\n $coreDir = dirname(__FILE__) . '/';\n\n require_once $coreDir . 'Models/StaticClass.php';\n\n require_once $coreDir . 'Interfaces/ILazyConfiguration.php';\n require_once $coreDir . 'Models/LazyConfiguration.php';\n require_once $coreDir . 'Models/DefaultLazyConfiguration.php';\n require_once $solutionDir . 'SolutionConfiguration.php';\n require_once $solutionDir . 'RuntimeConfiguration.php';\n\n require_once $coreDir . 'Helpers/CacheHelper.php';\n\n require_once $coreDir . 'Models/ClassDefinition.php';\n require_once $coreDir . 'Helpers/ReflectionHelper.php';\n require_once $coreDir . 'Helpers/DependencyHelper.php';\n }",
"public function write_includes()\n \t{\n\t\t$result=\"\";\n\t\t\n\t\tforeach($this->includes as $key => $include)\n\t\t{\n\t\t\tif (strpos($include,'http://')!==0)\n\t\t\t\t$include='/js/'.$include.'.js';\n\t\t\t\t\n\t\t\t$result.=\"\\t\\t<script src=\\\"$include\\\" type=\\\"text/javascript\\\"></script>\\n\";\n\t\t}\n\t\t\t\n\t\treturn $result;\n \t}",
"public function addDependencies()\n {\n $this->Html->script('/attachments/js/vendor/jquery.ui.widget.js', ['block' => true]);\n $this->Html->script('/attachments/js/vendor/jquery.iframe-transport.js', ['block' => true]);\n $this->Html->script('/attachments/js/vendor/jquery.fileupload.js', ['block' => true]);\n $this->Html->script('/attachments/js/app/lib/AttachmentsWidget.js', ['block' => true]);\n $this->Html->css('/attachments/css/attachments.css', ['block' => true]);\n }",
"public function getEmbeddedFiles() {}"
] | [
"0.663224",
"0.64679646",
"0.630916",
"0.6302431",
"0.63000786",
"0.62894917",
"0.6273061",
"0.6270865",
"0.62679005",
"0.6245627",
"0.6169133",
"0.6150016",
"0.6125727",
"0.6090514",
"0.608698",
"0.6047844",
"0.6034697",
"0.5996444",
"0.59885335",
"0.5985435",
"0.59595305",
"0.591237",
"0.59073037",
"0.5895585",
"0.5872904",
"0.5836766",
"0.5806436",
"0.5804662",
"0.5776866",
"0.57630396",
"0.57527167",
"0.5725957",
"0.5720747",
"0.5717652",
"0.57116765",
"0.57036304",
"0.56909233",
"0.5690125",
"0.5686243",
"0.5671436",
"0.56648403",
"0.5657602",
"0.56400675",
"0.5623167",
"0.55673563",
"0.55495214",
"0.55424356",
"0.55384445",
"0.55325323",
"0.5504081",
"0.5502542",
"0.54974943",
"0.54861903",
"0.5472364",
"0.5463664",
"0.54551506",
"0.544823",
"0.5418777",
"0.53971934",
"0.53957146",
"0.5373294",
"0.5369194",
"0.5353252",
"0.534315",
"0.53075486",
"0.52891636",
"0.5272705",
"0.5263551",
"0.5258878",
"0.52571964",
"0.5257142",
"0.5256482",
"0.5249897",
"0.5244834",
"0.5237851",
"0.52346325",
"0.52075815",
"0.5204771",
"0.5198878",
"0.5195305",
"0.5191738",
"0.51805115",
"0.51628053",
"0.51474947",
"0.5129502",
"0.5123832",
"0.51188594",
"0.5107813",
"0.51054984",
"0.5098654",
"0.50887805",
"0.50784355",
"0.5072459",
"0.50719976",
"0.5066098",
"0.50623417",
"0.5059152",
"0.50586057",
"0.5057975",
"0.5052662"
] | 0.69766146 | 0 |
Register the class that handles database queries for the Bookings | function wpbs_register_database_classes_bookings($classes)
{
$classes['bookings'] = 'WPBS_Object_DB_Bookings';
$classes['bookingmeta'] = 'WPBS_Object_Meta_DB_Bookings';
return $classes;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function cl_ing_ingreso_det() {\r\n\r\n $this->database = new Database();\r\n }",
"public function __construct()\n {\n $this->customers = new CustomerDB();\n }",
"public function dbInstance();",
"public function __construct(){\n //autoloading\n $this->db = new \\Konekta();\n\n }",
"public function __construct()\n {\n $this->_db = new \\DbHandler();\n }",
"function __construct( $class )\n\t{\n\t\t$this->activeRecord = $class;\n\t}",
"function initGuestbook() {\r\n\t\tinclude 'guestbook.class.php';\r\n\t\t$this->registerClass(new Guestbook(),'guestbook',array('newEntry', 'clearGuestbook', 'deleteEntry', 'editEntry')); // specify methods so that we get case in php4\r\n\t}",
"public function __construct() {\n $this->db = \\Config\\Database::connect();\n // Wir verwenden die Query Builder Klasse über table()\n $this->reiter = $this->db->table('Reiter');\n }",
"public function __construct() {\n $this->db = database::getInstance();\n }",
"function QueryClass(){\n\t\n\t\t//\n\t\t\n\t}",
"public function __construct(){\n $this->db = DB::getInstance();\n }",
"function __construct()\n {\n $this->_db = DB::getInstance();\n }",
"private function registerRepository()\n {\n $this->app->bind(DataRepository::class, LaravelDBRepository::class);\n }",
"function __construct(){\n $this->_db = (new DataBaseServices())->connect();\n }",
"function GST_setClassDB()\n {\n if($this->DB !== FALSE)\n $this->DB->useDB('hej_G');\n }",
"public function __construct() {\n\t\t$this->db = DB::getInstance();\n\t}",
"public function getQueryAdapterClass();",
"public function __construct() {\n $this->_db = DB::getInstance();\n }",
"public function register(): void\n {\n // Bind eloquent models to IoC container\n $this->app->singleton('cortex.bookings.service', $serviceModel = $this->app['config']['cortex.bookings.models.service']);\n $serviceModel === Service::class || $this->app->alias('cortex.bookings.service', Service::class);\n\n $this->app->singleton('cortex.bookings.service_availability', $serviceAvailabilityModel = $this->app['config']['cortex.bookings.models.service_availability']);\n $serviceAvailabilityModel === ServiceAvailability::class || $this->app->alias('cortex.bookings.service_availability', ServiceAvailability::class);\n\n $this->app->singleton('cortex.bookings.service_booking', $serviceBookingModel = $this->app['config']['cortex.bookings.models.service_booking']);\n $serviceBookingModel === ServiceBooking::class || $this->app->alias('cortex.bookings.service_booking', ServiceBooking::class);\n\n $this->app->singleton('cortex.bookings.service_rate', $serviceRateModel = $this->app['config']['cortex.bookings.models.service_rate']);\n $serviceRateModel === ServiceRate::class || $this->app->alias('cortex.bookings.service_rate', ServiceRate::class);\n\n $this->app->singleton('cortex.bookings.event', $serviceAvailabilityModel = $this->app['config']['cortex.bookings.models.event']);\n $serviceAvailabilityModel === Event::class || $this->app->alias('cortex.bookings.event', Event::class);\n\n $this->app->singleton('cortex.bookings.event_ticket', $eventTicketModel = $this->app['config']['cortex.bookings.models.event_ticket']);\n $eventTicketModel === EventTicket::class || $this->app->alias('cortex.bookings.event_ticket', EventTicket::class);\n\n $this->app->singleton('cortex.bookings.event_booking', $eventBookingModel = $this->app['config']['cortex.bookings.models.event_booking']);\n $eventBookingModel === EventBooking::class || $this->app->alias('cortex.bookings.event_booking', EventBooking::class);\n\n // Register console commands\n $this->registerCommands($this->commands);\n\n // Bind eloquent models to IoC container\n $this->app->singleton('cortex.bookings.service', $serviceModel = $this->app['config']['cortex.bookings.models.service']);\n $serviceModel === Service::class || $this->app->alias('cortex.bookings.service', Service::class);\n\n $this->app->singleton('cortex.bookings.event', $eventModel = $this->app['config']['cortex.bookings.models.event']);\n $eventModel === Event::class || $this->app->alias('cortex.bookings.event', Event::class);\n }",
"public function __construct() {\n\n $this->_queries = new queries();\n $this->_pagination = new PagePagination();\n }",
"public function __construct() {\n $this->mysql = new Mysql();\n }",
"public function __construct() {\n $this->adapter = new PDOAdapter();\n }",
"public function __construct(){\n $this->_db = DB::getInstance();\n }",
"public function __construct(){\n $this->db = new Base;\n }",
"public function __construct() {\n\t\t$this->providers = array(\n\t\t\t'ngg' => new ShoutemNGGDao(),\n\t\t\t'flag' => new ShoutemFlaGalleryDao(),\n\t\t);\n\t}",
"public function __construct() {\n\t\t\t$this->dbConnection = new dbConnection();\n\t\t\t$this->query = new query();\n\t\t}",
"public function __construct() {\r\n $this->db = new Database;\r\n }",
"public function model()\n {\n return Booking::class;\n }",
"function __construct() {\n // Initialize the dbms pointer.\n AbstractMapper::__construct();\n\n // Initialize table name.\n $this->tableName = \"orders\";\n }",
"public function __construct()\n {\n $this->db = Db::getInstance();\n }",
"public function __construct(){\r\n\r\n // Create connection with data base\r\n $this->_db = DB::get_Instance();\r\n }",
"function __construct() {\n // Initialize the dbms pointer.\n AbstractMapper::__construct();\n\n // Initialize table name.\n $this->tableName = \"special_fees\";\n }",
"function __construct(){\n $this->connect(DB_HOST,DB_USER,DB_PASS,DB_NAME);\n $this->_model=get_class($this);\n $this->_table=strtolower($this->_model).\"s\";\n $this->watchdog=new Watchdog();\n }",
"public function __construct() {\n\t\t$this->_db = Database::getInstance();\n\t}",
"function __construct()\n {\n $this->databaseConnection();\n }",
"public function __construct(){\n $this->db = new Base;\n }",
"public function initDatabase()\n {\n $this->register(new Provider\\DatabaseServiceProvider());\n }",
"public function register()\n {\n Schema::defaultStringLength(191);\n\n Relation::morphMap([\n 'taxClass' => TaxClass::class,\n 'countryTaxDeductionClass' => CountryTaxDeductionClass::class,\n 'countryTaxReliefClass' => CountryTaxReliefClass::class,\n ]);\n }",
"public function __construct() {\n global $wpdb;\n self::$wpdb = $wpdb;\n $this->table = $wpdb->prefix . static::TABLE_NAME;\n }",
"public function __construct() {\n $this->AchievementDB = new AchievementDB();\n }",
"public function registerConnection();",
"public function __construct(){\n $this->db = new Database;\n }",
"public function registerDoctrineHandler()\n\t{\n\t\t$this->app->singleton('pagination.handler.doctrine', function($app) {\n\t\t\treturn new Doctrine;\n\t\t});\n\t}",
"public function __construct()\n {\n $this->table = 'tag';\n\t\t$this->model = $db = DB::table($this->table);\n }",
"public function loadFromDB()\n {\n }",
"function __construct() {\n $dao = new DAO();\n }",
"public function registerDoctrineSqlHandler()\n\t{\n\t\t$this->app->singleton('pagination.handler.doctrine.sql', function($app) {\n\t\t\treturn new DoctrineSql;\n\t\t});\n\t}",
"public function getDatabaseHandler();",
"public function __construct() {\r\n /* * * maybe set the db name here later ** */\r\n }",
"public function register()\n {\n DB::listen(function ($query) {\n// Log::debug($query->sql, $query->bindings);\n if (env('APP_ENV') == 'local') {\n Log::debug(vsprintf(str_replace(\"?\", \"'%s'\", $query->sql), $query->bindings));//替换sql中的变量\n }\n });\n //\n $this->app->bind(AuthInterface::class, AuthService::class);\n }",
"protected function registerDatabaseBindings()\n {\n $this->singleton('db', function () {\n $this->register(\\App\\Providers\\DatabaseServiceProvider::class);\n return $this->make('db');\n });\n }",
"public function __construct() {\n\t\t// Constructor\n\t\t$this->mysql = new Mysql();\n\t}",
"public function __construct() {\r\n\t\t$this->_db = new DAL();\r\n\t}",
"public function __construct()\n {\n /*\n * Since this is the trial project, I've used simple ORM redbean(https://github.com/gabordemooij/redbean). Instead we can use more standatfs & stable one like doctrine or Illuminate\n */\n R::setup(\"pgsql:dbname=hellofresh;host=postgres\", \"hellofresh\", \"hellofresh\");\n }",
"public function __construct(){\r\n \r\n $this->db = parent::getInstance(); \r\n }",
"public function __construct() {\n // Making a connection with the database\n $database = new Database();\n $this->conn = $database->getConnection();\n }",
"public function __construct() {\n $this->userDB = new UserDB;\n $this->achievementDB = new achievementDB();\n $this->validate = new Validate();\n }",
"public function registerDb() {\n global $wpdb;\n\n $charset_collate = $wpdb->get_charset_collate();\n $table_name = $wpdb->prefix . \"items_bookmark\";\n \n $createTable = \"CREATE TABLE IF NOT EXISTS $table_name (\n user_id INTEGER NOT NULL,\n response_id int,\n utterance_id int,\n PRIMARY KEY (user_id)\n ) $charset_collate;\";\n\n require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\n dbDelta($createTable);\n }",
"public function __construct() {\n // Making a connection with the database\n $database = new Database();\n $this->conn = $database->getConnection();\n }",
"private function __construct() {\r\n global $wpdb;\r\n\r\n $this->table = $wpdb->prefix . 'laterpay_subscriptions';\r\n }",
"public function __construct(Booking $booking)\n {\n $this->booking = $booking;\n }",
"public function __construct(Booking $booking)\n {\n $this->booking = $booking;\n }",
"public function __construct(){\n $this->packageDao = new PackageDao();\n $this->destinationDao = new DestinationDao();\n }",
"public function __construct()\n {\n $this->db = new Database;\n }",
"public function __construct()\n {\n $this->db = new Database;\n }",
"function __construct() {\n $dao = new DAO();\n }",
"public function __construct() {\n $this->dbName = new DataBase($this->db);\n }",
"public function __construct()\n {\n $this->db = new Database();\n }",
"public function __construct()\n {\n $this->db = new Database();\n }",
"function registerDAOs() {\n\t\t$this->import('classes.ReviewObjectTypeDAO');\n\t\t$this->import('classes.ReviewObjectMetadataDAO');\n\t\t$this->import('classes.ObjectForReviewPersonDAO');\n\t\t$this->import('classes.ObjectForReviewDAO');\n\t\t$this->import('classes.ObjectForReviewSettingsDAO');\n\t\t$this->import('classes.ObjectForReviewAssignmentDAO');\n\n\t\t$reviewObjectTypeDao = new ReviewObjectTypeDAO($this->getName());\n\t\tDAORegistry::registerDAO('ReviewObjectTypeDAO', $reviewObjectTypeDao);\n\n\t\t$reviewObjectMetadataDao = new ReviewObjectMetadataDAO($this->getName());\n\t\tDAORegistry::registerDAO('ReviewObjectMetadataDAO', $reviewObjectMetadataDao);\n\n\t\t$objectForReviewPersonDao = new ObjectForReviewPersonDAO($this->getName());\n\t\tDAORegistry::registerDAO('ObjectForReviewPersonDAO', $objectForReviewPersonDao);\n\n\t\t$objectForReviewDao = new ObjectForReviewDAO($this->getName());\n\t\tDAORegistry::registerDAO('ObjectForReviewDAO', $objectForReviewDao);\n\n\t\t$objectForReviewSettingsDao = new ObjectForReviewSettingsDAO($this->getName());\n\t\tDAORegistry::registerDAO('ObjectForReviewSettingsDAO', $objectForReviewSettingsDao);\n\n\t\t$objectForReviewAssignmentDao = new ObjectForReviewAssignmentDAO($this->getName());\n\t\tDAORegistry::registerDAO('ObjectForReviewAssignmentDAO', $objectForReviewAssignmentDao);\n\t}",
"public function register($class);",
"function augmentDatabase() {\r\n\t}",
"public function __construct() {\n\t\t$this->dbmanager = new pdoDbManager ();\n\t\t$this->ticketsDAO = new ticketsDAO ( $this->dbmanager );\n\t\t$this->dbmanager->openConnection ();\n\t\t$this->validationSuite = new Validation ();\n\t}",
"public function __construct()\n\t{\n\t\t$this->dbInfo = new DbInfo();\n\t}",
"function __construct(){\n\t\t\t$this->db = new Database();\n\t\t}",
"public function __construct(){\n $database = new Database();\n $db = $database->getConnection();\n \n $this->conn = $db;\n }",
"public function __construct()\n {\n //setup database connection\n $db_pdo = new PDOService();\n $this->db = $db_pdo->getConnection();\n\n //initiate repository\n $this->rSchedule = new ScheduleRepository($this->db);\n }",
"public function __construct()\n\t\t{\n\t\t\tbaseDao::__construct();\n\t\t}",
"public function __construct()\r\n {\r\n $this->db = clsDB::getInstance();\r\n }",
"public function register()\n {\n Relation::morphMap([\n 'student' => Student::class,\n 'teacher' => Teacher::class,\n 'member' => Member::class,\n 'activity' => Activity::class,\n 'news' => News::class,\n 'committee' => Committee::class,\n 'page' => Page::class\n ]);\n }",
"public function __construct(){\n $database = new Database();\n $db = $database->getConnection();\n $this->conn = $db;\n }",
"public function __construct(){\n $database = new Database();\n $db = $database->getConnection();\n $this->conn = $db;\n }",
"public function __construct(){\n $this->db = new Database;\n }",
"public function __construct(){\n $database = new Database();\n $db = $database->dbConnection();\n $this->conn = $db;\n }",
"function __construct() {\n $this->open_db_connection();\n }",
"public function __construct()\n {\n $this->db = new DB();\n }",
"public function __construct()\n {\n $this->sql_query = SQL_Query::getInstance();\n }",
"public function __construct()\r\n {\r\n require_once 'libs/db.php';\r\n $this->db = Db::singleton();\r\n }",
"protected static function setClassAndTable()\n {\n parent::setCustomClassAndTable(\"Announcement\", \"post_announcements\");\n }",
"public function __construct()\n {\n $this->initMySQL();\n }",
"public function run()\n {\n $booking_methods = [\n [ \n 'name' => 'Paypal',\n 'created_at' => now(),\n 'updated_at' => now()\n ],\n\n [\n 'name' => 'Credit Card',\n 'created_at' => now(),\n 'updated_at' => now()\n\n ],\n ];\n\n BookingMethod::insert($booking_methods);\n }",
"public function register() {\n\t\t/** @var \\wpdb $wpdb */\n\t\tglobal $wpdb;\n\t\t$this->container->bind( 'wpdb', $wpdb );\n\t}",
"public function __construct()\n {\n $this->_idField = $this->getIdField();\n $this->_tableName = $this->getTableName();\n\n if (!static::$_db) {\n static::$_db = Database::getInstance();\n }\n\n if (!static::$_schema) {\n static::$_schema = new Cache();\n }\n }",
"public function __construct() {\n\t\tglobal $wpdb;\n\t\t$this->db = $wpdb;\n\t}",
"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 }",
"public function __construct(){\n //get the configuration for connection to database\n $data_base_opt = System\\Config::get_instance()->get_database_config();\n // receiving object for working with database\n $this->database = System\\Safe_SQL::get_instance($data_base_opt);\n }",
"public function __construct ()\n {\n parent::__construct();\n $this->_database = $this->db;\n\t\t$this->_table = \"ingredients\";\n }",
"function __construct()\n {\n $this->dataBase = new Database(\n Conf::get('pkg_db_host'),\n Conf::get('pkg_db_port'),\n Conf::get('pkg_db_user'),\n Conf::get('pkg_db_password'),\n Conf::get('pkg_db_name'),\n Conf::get('pkg_db_usefav_table'));\n }",
"function __construct()\r\n {\r\n $this->cuentaDAO = new CuentaDAO();\r\n }",
"public function __construct() {\n $this->load->database();\n \n }"
] | [
"0.58525455",
"0.55904526",
"0.55553365",
"0.55191755",
"0.55009913",
"0.54924935",
"0.5457468",
"0.54408234",
"0.54261345",
"0.54203653",
"0.5407292",
"0.5399944",
"0.539701",
"0.53891337",
"0.5381633",
"0.5380312",
"0.5380189",
"0.5363274",
"0.53598493",
"0.5358861",
"0.5335424",
"0.5333575",
"0.5316957",
"0.5300682",
"0.5281209",
"0.52771103",
"0.5275356",
"0.5274973",
"0.5271454",
"0.5255865",
"0.52557373",
"0.52489156",
"0.5245751",
"0.5234429",
"0.5228586",
"0.52272916",
"0.52093935",
"0.5204131",
"0.5203464",
"0.51975185",
"0.5195089",
"0.5189032",
"0.51876867",
"0.51711947",
"0.51654375",
"0.51596797",
"0.5156762",
"0.5156011",
"0.5154966",
"0.5154317",
"0.51542425",
"0.5149777",
"0.51467496",
"0.5144123",
"0.5141318",
"0.5141181",
"0.513773",
"0.51341605",
"0.51297027",
"0.51287806",
"0.5128677",
"0.5128677",
"0.51278996",
"0.5127207",
"0.5127207",
"0.512645",
"0.5123829",
"0.5120354",
"0.5120354",
"0.51191133",
"0.51169837",
"0.51135767",
"0.50993377",
"0.5099197",
"0.50944054",
"0.50848633",
"0.50828546",
"0.5081735",
"0.5081307",
"0.50754994",
"0.50746155",
"0.50746155",
"0.5073298",
"0.50706327",
"0.50679517",
"0.50669277",
"0.50634164",
"0.50613993",
"0.5060985",
"0.5059152",
"0.5058424",
"0.5058173",
"0.50536686",
"0.5051736",
"0.50507724",
"0.5050581",
"0.5047288",
"0.5045405",
"0.5043108",
"0.504041"
] | 0.64219433 | 0 |
Returns an array with WPBS_Booking objects from the database | function wpbs_get_bookings($args = array(), $count = false)
{
$bookings = wp_booking_system()->db['bookings']->get_bookings($args, $count);
/**
* Add a filter hook just before returning
*
* @param array $bookings
* @param array $args
* @param bool $count
*
*/
return apply_filters('wpbs_get_bookings', $bookings, $args, $count);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getBookings(){\r\n\t\t$inx = 0;\r\n\t\t$arrbook = array();\r\n\t\t$conn = getConnection();\r\n //These are the specific fields\r\n $stmt = $conn->prepare(\"SELECT B.idreservations, B.rs_checkin, B.rs_checkout, G.gs_name FROM booking B, guests G where G.reservations_idreservations = B.idreservations\");\r\n \r\n $stmt->execute();\r\n\r\n $result = $stmt->get_result();\r\n\r\n if($result->num_rows > 0){\r\n \twhile($row = $result->fetch_assoc()){\r\n \t\t$arrbook[$inx][0] = $row['rs_checkin'];\r\n \t\t$arrbook[$inx][1] = $row['gs_name'];\r\n \t\t$arrbook[$inx][2] = $row['rs_checkout'];\r\n $arrbook[$inx][3] = $row['idreservations'];\r\n $inx++;\r\n \t}\r\n }\r\n $conn->close(); \r\n\r\n return $arrbook;\r\n\t}",
"public function GetBookings()\n\t{\t$bookings = array();\n\t\t$sql = 'SELECT * FROM coursebookings WHERE ticket=' . $this->id;\n\t\tif ($result = $this->db->Query($sql))\n\t\t{\twhile ($row = $this->db->FetchArray($result))\n\t\t\t{\t$bookings[$row['id']] = $row;\n\t\t\t}\n\t\t}\n\t\treturn $bookings;\n\t}",
"public function getBookings()\n {\n return $this->hasMany(Booking::className(), ['id_sotrudnik' => 'id_sotrudnik']);\n }",
"function wpbs_get_booking($booking)\n{\n\n return wp_booking_system()->db['bookings']->get_object($booking);\n\n}",
"public function getBookList() {\n\n $booklist = array();\n\n foreach ($this->db-> query(\"SELECT * FROM book\") as $row) {\n \n array_push($booklist, new Book($row['title'], $row['author'], $row['description'], $row['id']));\n }\n\n return $booklist;\n }",
"function findBooking() : array\n{ \n $db = new Database;\n $db = $db->dbConnect();\n\n $sql = \"SELECT booking.id, booking_date_debut, booking_time_debut, booking_date_fin, booking_time_fin, number_of_seats, user_i, last_name, first_name, mail \n FROM booking \n INNER JOIN user ON user.id = booking.user_i \";\n $adminGetBooking = $db->query($sql);\n $adminGetBooking = $adminGetBooking->fetchAll();\n return $adminGetBooking;\n}",
"public function getTodayBookingList()\n {\n return DB::table('bookings')\n ->leftJoin('users', 'users.id', '=', 'bookings.user_id')\n ->leftJoin('rooms', 'rooms.id', '=', 'bookings.room_id')\n ->whereBetween('booking_time', [\n date('Y-m-d 00:00:01'),\n date('Y-m-d 23:59:59')\n ])\n ->select(\n 'bookings.booking_time', 'bookings.total_person', 'bookings.noted',\n 'users.id as user_id', 'users.email', 'rooms.room_name'\n )\n ->get()\n ->toArray();\n }",
"public function getBookings()\n {\n return $this->hasMany(Booking::className(), ['id_complaints' => 'id_complaint']);\n }",
"function get_bookings( $all_bookings = false ){\n\t\t$confirmed = array();\n\t\tforeach ( $this->load() as $EM_Booking ){\n\t\t\tif( $EM_Booking->booking_status == 1 || (get_option('dbem_bookings_approval') == 0 && $EM_Booking->booking_status == 0) || $all_bookings ){\n\t\t\t\t$confirmed[] = $EM_Booking;\n\t\t\t}\n\t\t}\n\t\t$EM_Bookings = new EM_Bookings($confirmed);\n\t\treturn $EM_Bookings;\t\t\n\t}",
"function get_pending_bookings(){\n\t\tif( get_option('dbem_bookings_approval') == 0 ){\n\t\t\treturn new EM_Bookings();\n\t\t}\n\t\t$pending = array();\n\t\tforeach ( $this->load() as $EM_Booking ){\n\t\t\tif($EM_Booking->booking_status == 0){\n\t\t\t\t$pending[] = $EM_Booking;\n\t\t\t}\n\t\t}\n\t\t$EM_Bookings = new EM_Bookings($pending);\n\t\treturn $EM_Bookings;\t\n\t}",
"static function getPaymentBookingHistory() {\n global $wpdb;\n $resultset = $wpdb->get_results(\n \"SELECT t.reservation_id, t.booking_reference, t.first_name, t.last_name, t.email, t.vendor_tx_code, t.payment_amount, a.auth_status, a.auth_status_detail, a.card_type, a.last_4_digits, a.processed_date\n FROM wp_sagepay_transaction t\n INNER JOIN wp_sagepay_tx_auth a ON t.vendor_tx_code = a.vendor_tx_code\n WHERE t.reservation_id IS NOT NULL\n UNION ALL \n SELECT reservation_id, booking_reference, first_name, last_name, email, vendor_tx_code, \n payment_amount, auth_status, auth_status_detail, card_type, last_4_digits, processed_date\n FROM wp_stripe_transaction\n WHERE processed_date IS NOT NULL\n AND booking_reference IS NOT NULL\n ORDER BY processed_date DESC\n LIMIT 100\" );\n\n if($wpdb->last_error) {\n throw new DatabaseException($wpdb->last_error);\n }\n return $resultset;\n }",
"public function getBookings() {\n //$query = \"SELECT * FROM `bookings` WHERE `DATE` = CURDATE() ORDER BY `DATE`, `TIME`\";\n $query = \"SELECT * FROM `bookings` where DATE(`DATE`) = CURDATE() \";\n\n $stmt = $this->sqlConnection->prepare($query);\n\n $stmt->execute();\n\n if ($stmt->rowCount() > 0) {\n\n $result = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\n return json_encode($result);\n } else {\n\n echo json_encode(array(\"status\" => 201, 'message' => 'No bookings made yet..'));\n }\n }",
"public function index()\n {\n $bookings = Booking::all()->sortByDesc('created_at')->forPage(0, 20);\n return $bookings;\n }",
"function getBookingsByType($type){\r\n \t$inx = 0;\r\n \t$arrbook = array();\r\n \t$conn = getConnection();\r\n\r\n $stmt = $conn->prepare(\"SELECT idreservations, rs_checkin, rs_checkout from booking where rs_checkin > curdate() AND type = ?\");\r\n $stmt->bind_param(\"s\", $type); \r\n $stmt->execute();\r\n\r\n $result = $stmt->get_result();\r\n \r\n\r\n if($result->num_rows > 0){\r\n \twhile($row = $result->fetch_assoc()){\r\n \t\t$arrbook[$inx][0] = $row['idreservations'];\r\n \t\t$arrbook[$inx][1] = $row['rs_checkin'];\r\n \t\t$arrbook[$inx][2] = $row['rs_checkout'];\r\n $inx++;\r\n \t}\r\n }\r\n $conn->close(); \r\n\r\n return $arrbook;\r\n\t}",
"public function getBorrowings();",
"function getBookingsToday(){\r\n $inx = 0;\r\n $arrpack = array();\r\n $conn = getConnection();\r\n\r\n $stmt = $conn->prepare(\"SELECT B.idreservations, B.datebkd, G.gs_name, G.gs_contact, B.type, P.pax, P.pooltype, P.time, P.ratetype, B.rs_checkin, P.num_rm, P.pax_pr_rm, B.datebkd FROM guests G, booking B, packages P where G.reservations_idreservations = B.idreservations AND B.packages_idpackages = P.idpackages AND B.status IS NULL order by B.datebkd desc, B.rs_checkin desc\");\r\n $stmt->execute();\r\n\r\n $result = $stmt->get_result();\r\n\r\n if($result->num_rows > 0){\r\n while($row = $result->fetch_assoc()) {\r\n $dte = $row['datebkd'];\r\n $pieces = explode(\"-\", $dte);\r\n $id = $row['idreservations'];\r\n $totString = $pieces[0] . $pieces[1] . $pieces[2] . \"-o-\" . $id;\r\n $arrpack[$inx][0] = $totString;\r\n $arrpack[$inx][1] = $row[\"idreservations\"];\r\n $arrpack[$inx][2] = $row[\"gs_name\"];\r\n $arrpack[$inx][3] = $row[\"gs_contact\"];\r\n $arrpack[$inx][4] = $row[\"type\"];\r\n $arrpack[$inx][5] = $row[\"pax\"];\r\n $arrpack[$inx][6] = $row[\"pooltype\"];\r\n $arrpack[$inx][7] = $row[\"time\"];\r\n $arrpack[$inx][8] = $row[\"ratetype\"];\r\n $arrpack[$inx][9] = $row[\"rs_checkin\"];\r\n $inx++;\r\n }\r\n }\r\n $conn->close(); \r\n return $arrpack;\r\n\t}",
"public function getBusinesses() {\n try {\n $statement = Configuration::openConnection()->prepare(\"SELECT * FROM businesses AS b JOIN states AS s ON b.state=s.stateId, businessTypes AS bt WHERE b.type=bt.typeId\");\n $statement->execute();\n\n $results = $statement->fetchAll(PDO::FETCH_COLUMN);\n\n $businesses = array();\n\n //echo ('test': 'test2');\n \n foreach ($results as $index => $id) {\n $business = new Business($id);\n array_push($businesses, json_decode($business));\n }\n\n Configuration::closeConnection();\n }\n catch (PDOException $e) {\n return \"Error: \" . $e->getMessage();\n }\n $businesses = json_encode($businesses, JSON_PRETTY_PRINT);\n\n return $businesses;\n }",
"function get_rejected_bookings(){\n\t\t$rejected = array();\n\t\tforeach ( $this->load() as $EM_Booking ){\n\t\t\tif($EM_Booking->booking_status == 2){\n\t\t\t\t$rejected[] = $EM_Booking;\n\t\t\t}\n\t\t}\n\t\t$EM_Bookings = new EM_Bookings($rejected);\n\t\treturn $EM_Bookings;\n\t}",
"public function getAllBooks(){\n $query = \"SELECT * FROM Book;\";\n return $this->getBookDetail($query);\n }",
"public function getBooks(){\n $sql = \"SELECT * FROM book;\";\n $res = mysqli_query($this->link, $sql);\n $books = mysqli_fetch_all($res);\n return $books;\n }",
"function show_available_bookings(){\n global $db;\n $sql = \"SELECT * FROM booking_info;\";\n $result = $db->query($sql);\n return $result;\n}",
"public function getBookList() \n {\n return array( \n \"Balagurusamy\" => new Book(\"Balagurusamy\", \"Balagurusamy\", \"C programming\"), \n \"CMM in Practice\" => new Book(\"CMM in Practice\", \"Pankaj Jalote\", \"\"), \n \"PHP for Dummies\" => new Book(\"PHP for Dummies\", \"Some Smart Guy\", \"\") \n ); \n }",
"public function index()\n {\n $permission = $this->checkPermission();\n if (is_array($permission)) {\n $this->_handleResponse($permission);\n return;\n }\n\n $fromDate = new Time($this->request->query('from'));\n $toDate = new Time($this->request->query('to'));\n if ($fromDate > $toDate) {\n $result = $this->_getResult('error', 400, $this->msg['booking_date_error']);\n $this->_handleResponse($result);\n return;\n }\n\n $query = $this->Bookings->find()\n ->contain(['Customers', 'Services'])\n ->order(['Bookings.date' => 'ASC', 'Bookings.start_time' => 'ASC'])\n ->where([\n 'Customers.shops_id' => $permission->shops_id,\n 'Bookings.date >=' => $fromDate,\n 'Bookings.date <=' => $toDate\n ]);\n\n $bookings = array();\n if ($query->count() > 0) {\n foreach ($query as $row) {\n $tmp = array(\n 'id' => $row->id,\n 'date' => $row->date,\n 'start_time' => $row->start_time,\n 'end_time' => $row->end_time,\n 'status' => $row->status,\n 'note' => $row->note,\n 'customer' => [\n 'id' => $row->customer->id,\n 'first_name' => $row->customer->first_name,\n 'last_name' => $row->customer->last_name\n ]\n );\n $services = array();\n foreach ($row->services as $sv) {\n $services[] = array(\n 'id' => $sv->id,\n 'name' => $sv->name\n );\n }\n $tmp['services'] = $services;\n\n $bookings[] = $tmp;\n }\n }\n\n $this->set(compact('bookings'));\n $this->set('_serialize', 'bookings');\n }",
"function getBookingsByBookingDetailsId($bookingDetailsId) {\n $query = \"SELECT * FROM `bookings` WHERE BookingId='\".$bookingDetailsId.\"'\";\n $result = Database::selectQuery($query);\n if($result == null) {\n return null;\n } else {\n return $result;\n }\n }",
"public function bookings() {\n\t\treturn $this->hasMany(Bookings::class);\n\t}",
"static public function getAll()\r\n {\r\n\r\n //connect with DB\r\n $db = Database::getConnect();\r\n $sql = \"SELECT `book_id`,`name`, `author`, `published_date` FROM `books` WHERE `deleted_at` IS NULL ORDER BY `book_id`\";\r\n $result = $db->query($sql);\r\n $result->execute();\r\n return $result->fetchAll();\r\n }",
"public function booking()\n {\n return $this->hasMany(Booking::class);\n }",
"static function getGroupBookingsReport() {\n global $wpdb;\n $resultset = $wpdb->get_results($wpdb->prepare(\n \"SELECT reservation_id, guest_name, booking_reference, booking_source, checkin_date, checkout_date, \n booked_date, payment_outstanding, num_guests, data_href, notes, viewed_yn \n FROM wp_lh_group_bookings\n WHERE job_id IN (SELECT CAST(value AS UNSIGNED) FROM wp_lh_job_param WHERE name = 'allocation_scraper_job_id' AND job_id = (SELECT MAX(job_id) FROM wp_lh_jobs WHERE classname = 'com.macbackpackers.jobs.GroupBookingsReportJob' AND status = 'completed'))\n AND ( num_guests >= %d \" .\n (get_option('hbo_include_5_guests_in_6bed_dorm') == 'true' ? ' OR num_guests = 5' : '' ) . \"\n )\n ORDER BY checkin_date\", get_option('hbo_group_booking_size')));\n\n if($wpdb->last_error) {\n throw new DatabaseException($wpdb->last_error);\n }\n\n return $resultset;\n }",
"public function getallBooks()\r\n {\r\n $sql = \"SELECT id, name, publisher, year,description FROM book\";\r\n $query = $this->db->prepare($sql);\r\n $query->execute();\r\n\r\n return $query->fetchAll();\r\n }",
"public function getBookList()\n {\n return $this->bookDao->getBookList();\n }",
"public function index()\n {\n return response()->json(Booking::all());\n }",
"function getBookingsCheckdin(){\r\n $inx = 0;\r\n $arrpack = array();\r\n $conn = getConnection();\r\n\r\n $stmt = $conn->prepare(\"SELECT B.idreservations, B.datebkd, G.gs_name, G.gs_contact, B.type, P.pax, P.pooltype, P.time, P.ratetype, B.rs_checkin, P.num_rm, P.pax_pr_rm, B.datebkd FROM guests G, booking B, packages P where G.reservations_idreservations = B.idreservations AND B.packages_idpackages = P.idpackages AND B.status LIKE 'checked'\");\r\n $stmt->execute();\r\n\r\n $result = $stmt->get_result();\r\n\r\n if($result->num_rows > 0){\r\n while($row = $result->fetch_assoc()) {\r\n $dte = $row['datebkd'];\r\n $pieces = explode(\"-\", $dte);\r\n $id = $row['idreservations'];\r\n $totString = $pieces[0] . $pieces[1] . $pieces[2] . \"-o-\" . $id;\r\n $arrpack[$inx][0] = $totString;\r\n $arrpack[$inx][1] = $row[\"idreservations\"];\r\n $arrpack[$inx][2] = $row[\"gs_name\"];\r\n $arrpack[$inx][3] = $row[\"gs_contact\"];\r\n $arrpack[$inx][4] = $row[\"type\"];\r\n $arrpack[$inx][5] = $row[\"pax\"];\r\n $arrpack[$inx][6] = $row[\"pooltype\"];\r\n $arrpack[$inx][7] = $row[\"time\"];\r\n $arrpack[$inx][8] = $row[\"ratetype\"];\r\n $arrpack[$inx][9] = $row[\"rs_checkin\"];\r\n $inx++;\r\n }\r\n }\r\n $conn->close(); \r\n return $arrpack;\r\n }",
"function getBookings($uid, $interval) {\n\n\t\t$bookingsRaw = array();\n\t\t$storagePid = $this->lConf['PIDstorage'];\n\n\t\tif (!isset($uid))\n\t\t\t$uid = $this->lConf['ProductID'];\n\n\t\tif (!isset($interval['startList']) && !isset($interval['endList'])) {\n\t\t\t$interval['startList'] = $interval['startDate'];\n\t\t\t$interval['endList'] = $interval['endDate'];\n\t\t}\n\n\t\tif ($storagePid != '' && $uid != '') {\n\t\t\t// SELECT\n\t\t\t// 1. get for bookings for these uids/pids\n\t\t\t$query = 'pid IN ('. $storagePid .') AND uid_foreign IN ('.$uid.')';\n\t\t\t$query .= ' AND deleted=0 AND hidden=0 AND uid=uid_local';\n\t\t\t$query .= ' AND ( enddate >=('.$interval['startList'].') AND startdate <=('.$interval['endList'].'))';\n\n\t\t\t$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('DISTINCT uid_foreign as uid, startdate, enddate, title','tx_abbooking_booking, tx_abbooking_booking_productid_mm',$query,'','startdate','');\n\n\t\t\t// one array for start and end dates. one for each pid\n\t\t\twhile (($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res))) {\n\t\t\t\t$bookingsRaw[] = $row;\n\t\t\t};\n\n\t\t}\n\n\t\t$localbookings['bookings'] = $bookingsRaw;\n\n \t\treturn $localbookings;\n\n\t}",
"public function getBookings(): ?array\n {\n return $this->bookings;\n }",
"public function bookings()\n {\n return $this->hasMany('App\\Booking');\n }",
"public function getBooking($id)\n {\n return $this->model->where('customer_id', $id)->orderBy('id', 'desc')->with('flight', 'passenger', 'outbound', 'cost')->get();\n }",
"public function bookingById($id)\n\t{\n\t\t$this->db->select('*');\n\t\t$this->db->from($this->pro->prifix.$this->pro->booking);\n\t\t$this->db->join($this->pro->prifix.$this->pro->user,$this->pro->user.\"_id=\".$this->pro->booking.\"_userId\");\n\t\t\n\t\t$this->db->where($this->pro->booking.'_id',$id);\n\t\t$this->db->limit($limit,$offset);\n\t\t$rs = $this->db->get();\n\t\t//echo $this->db->last_query();\n\t\treturn $rs->row_array();\n\t\t\n\t}",
"public function loadBookingInformation()\n {\n $this->booking = Booking::with([\n 'usedCoupon',\n 'bookingPeriods',\n 'bookingAddOns.addOn',\n 'AdhocItems',\n ])->find(json_decode($this->request->booking, true)['id']);\n }",
"public function bookings()\n {\n return $this->hasMany('App\\Models\\Booking');\n }",
"public function findAll() {\n $sql = \"select * from book order by book_id desc\";\n $result = $this->getDb()->fetchAll($sql);\n\n // Convert query result to an array of domain objects\n $livres = array();\n foreach ($result as $row) {\n $livreId = $row['book_id'];\n $livres[$livreId] = $this->buildDomainObject($row);\n }\n return $livres;\n }",
"function getAllBookings($userID){\n $query = $this->db->query(\"SELECT bookings.*,buildings.name as buildingName, buildings.id as buildingID ,rooms.name as roomName,rooms.floorNumber , rooms.type from bookings join rooms on rooms.roomId = bookings.roomID join buildings on buildings.id = rooms.buildingId where userID = $userID\");\n\n if($query->num_rows()>0)\n {\n $response['status'] = 'success';\n $response['data']=$this->getParticipantsForMeetings($query->result_array());\n }\n else\n {\n $response['status'] = 'failure';\n $response['code'] = 'database failure';\n\n }\n return $response;\n }",
"function getBookingsByCustomerId($customerid) {\n $query = \"SELECT * FROM `bookings` WHERE CustomerId='\" . $customerid . \"'\";\n \n $result = Database::selectQuery($query);\n \n if($result == null) {\n return null;\n } else {\n return $result;\n }\n }",
"public function jsonListByDate()\n {\n $date = $_GET['date'];\n $bookingMgr = new BookingMgr();\n $bookings = $bookingMgr->getBookingPaginationByDate($date);\n return $bookings;\n }",
"function fetchAllOrders()\n\t{\n\t\t$sql = \"SELECT o.booking_id,o.journey_id,o.booking_time,o.email, o.amount, r.route_name, o.order_status, j.departure_date, j.departure_time, j.vehicle_reg,j.route_id, j.driver_id, j.conductor_id, b.color,b.model,b.coach,b.no_of_seats,r.start_point, r.end_point, r.distance,r.duration, j.driver_name,j.conductor_name,b.imgurl,b.normal_seats,b.vip_seats FROM booking as o, journey as j, route as r, bus as b WHERE j.journey_id = o.journey_id AND j.route_id = r.route_id AND j.vehicle_reg = b.registration AND j.route_id = r.route_id\";\n\t\t$result = $this->conn->query($sql);\n\t\tif ($result->num_rows > 0) {\n\t\t\twhile ($row = $result->fetch_assoc()) {\n\t\t\t\t$orders[] = new Order($row['booking_id'], $row['journey_id'], $row['booking_time'], $row['email'],\n\t\t\t\t\t$row['amount'], $row['route_name'], $row['order_status'],$row['departure_date'],\n\t\t\t\t\t$row['departure_time'],$row['vehicle_reg'],$row['route_id'],$row['driver_id'],$row['conductor_id'],\n\t\t\t\t\t$row['color'],$row['model'],$row['coach'],$row['no_of_seats'],$row['start_point'],$row['end_point'],\n\t\t\t\t\t$row['distance'],$row['duration'],$row['driver_name'],$row['conductor_name'],$row['imgurl'],$row['normal_seats'],$row['vip_seats']\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn $orders;\n\t\t} else {\n\t\t\treturn [];\n\t\t}\n\t}",
"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 }",
"function EM_Booking( $booking_data = false ){\r\n\t\tif( $booking_data !== false ){\r\n\t\t\t//Load booking data\r\n\t\t\t$booking = array();\r\n\t\t\tif( is_array($booking_data) ){\r\n\t\t\t\t$booking = $booking_data;\r\n\t\t\t\t//Also create a person out of this...\r\n\t\t\t \t$this->person = new EM_Person($booking_data);\r\n\t\t\t}elseif( $booking_data > 0 ){\r\n\t\t\t\t//Retreiving from the database\t\t\r\n\t\t\t\tglobal $wpdb;\t\t\t\r\n\t\t\t\t$sql = \"SELECT * FROM \". $wpdb->prefix . EM_BOOKINGS_TABLE .\" WHERE booking_id ='$booking_data'\"; \r\n\t\t\t \t$booking = $wpdb->get_row($sql, ARRAY_A);\r\n\t\t\t \t//Get the person for this booking\r\n\t\t\t \t$this->person = new EM_Person($booking['person_id']);\r\n\t\t\t}\r\n\t\t\t//Save into the object\r\n\t\t\t$this->to_object($booking);\r\n\t\t}\r\n\t}",
"function listAllPayment($booking){\n // $records = $this->payments->getAllPaymentByBookingId($booking) ; \n // return $records ; \n $query = \"SELECT distinct(booking_pay_submit_date) as date from booking_pay where booking_pay_ref='$booking' \" ; \n // echo $query;\n $response['records'] = array();\n $res = mysqli_query($this->connection , $query) ;\n while($data = mysqli_fetch_assoc($res) ){\n // var_dump($data['date']);\n \n $paymentDate = $data['date'];\n \n $record = $this->payments->getBookingForDateAndBooking($booking , $paymentDate) ; \n $item =array(\"date\"=>formatDate($paymentDate) , \"payments\"=>$record) ; \n array_push($response['records'] , $item);\n }\n return $response['records'] ;\n }",
"public function bookings(): HasMany\n {\n return $this->hasMany(Booking::class);\n }",
"public function getBookList()\n\t{\n\t\treturn array(\n\t\t\t\"1\" => new Book(\"Être et Temps\", \"9782070707393\", 1, 1, 1),\n\t\t\t\"2\" => new Book(\"Finnegans Wake\", \"9782070402250\", 2, 2, 2),\n\t\t\t\"3\" => new Book(\"Critique de la raison pure\", \"9782070325757\", 3, 3, 3)\n\t\t);\n\t}",
"public function bookings(): HasMany\n {\n return $this->hasMany(\\App\\Models\\Booking::class);\n }",
"public function bookings() {\n // writing: Booking::class is equivalent to: 'App\\Comment'\n return $this->hasMany(Booking::class, 'fldCarId');\n }",
"public function booking()\n {\n return $this->hasMany('App\\Models\\Booking');\n }",
"public function getListing(){\n $BusInfo = $this->BusinessOwnerModel->getBusinessID();\n \n foreach($BusInfo as $row1){\n $busID = $row1->bid;\n }\n \n $query = $this->db->get_where('BusinessListing', array('bid' => $busID));\n \n if($query->num_rows() > 0){\n foreach($query->result() as $row){\n $data[] = $row;\n }\n return $data;\n }\n return false;\n }",
"public function index(): object\n {\n $booking = $this->bookingRepository->all();\n\n return $this->sendResponse($booking->toArray(), 'Bookings retrieved successfully.');\n }",
"private function _getAllBookings(User $driver) {\n\t\t$bookings = $driver->getDriverBookings ();\n\t\treturn $bookings;\n\t}",
"function getAllPostings() {\n return getAll(\"select * from posting\");\n}",
"function getTodaysPendingBookings($storeId = null) {\n if ($storeId) {\n App::import('Model', 'Booking');\n $this->Booking = new Booking();\n $current_date = date(\"Y-m-d\", (strtotime($this->storeTimeZone($storeId,'', date('Y-m-d H:i:s')))));\n $pendingbookings = $this->Booking->getTodaysPendingBookings($storeId, $current_date);\n return $pendingbookings;\n }\n }",
"function get_winners(object $db) :array\n{\n $query = $db->prepare('SELECT `id`, `prize_year`, `author_name`, `book_name`, `author_nationality` FROM `booker_winners` WHERE `deleted` = 0 ORDER BY `prize_year` DESC;');\n $query->execute();\n $winners = $query->fetchAll();\n return $winners;\n}",
"function getBookingDetailsByBookingId($bookingid) {\n $query = \"SELECT * FROM `bookingdetails` WHERE BookingId='\".$bookingid.\"'\";\n $result = Database::selectQuery($query);\n if($result == null) {\n return null;\n } else {\n return $result;\n }\n }",
"public function listBooks()\n {\n //list all books in database\n $sql2 = \"SELECT * from book\";\n $userBooks = mysql_fetch_array(mysql_query($sql2));\n return $userBooks; \n }",
"public function get_book()\n {\n $sql = DB::select('select * from books');\n return $sql;\n }",
"public function getallbooks(){\n\t\t\t$this->db->select('id, name, price, author, category, language, ISBN, publish_date')\n\t\t\t\t\t ->from('tbl_books');\n\t\t\t$this->db->order_by('id', 'desc');\n\n\t\t\t$query = $this->db->get();\n\n\t\t\tif($query->num_rows() > 0){\n\t\t\t\treturn $query->result_array();\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn 0;\n\t\t\t}\n\n\t\t}",
"public static function getDataByBookingId($booking_id){\n $query = self::select('booking_detail.*','services_units.name');\n $query->leftJoin('services_units','services_units.id','=','booking_detail.service_unit_id');\n\n $query->where('booking_detail.booking_id',$booking_id);\n\n return $query->first()->toArray();\n\n }",
"function getBuildingList() {\n return getAll(\"SELECT * FROM building\");\n}",
"public function bookings(Request $request) \n {\n $bookings = [];\n\t $slots = slots($request->input('start_time'), $request->input('end_time'));\n\n\t for($x = 0; $x < count($slots); $x++)\n {\n\t\t array_push($bookings, [\"lab_id\" => $request->input('lab_id'),\n\t\t\t \t\t \"date\" => $request->input('date'),\n\t\t\t \t\t \"start_time\" => substr($slots[$x],0,5),\n\t\t\t\t\t \"end_time\" => substr($slots[$x],6,5),\n\t\t\t \t\t \"purpose\" => $request->input('purpose'),\n\t\t\t\t\t\t\t\t\t\t\"module\" => $request->input('module')\n\t\t\t\t\t\t\t\t\t]\n\t\t\t);\n\n \n }\n return $bookings;\n }",
"function fetchOrderByBookingId(String $bookingId): Order\n\t{\n\t\t$sql = \"SELECT o.booking_id,o.journey_id,o.booking_time,o.email, o.amount, r.route_name, o.order_status, j.departure_date, j.departure_time, j.vehicle_reg,j.route_id, j.driver_id, j.conductor_id, b.color,b.model,b.coach,b.no_of_seats,r.start_point, r.end_point, r.distance,r.duration, j.driver_name,j.conductor_name,b.imgurl,b.normal_seats,b.vip_seats FROM booking as o, journey as j, route as r, bus as b WHERE o.booking_id = '$bookingId' AND j.journey_id = o.journey_id AND j.route_id = r.route_id AND j.vehicle_reg = b.registration AND j.route_id = r.route_id\";\n\n\t\t$result = $this->conn->query($sql);\n\t\tif ($result->num_rows > 0) {\n\t\t\twhile ($row = $result->fetch_assoc()) {\n\t\t\t\t$order = new Order($row['booking_id'], $row['journey_id'], $row['booking_time'], $row['email'],\n\t\t\t\t\t$row['amount'], $row['route_name'], $row['order_status'],$row['departure_date'],\n\t\t\t\t\t$row['departure_time'],$row['vehicle_reg'],$row['route_id'],$row['driver_id'],$row['conductor_id'],\n\t\t\t\t\t$row['color'],$row['model'],$row['coach'],$row['no_of_seats'],$row['start_point'],$row['end_point'],\n\t\t\t\t\t$row['distance'],$row['duration'],$row['driver_name'],$row['conductor_name'],$row['imgurl'],$row['normal_seats'],$row['vip_seats']\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn $order;\n\t\t} else {\n\t\t\treturn [];\n\t\t}\n\t}",
"public static function fromBinding($binding)\n {\n $sorters = array('firstPage' => 'ASC');\n $books = BookList::find(\n array('bindingId' => $binding->getBindingId()), 0, null, $sorters)->getEntities();\n return $books;\n }",
"public function get_facility_booking($booking_id) {\r\n //SELECT * FROM tbl_facility_bookings WHERE facility_booking_id = 1\r\n $this->db->select('*');\r\n $this->db->where('facility_booking_id = ' . $booking_id . ' AND facility_booking_is_deleted = 0');\r\n $result = $this->db->get('tbl_facility_bookings')->result_array();\r\n\r\n return $result;\r\n }",
"function getBookersByDate($yr, $mth){\r\n $inx = 0;\r\n $arrpack = array();\r\n $conn = getConnection();\r\n\r\n $stmt = $conn->prepare(\"SELECT B.idreservations, B.datebkd, G.gs_name, P.pax, P.pooltype, P.time, P.ratetype, B.rs_checkin from packages P, booking B, guests G where B.idreservations = G.reservations_idreservations and B.packages_idpackages = P.idpackages and Year(rs_checkin) = ? and Month(rs_checkin) = ? order by rs_checkin\");\r\n $stmt->bind_param(\"ii\", $yr, $mth);\r\n $stmt->execute();\r\n\r\n $result = $stmt->get_result();\r\n\r\n if($result->num_rows > 0){\r\n while($row = $result->fetch_assoc()){\r\n\r\n $dte = $row['datebkd'];\r\n $pieces = explode(\"-\", $dte);\r\n $id = $row['idreservations'];\r\n $totString = $pieces[0] . $pieces[1] . $pieces[2] . \"-o-\" . $id;\r\n $arrpack[$inx][0] = $row['rs_checkin'];\r\n $arrpack[$inx][1] = $totString;\r\n $arrpack[$inx][2] = $row['gs_name'];\r\n $arrpack[$inx][3] = $row['pax'];\r\n $arrpack[$inx][4] = $row['pooltype'];\r\n $arrpack[$inx][5] = $row['time'];\r\n $arrpack[$inx][6] = $row['ratetype'];\r\n $inx++;\r\n }\r\n }\r\n $conn->close(); \r\n\r\n return $arrpack;\r\n }",
"public function Booking()\n {\n return $this->hasMany('App\\Booking');\n }",
"public function getBooks()\n {\n $sql = 'SELECT bookshop_books.id,\n bookshop_books.description,\n bookshop_books.booksName,\n bookshop_books.pubyear,\n bookshop_discounts.id AS discountsId,\n bookshop_discounts.discountsName,\n bookshop_discounts.percent,\n bookshop_books.price,\n bookshop_authors.id AS idAuthors,\n bookshop_authors.authorsName,\n bookshop_genres.id AS idGenres,\n bookshop_genres.genresName\n FROM bookshop_books_to_authors\n INNER JOIN bookshop_books\n ON bookshop_books_to_authors.id_book = bookshop_books.id\n INNER JOIN bookshop_books_to_genres\n ON bookshop_books_to_genres.id_book = bookshop_books.id\n INNER JOIN bookshop_authors\n ON bookshop_books_to_authors.id_author = bookshop_authors.id\n INNER JOIN bookshop_genres\n ON bookshop_books_to_genres.id_genre = bookshop_genres.id\n INNER JOIN bookshop_discounts\n ON bookshop_books.id_discount = bookshop_discounts.id';\n \n $result = $this->db->execute($sql);\n\n if (!$result)\n return $this->error();\n\n return $this->formingBooks($result);\n }",
"public function getAllAuctions() {\n\n return Auction::all();\n /*\n * //SQL DB query\n * return DB::select('select * from auctions');\n */\n }",
"function get($search) {\r\n\t\tglobal $wpdb;\r\n\t\t$conds = array(); \r\n\t\tforeach($search as $key => $value) {\r\n\t\t\tif( array_key_exists($key, $this->fields) ){\r\n\t\t\t\t$value = $wpdb->escape($value);\r\n\t\t\t\t$conds[] = \"`$key`='$value'\";\r\n\t\t\t} \r\n\t\t}\r\n\t\t$sql = \"SELECT * FROM \". $wpdb->EM_BOOKINGS_TABLE .\" WHERE \" . implode(' AND ', $conds) ;\r\n\t\t$result = $wpdb->get_row($sql, ARRAY_A);\r\n\t\tif($result){\r\n\t\t\t$this->to_object($result);\r\n\t\t\treturn true;\t\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"public static function forApartment($apartment_id) {\n\t\t\t\n\t\t\treturn Booking::where('apartment_id', $apartment_id)->get();\n\t\t}",
"public function getBorrowedbooks()\n {\n return $this->hasMany(Borrowedbooks::className(), ['bookId' => 'bookId']);\n }",
"public function businessBookingList($lid) {\n $this->db->select('*')->from('ReserveRestaurantTable')->where('ReserveRestaurantTable.lid',$lid);\n $this->db->join('RestaurantTables', 'RestaurantTables.rid = ReserveRestaurantTable.rid');\n $this->db->join('Tables', 'Tables.tid = RestaurantTables.table_type');\n $query = $this->db->get();\n return $query->result();\n }",
"public function index(IndexBookingRequest $request)\n {\n $collection = $this->bookingRepo->getBookings($request)->paginate(3);\n return new BookingCollection($collection);\n }",
"public function listbooking($user=\"\") {\n \t$this->db->select('rumah.*, booking.*');\n\t\t$this->db->from('rumah');\n\t\t$this->db->where('rumah.user', $user);\n\t\t$this->db->join('users','users.id = rumah.user','right');\n\t\t$this->db->join('booking','booking.rumah = rumah.id','right');\n\t\t$this->db->order_by('rumah.id','desc');\n\t\t$query = $this->db->get();\n\t\treturn $query->result_array(); \n }",
"public function findAllBooks()\n {\n MyLogger::info(\"Entering OwnedBookBusinessService.findAllBooks\");\n //creates a connection\n $db = new Connection();\n $conn = $db->open();\n \n //creates an array of education\n $books = Array();\n \n //calls the data service\n $service = new OwnedBookDataService($conn);\n \n //calls the find all method in the data service\n $books = $service->findAllBooks();\n \n //closes the connection\n $conn = null;\n \n //return the array\n return $books;\n \n MyLogger::info(\"Exiting OwnedBookBusinessService.findAllBooks\");\n }",
"function get_booksinn($id)\n {\n return $this->db->get_where('booksinn',array('id'=>$id))->row_array();\n }",
"public function get_all_booking_products_data(): array {\n\t\tglobal $wpdb;\n\n\t\t$product_ids = $wpdb->get_col(\n\t\t\t\"\n\t\t\tSELECT tr.object_id FROM\n\t\t\t$wpdb->term_relationships AS tr\n\t\t\tINNER JOIN $wpdb->terms AS t ON tr.term_taxonomy_id = t.term_id\n\t\t\tINNER JOIN $wpdb->posts AS p ON tr.object_id = p.ID\n\t\t\tWHERE t.slug IN('booking', 'accommodation-booking')\n\t\t\tAND p.post_status = 'publish'\n\t\t\t\"\n\t\t);\n\n\t\tif ( ! $product_ids ) {\n\t\t\tthrow new RuntimeException( esc_html__( 'No booking products found!', 'bookings-helper' ) );\n\t\t}\n\n\t\t// Convert product ids to int.\n\t\t$product_ids = array_map( 'intval', $product_ids );\n\n\t\t$booking_products_data = array();\n\n\t\tforeach ( $product_ids as $product_id ) {\n\t\t\t$booking_products_data[ $product_id ] = $this->get_booking_product_data( $product_id );\n\t\t}\n\n\t\treturn $booking_products_data;\n\t}",
"function getAllBooks( ) {\n global $db;\n $stmt = mysqli_prepare(\n $db,\n 'SELECT\n books.bid,\n books.title,\n books.description,\n bookauthors.name,\n genres.name,\n books.coverimage\n FROM\n books CROSS\n JOIN bookgenres ON bookgenres.bid = books.bid CROSS\n JOIN genres ON genres.id = bookgenres.genreid CROSS\n JOIN bookauthors ON bookauthors.bid = books.bid CROSS\n JOIN bcopies ON bcopies.bid = books.bid\n WHERE\n bcopies.deleted = 0 AND\n bcopies.given = 0\n ORDER BY\n books.title ASC\n ');\n mysqli_stmt_execute( $stmt );\n mysqli_stmt_store_result( $stmt );\n mysqli_stmt_bind_result( $stmt,$id, $title, $description, $author, $genre, $image );\n while ( mysqli_stmt_fetch( $stmt ) ) {\n $book[ 'title' ] = $title;\n $book[ 'img' ] = $image;\n $book[ 'description' ] = $description;\n $book[ 'authors' ][ $author ] = true;\n $book[ 'genres' ][ $genre ] = true;\n $book[ 'bid' ] = $id;\n $books[ $id ] = $book;\n }\n return $books;\n }",
"function getSelectedBooks($userID)\n{\n $dbConnection = parse_ini_file(\"Common/db_connection.ini\");\n extract($dbConnection);\n $myPdo = new PDO($dsn, $user, $password);\n\n $books = array();\n\n $stmt = $myPdo->prepare(\"SELECT * FROM Book JOIN ShoppingCart ON ShoppingCart.BookId = Book.BookId WHERE ShoppingCart.CustomerId=customerID\");\n $stmt->execute(['customerID' => $userID]);\n//$row = $stmt->fetch(PDO::FETCH_ASSOC);\n//make book objects for table\n foreach ($stmt as $row) {\n\n $book = new Book($row['BookId'],$row['Title'],$row['Description'],$row['Price']);\n\n $books[] = $book;\n\n }\n return $books;\n\n}",
"public function getBookById($id) {\n\t\t$book = null;\n\n foreach ($this->db-> query(\"SELECT * FROM book WHERE id=$id\") as $row){\n \n $book = new Book($row['title'], $row['author'], $row['description'], $row['id']);\n }\n\n return $book;\n }",
"function wpbs_register_database_classes_bookings($classes)\n{\n\n $classes['bookings'] = 'WPBS_Object_DB_Bookings';\n $classes['bookingmeta'] = 'WPBS_Object_Meta_DB_Bookings';\n\n return $classes;\n\n}",
"static public function getAllReservations() {\n\t\ttry {\n\t\t\t$rep = Model::$pdo->query('SELECT * FROM reservation WHERE idFestival =' . $_SESSION[\"idFestival\"]);\n\t\t\t$rep->setFetchMode(PDO::FETCH_CLASS, 'ModelReservation');\n\t\t\t$tab_prod = $rep->fetchAll();\n\t\t\treturn $tab_prod;\n\t\t} catch (PDOException $e) {\n\t\t\techo('Error tout casse ( /!\\ method getAllReservations() /!\\ )');\n\t\t}\n\t}",
"public static function readAll($db) {\n // Prepares and executes the query.\n $query = \"SELECT * From \" . Bill::$table_name . \" ORDER BY date DESC\";\n\n $stmt = $db->prepare($query);\n $stmt->execute();\n\n // Create a Bill object array\n $bill_array = array();\n\n // Traverses the Resultset of the query Execution.\n // Adds a new element to the array for each record.\n while ($row = $stmt->fetch(PDO::FETCH_ASSOC)){\n $bill = new Bill($db);\n Bill::updateAttributes($bill, $row);\n // Adds the Bill object to the array\n $bill_array[] = $bill;\n }\n\n return $bill_array;\n }",
"function listDaysToBook($compId, $shotId)\r\n\t{\r\n\t\tglobal $debug;\r\n\t\t// Get a separate connection\r\n\t\t$dbh = getDBHandle();\r\n\t\t$list = array();\r\n\t\t\r\n\t\tif ($dbh == null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\t\r\n\t\t$sql = \"\r\n\t\t\tcall ListDaysToBook(0$compId, 0$shotId) \r\n\t\t\";\r\n\t\t\r\n\t\tif ($dbh->multi_query($sql))\r\n\t\tdo {\r\n\t\t\tif ($result = $dbh->store_result()) {\r\n\t\t\t\twhile ($obj = $result->fetch_object())\r\n\t\t\t\t{\r\n\t\t\t\t\t$list[$obj->Id] = $obj->Name;\r\n\t\t\t\t}\r\n\t\t\t\t$result->close();\r\n\t\t\t}\r\n\t\t} while ($dbh->next_result());\r\n\r\n\t\tif ($debug)\r\n\t\t\tprint($dbh->error);\r\n\r\n\t\t$dbh->close();\r\n\t\treturn $list;\r\n\t}",
"function getBookingByMonth()\n {\n $query = $this->db->select('BK_Year,BK_Month,BK_Day')\n ->get('booking');\n return $query->result();\n }",
"function getToppingsSalesFromDB()\n{\n\t$con = mysql_connect(\"localhost\", \"DBandGUI\", \"narwhal\");\n\n\tif(!$con) { die('Could not connect: ' . mysql_error()); }\n\n\tmysql_select_db(\"CustomCupcakes\", $con) or die('Could not select db: ' . mysql_error());\n\n\t$query = \"SELECT topping_Name,purchase_Amount FROM CupcakeTopping;\";\n\n\t$result = mysql_query($query);\n\n\t$finalArr = array();\n\n\twhile($row = mysql_fetch_array($result))\n\t{\n\t\t$finalArr[$row['topping_Name']] = $row['purchase_Amount'];\n\t}\n\n\tmysql_close($con);\n\n\treturn $finalArr;\n}",
"public function bookingList()\n {\n $user = User::find(Auth::user()->id);\n return view('booking.booking_list', compact('user'));\n }",
"public static function get( $args = array(), $count = false ){\n\t\tglobal $wpdb,$current_user;\n\t\t$bookings_table = EM_BOOKINGS_TABLE;\n\t\t$events_table = EM_EVENTS_TABLE;\n\t\t$locations_table = EM_LOCATIONS_TABLE;\n\t\t\n\t\t//Quick version, we can accept an array of IDs, which is easy to retrieve\n\t\tif( self::array_is_numeric($args) ){ //Array of numbers, assume they are event IDs to retreive\n\t\t\t//We can just get all the events here and return them\n\t\t\t$sql = \"\n\t\t\t\tSELECT * FROM $bookings_table b \n\t\t\t\tLEFT JOIN $events_table e ON e.event_id=b.event_id \n\t\t\t\tWHERE booking_id=\".implode(\" OR booking_id=\", $args);\n\t\t\t$results = $wpdb->get_results(apply_filters('em_bookings_get_sql',$sql),ARRAY_A);\n\t\t\t$bookings = array();\n\t\t\tforeach($results as $result){\n\t\t\t\t$bookings[] = em_get_booking($result);\n\t\t\t}\n\t\t\treturn $bookings; //We return all the bookings matched as an EM_Booking array. \n\t\t}\n\t\t\n\t\t//We assume it's either an empty array or array of search arguments to merge with defaults\t\t\t\n\t\t$args = self::get_default_search($args);\n\t\t$limit = ( $args['limit'] && is_numeric($args['limit'])) ? \"LIMIT {$args['limit']}\" : '';\n\t\t$offset = ( $limit != \"\" && is_numeric($args['offset']) ) ? \"OFFSET {$args['offset']}\" : '';\n\t\t\n\t\t//Get the default conditions\n\t\t$conditions = self::build_sql_conditions($args);\n\t\t//Put it all together\n\t\t$where = ( count($conditions) > 0 ) ? \" WHERE \" . implode ( \" AND \", $conditions ):'';\n\t\t\n\t\t//Get ordering instructions\n\t\t$EM_Booking = em_get_booking();\n\t\t$accepted_fields = $EM_Booking->get_fields(true);\n\t\t$accepted_fields['date'] = 'booking_date';\n\t\t$orderby = self::build_sql_orderby($args, $accepted_fields);\n\t\t//Now, build orderby sql\n\t\t$orderby_sql = ( count($orderby) > 0 ) ? 'ORDER BY '. implode(', ', $orderby) : 'ORDER BY booking_date';\n\t\t//Selectors\n\t\tif( $count ){\n\t\t\t$selectors = 'COUNT(*)';\n\t\t}elseif( is_array($args['array']) ){\n\t\t\t$selectors = implode(',', $args['array']);\n\t\t}else{\n\t\t\t$selectors = '*';\n\t\t}\n\t\t//Create the SQL statement and execute\n\t\t$sql = apply_filters('em_bookings_get_sql',\"\n\t\t\tSELECT $selectors FROM $bookings_table \n\t\t\tLEFT JOIN $events_table ON {$events_table}.event_id={$bookings_table}.event_id \n\t\t\tLEFT JOIN $locations_table ON {$locations_table}.location_id={$events_table}.location_id\n\t\t\t$where\n\t\t\t$orderby_sql\n\t\t\t$limit $offset\n\t\t\", $args);\n\t\t\n\t\t//If we're only counting results, return the number of results\n\t\tif( $count ){\n\t\t\treturn apply_filters('em_bookings_get_count', $wpdb->get_var($sql), $args);\t\t\n\t\t}\n\t\t$results = $wpdb->get_results($sql, ARRAY_A);\n\n\t\t//If we want results directly in an array, why not have a shortcut here?\n\t\tif( !empty($args['array']) ){\n\t\t\treturn $results;\n\t\t}\n\t\t\n\t\t//Make returned results EM_Booking objects\n\t\t$results = (is_array($results)) ? $results:array();\n\t\t$bookings = array();\n\t\tforeach ( $results as $booking ){\n\t\t\t$bookings[] = em_get_booking($booking);\n\t\t}\n\t\t$EM_Bookings = new EM_Bookings($bookings);\n\t\treturn apply_filters('em_bookings_get', $EM_Bookings);\n\t}",
"public function findLatest(): Booking\n {\n return $this->bookingRepository->getLatest();\n }",
"private function getTodayAdvertisements() {\n \treturn AdvertisementQuery::create()\n\t\t\t\t->filterByCurrent()\n\t\t\t\t->filterByBillboard($this)\n\t\t\t\t->find();\n }",
"function wpbs_insert_booking($data)\n{\n\n return wp_booking_system()->db['bookings']->insert($data);\n\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 get9book(){\n $db =new DbConnect();\n $con =$db->connect();\n $books9 = array();\n $result_book = mysqli_query($con,\"SELECT * from book order by book_id DESC LIMIT 9\");\n while($book9 = mysqli_fetch_array($result_book,MYSQLI_ASSOC)){\n array_push($books9,$book9);\n }\n return $books9;\n }",
"public function getReservaciones() {\n $pdo = Database::connect();\n $sql = \"select * from reservacion order by id_reservacion\";\n $resultado = $pdo->query($sql);\n //transformamos los registros en objetos:\n $listadoReserva = array();\n foreach ($resultado as $res) {\n $reservacion = new reservacion($res['nombre_paciente'], $res['id_medico'], $res['id_reservacion'], $res['descripcion'], $res['nota'], $res['fecha_cita'], $res['hora_cita'], $res['fecha_creacion']);\n array_push($listadoReserva, $reservacion);\n }\n Database::disconnect();\n //retornamos el listado resultante:\n return $listadoReserva;\n }",
"public function viewBookingsAction() {\n\t\t// check if user is logged in and fetch user's entity\n\t\t$loggedInUser = $this->_checkAndRedirect ();\t\t\n\t\n\t\t$trips = $this->_getAllTrips($loggedInUser);\n\t\tif (null !== $trips) {\n\t\t $messages = $this->flashMessenger()->getMessages();\n\t\t\treturn array (\n\t\t\t\t\t\"trips\" => $trips,\n\t\t\t \"messages\" => $messages,\n\t\t\t);\n\t\t} else { // there must be some internal error if $bookings is really null.\n\t\t\t$this->flashMessenger ()->clearMessages ();\n\t\t\t$this->flashMessenger ()->addErrorMessage ( IControllerMessages::ERROR_BOOKING_OVERVIEW );\n\t\t\t$this->redirect ()->toRoute ( IRouteStore::BOOK_ERROR );\n\t\t}\n\t}",
"public function index()\n {\n $user = Auth::guard('admin')->user()->name;\n $halls = Hall::where('vendor', '=', $user)->pluck('id');\n \n $bookings = Booking::where('hallid', '=', $halls)->get();\n echo $bookings;\n //return view('Admin.booking', compact('bookings'));\n }"
] | [
"0.7538633",
"0.7255412",
"0.7070308",
"0.6983764",
"0.6919388",
"0.6912813",
"0.68920493",
"0.6808918",
"0.6794719",
"0.67831343",
"0.6700685",
"0.6690955",
"0.6569792",
"0.653663",
"0.6495947",
"0.64860266",
"0.64771855",
"0.6438866",
"0.64347386",
"0.6405363",
"0.6398519",
"0.6392612",
"0.63759196",
"0.6350263",
"0.63475144",
"0.63277316",
"0.63251895",
"0.63173527",
"0.63073194",
"0.6294033",
"0.62931883",
"0.6265277",
"0.62645185",
"0.6264168",
"0.62577385",
"0.62135774",
"0.6201472",
"0.6172738",
"0.616924",
"0.6168971",
"0.61668634",
"0.6143833",
"0.61393136",
"0.61320585",
"0.6112766",
"0.6104938",
"0.608499",
"0.6066419",
"0.6045306",
"0.60380954",
"0.6005605",
"0.5989398",
"0.597588",
"0.5963905",
"0.5946481",
"0.59255195",
"0.59181625",
"0.58868307",
"0.586936",
"0.58653915",
"0.5843679",
"0.58220863",
"0.5820733",
"0.5794446",
"0.57807374",
"0.57701933",
"0.57638735",
"0.57624376",
"0.57572013",
"0.57564664",
"0.5749585",
"0.5734959",
"0.57185936",
"0.5702611",
"0.5698565",
"0.56966907",
"0.56930846",
"0.56846875",
"0.5679906",
"0.5672272",
"0.56711364",
"0.565879",
"0.5657966",
"0.5652055",
"0.5649972",
"0.5646183",
"0.56427777",
"0.5622207",
"0.56191033",
"0.56126547",
"0.5610766",
"0.56027347",
"0.5600943",
"0.55971354",
"0.5594442",
"0.55896956",
"0.5589286",
"0.55872965",
"0.5584536",
"0.55830014"
] | 0.63275284 | 26 |
Gets a booking from the database | function wpbs_get_booking($booking)
{
return wp_booking_system()->db['bookings']->get_object($booking);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getBookingDetailsByBookingId($bookingid) {\n $query = \"SELECT * FROM `bookingdetails` WHERE BookingId='\".$bookingid.\"'\";\n $result = Database::selectQuery($query);\n if($result == null) {\n return null;\n } else {\n return $result;\n }\n }",
"function get_user_booking_with_id($user_id){\n global $db;\n $sql = \"SELECT * FROM booking WHERE user_id = '$user_id'\";\n $result = $db->query($sql);\n return $result;\n}",
"public function findLatest(): Booking\n {\n return $this->bookingRepository->getLatest();\n }",
"function getBookingsByBookingDetailsId($bookingDetailsId) {\n $query = \"SELECT * FROM `bookings` WHERE BookingId='\".$bookingDetailsId.\"'\";\n $result = Database::selectQuery($query);\n if($result == null) {\n return null;\n } else {\n return $result;\n }\n }",
"function get_user_booking_using_id($user_id){\n global $db;\n $sql = \"SELECT * FROM booking WHERE user_id = '$user_id'\";\n $result = $db->query($sql)->fetch();\n return $result;\n}",
"function get_booking(){\r\n\t\tglobal $EM_Booking;\r\n\t\tif( is_object($this->booking) && get_class($this->booking)=='EM_Booking' && ($this->booking->id == $this->booking_id || (empty($this->id) && empty($this->booking_id))) ){\r\n\t\t\treturn $this->booking;\r\n\t\t}elseif( is_object($EM_Booking) && $EM_Booking->id == $this->booking_id ){\r\n\t\t\t$this->booking = $EM_Booking;\r\n\t\t}else{\r\n\t\t\tif(is_numeric($this->booking_id)){\r\n\t\t\t\t$this->booking = new EM_Booking($this->booking_id);\r\n\t\t\t}else{\r\n\t\t\t\t$this->booking = new EM_Booking();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn apply_filters('em_ticket_booking_get_booking', $this->booking, $this);;\r\n\t}",
"public function show(Booking $booking)\n {\n return $booking;\n }",
"public function show($id)\n {\n return $this->bookingRepository->find($id);\n }",
"function show_available_bookings(){\n global $db;\n $sql = \"SELECT * FROM booking_info;\";\n $result = $db->query($sql);\n return $result;\n}",
"public function show(Booking $booking)\n {\n //\n }",
"public function show(Booking $booking)\n {\n //\n }",
"public function show(Booking $booking)\n {\n //\n }",
"public function show(Booking $booking)\n {\n //\n }",
"public function show(Booking $booking)\n {\n //\n }",
"public function index(): object\n {\n $booking = $this->bookingRepository->all();\n\n return $this->sendResponse($booking->toArray(), 'Bookings retrieved successfully.');\n }",
"public function detailData($booking_id)\n {\n return DB::table('bookings')->where('booking_id', $booking_id)->first();\n }",
"public function getBooking($id)\n {\n return $this->model->where('customer_id', $id)->orderBy('id', 'desc')->with('flight', 'passenger', 'outbound', 'cost')->get();\n }",
"function get_reservation_byId($id) {\n global $DB;\n\n return $DB->get_record('roomscheduler_reservations', array('id' => $id));\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 }",
"private function _getBooking(User $loggedInUser, $bookingId) {\n\t\t$bookingRepo = $this->em->getRepository ( \\JumpUpPassenger\\Util\\IEntitiesStore::BOOKING );\n\t\t$booking = $bookingRepo->findOneBy ( array (\n\t\t\t\t\"id\" => $bookingId,\n\t\t\t\t\"driver\" => $loggedInUser->getId () \n\t\t) );\n\t\treturn $booking;\n\t}",
"public function getBookings() {\n //$query = \"SELECT * FROM `bookings` WHERE `DATE` = CURDATE() ORDER BY `DATE`, `TIME`\";\n $query = \"SELECT * FROM `bookings` where DATE(`DATE`) = CURDATE() \";\n\n $stmt = $this->sqlConnection->prepare($query);\n\n $stmt->execute();\n\n if ($stmt->rowCount() > 0) {\n\n $result = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\n return json_encode($result);\n } else {\n\n echo json_encode(array(\"status\" => 201, 'message' => 'No bookings made yet..'));\n }\n }",
"public static function getBooking($bookRef)\n {\n // Get the booking object\n $bookingCheck = \\tabs\\api\\client\\ApiClient::getApi()->get(\n \"/tabsbooking/{$bookRef}\"\n );\n if ($bookingCheck\n && $bookingCheck->status == 200\n && $bookingCheck->response != ''\n ) {\n return self::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 show($id)\n {\n $booking = $this->bookingRepo->getBooking($id);\n return new BookingResource($booking);\n }",
"public function bookingActive()\n\t{\n\t\t$ch = new Curl();\n\t\t\n\t\t$this->headers['Authorization'] = 'Bearer ' . $this->authToken;\n\t\t\n\t\t$data = [];\n\t\t\n\t\treturn $ch->get(GojekID::BASE_ENDPOINT . Action::bookingActive, $data, $this->headers)->getResponse();\n\t}",
"function findBooking() : array\n{ \n $db = new Database;\n $db = $db->dbConnect();\n\n $sql = \"SELECT booking.id, booking_date_debut, booking_time_debut, booking_date_fin, booking_time_fin, number_of_seats, user_i, last_name, first_name, mail \n FROM booking \n INNER JOIN user ON user.id = booking.user_i \";\n $adminGetBooking = $db->query($sql);\n $adminGetBooking = $adminGetBooking->fetchAll();\n return $adminGetBooking;\n}",
"public function booking(){\n\n\n \t$patient = Patient::where('medi_track', 'yes')->first();\n $medical = auth()->user()->medical;\n\n \tif ($medical && $patient) {\n\n \t\tif ($medical->issuing == 'off') {\n \t\t\treturn response()->json([\n\t\t\t\t\t'status' => 'faild',\n\t\t\t\t\t'message'=> 'Booking is currently off. Please try again later',\n\t\t\t\t], 400);\n \t\t}\n\n\n \t $booking = Booking::whereDate('created_at', Carbon::today())->where('medical_id', $medical->id)->latest()->first();\n \t\t(!$booking)? $booking_number = 1 : $booking_number = $booking->booking_no + 1;\n\n\t\t\tDB::beginTransaction();\n \t\t\t$newBooking = Booking::create([\n \t\t\t\t'patient_id' => $patient->id,\n \t\t\t\t'medical_id' => $medical->id,\n \t\t\t\t'booking_no' => $booking_number,\n \t\t\t]);\n \t\t\t$updateMedical = $medical->update(['current_issues_no' => $newBooking->booking_no ]);\n\n \t\t\tif ($newBooking && $updateMedical) {\n \t\tDB::commit();\n\n\t\t\t\t\treturn response()->json([\n\t\t \t\t\t'status' => 'success',\n\t\t \t\t\t'data'\t => [\n\t\t \t\t\t\t'booking_no' => $newBooking->booking_no\n\t\t \t\t\t]\n\t\t \t\t], 200);\n \t\t\t\n \t\t\t}else{\n \t\tDB::rollBack();\n\n\t\t\t\t\treturn response()->json([\n\t\t\t\t\t\t'status' => 'faild'\n\t\t\t\t\t], 400);\n \t\t\t}\n\n \t}else{\n \t\treturn response()->json([\n \t\t\t'status' => 'faild'\n \t\t], 400);\n \t}\n\n }",
"public function get_book();",
"public function booking()\n {\n return $this->hasMany(Booking::class);\n }",
"public function booking()\n {\n return $this->hasOne('App\\Booking','id_stato_prenotazione','id_stato_prenotazione');\n }",
"public function show(int $id): object\n {\n $booking = $this->bookingRepository->findOrFail($id);\n\n return $this->sendResponse($booking->toArray(), 'Booking retrieved successfully.');\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 booking()\n {\n return $this->belongsTo(\\App\\Booking::class);\n }",
"public function getBookingByResNumber($resNumber)\n {\n\t\t/* @var $dao \\DDD\\Dao\\Booking\\Booking */\n\t\t$dao = $this->getServiceLocator()->get('dao_booking_booking');\n\t\t$result = $dao->getBookingByResNumber($resNumber);\n\n\t\treturn $result;\n\t}",
"public function bookingById($id)\n\t{\n\t\t$this->db->select('*');\n\t\t$this->db->from($this->pro->prifix.$this->pro->booking);\n\t\t$this->db->join($this->pro->prifix.$this->pro->user,$this->pro->user.\"_id=\".$this->pro->booking.\"_userId\");\n\t\t\n\t\t$this->db->where($this->pro->booking.'_id',$id);\n\t\t$this->db->limit($limit,$offset);\n\t\t$rs = $this->db->get();\n\t\t//echo $this->db->last_query();\n\t\treturn $rs->row_array();\n\t\t\n\t}",
"public function loadBookingInformation()\n {\n $this->booking = Booking::with([\n 'usedCoupon',\n 'bookingPeriods',\n 'bookingAddOns.addOn',\n 'AdhocItems',\n ])->find(json_decode($this->request->booking, true)['id']);\n }",
"public function booking()\n {\n return $this->belongsTo(Booking::class);\n }",
"function wpbs_get_booking_meta($booking_id, $meta_key = '', $single = false)\n{\n\n return wp_booking_system()->db['bookingmeta']->get($booking_id, $meta_key, $single);\n\n}",
"public function index()\n {\n return response()->json(Booking::all());\n }",
"public function getbookById($id)\n {\n return $this->bookDao->getbookById($id);\n }",
"public function get_facility_booking($booking_id) {\r\n //SELECT * FROM tbl_facility_bookings WHERE facility_booking_id = 1\r\n $this->db->select('*');\r\n $this->db->where('facility_booking_id = ' . $booking_id . ' AND facility_booking_is_deleted = 0');\r\n $result = $this->db->get('tbl_facility_bookings')->result_array();\r\n\r\n return $result;\r\n }",
"public function info($code)\n {\n $booking = Booking::with('flightFrom', 'flightBack', 'passengers')\n ->where('code', $code)->first();\n\n $booking->flightFrom->setDate($booking->date_from);\n\n if (!empty($booking->flightBack)) {\n $booking->flightBack->setDate($booking->date_back);\n }\n\n return new BookingResource($booking);\n }",
"public function index()\n {\n $user = Auth::guard('admin')->user()->name;\n $halls = Hall::where('vendor', '=', $user)->pluck('id');\n \n $bookings = Booking::where('hallid', '=', $halls)->get();\n echo $bookings;\n //return view('Admin.booking', compact('bookings'));\n }",
"public function show($id)\n {\n $booking = HbBooking::find($id);\n return response()->json($booking);\n }",
"public function booking()\n {\n return $this->hasMany('App\\Models\\Booking');\n }",
"function getBookingsByCustomerId($customerid) {\n $query = \"SELECT * FROM `bookings` WHERE CustomerId='\" . $customerid . \"'\";\n \n $result = Database::selectQuery($query);\n \n if($result == null) {\n return null;\n } else {\n return $result;\n }\n }",
"public function getBook($id) {\n // the database using eloquent to return the record with matching id in JSON with 200 as the response code.\n \n if (Book::where('id', $id)->exists()) {\n $book = Book::where('id', $id)->get()->toJson(JSON_PRETTY_PRINT);\n return response($book, 200);\n } else {\n return response()->json([\n \"message\" => \"book not found\"\n ], 404);\n }\n }",
"public function bookingByOrder($orderNo)\n\t{\n\t\t$ch = new Curl();\n\t\t\n\t\t$this->headers['Authorization'] = 'Bearer ' . $this->authToken;\n\t\t\n\t\t$data = [];\n\t\t\n\t\treturn $ch->get(GojekID::BASE_ENDPOINT . Action::bookingByOrder . '/' . $orderNo, $data, $this->headers)->getResponse();\n\t}",
"public function getBook()\n\t{\n\t\tif (cookie('staffAccount') != '') {\n\t\t\t\n\t\t\t$book = D('Book_species');\n\t\t\t$sql = \"SELECT * FROM lib_book_species as a, \n\t\t\t (SELECT COUNT(*) as number, isbn as isbn2 FROM lib_book_unique \n\t\t\t\t\twhere book_id not in(select book_id from lib_remove) GROUP BY isbn) AS b \n\t\t\t where a.isbn = b.isbn2 and number!=0 ORDER BY species_id DESC LIMIT 0,20;\";\n\t\t\t$return = $book->query($sql);\n\t\t\tif ($return) {\n\t\t\t\t$json = json_encode(array(\n\t\t\t\t\t'code' => 'success',\n\t\t\t\t\t'data' => json_encode($return)\n\t\t\t\t));\n\t\t\t\techo $json;\n\t\t\t} else {\n\t\t\t\t$json = json_encode(array(\n\t\t\t\t\t'code' => 'fail',\n\t\t\t\t\t'msg' => 'Nothing, please add book!'\n\t\t\t\t));\n\t\t\t}\n\t\t} else {\n\t\t\t$json = json_encode(array(\n\t\t\t\t'code' => 'fail',\n\t\t\t\t'msg' => 'Please Login!'\n\t\t\t));\n\t\t\techo $json;\n\t\t}\n\t}",
"function if_user_has_booking($user_id){\n global $db;\n $sql = \"SELECT * FROM booking WHERE user_id = '$user_id';\";\n $result = $db->query($sql);\n return $result;\n}",
"public function booking()\n {\n //dd('tets');\n return view('booking');\n }",
"public function GetBookings()\n\t{\t$bookings = array();\n\t\t$sql = 'SELECT * FROM coursebookings WHERE ticket=' . $this->id;\n\t\tif ($result = $this->db->Query($sql))\n\t\t{\twhile ($row = $this->db->FetchArray($result))\n\t\t\t{\t$bookings[$row['id']] = $row;\n\t\t\t}\n\t\t}\n\t\treturn $bookings;\n\t}",
"function getBookings(){\r\n\t\t$inx = 0;\r\n\t\t$arrbook = array();\r\n\t\t$conn = getConnection();\r\n //These are the specific fields\r\n $stmt = $conn->prepare(\"SELECT B.idreservations, B.rs_checkin, B.rs_checkout, G.gs_name FROM booking B, guests G where G.reservations_idreservations = B.idreservations\");\r\n \r\n $stmt->execute();\r\n\r\n $result = $stmt->get_result();\r\n\r\n if($result->num_rows > 0){\r\n \twhile($row = $result->fetch_assoc()){\r\n \t\t$arrbook[$inx][0] = $row['rs_checkin'];\r\n \t\t$arrbook[$inx][1] = $row['gs_name'];\r\n \t\t$arrbook[$inx][2] = $row['rs_checkout'];\r\n $arrbook[$inx][3] = $row['idreservations'];\r\n $inx++;\r\n \t}\r\n }\r\n $conn->close(); \r\n\r\n return $arrbook;\r\n\t}",
"public function read(){ \n $data = Booking::all();\n return $this-> responseHasil(200,true,$data);\n }",
"public function getBorrowings();",
"public function getBookingByUserId(int $userId)\n {\n $booking = $this->bookingService->getBookingByUserId($userId);\n if (!$booking) {\n return response()->json([\n 'message'=> 'Server error while get booking by user id',\n ], 500);\n }\n return response()->json(['booking' => $booking], 200);\n }",
"public function get_book()\n {\n $sql = DB::select('select * from books');\n return $sql;\n }",
"public function show(int $id)\n {\n $booking = $this->bookingService->getBookingById($id);\n if (!$booking) {\n return response()->json([\n 'message'=> 'Server error while get booking ',\n ], 500);\n }\n\n return response()->json(['booking' => $booking], 200);\n }",
"public function getBookings()\n {\n return $this->hasMany(Booking::className(), ['id_sotrudnik' => 'id_sotrudnik']);\n }",
"public function getTodayBookingList()\n {\n return DB::table('bookings')\n ->leftJoin('users', 'users.id', '=', 'bookings.user_id')\n ->leftJoin('rooms', 'rooms.id', '=', 'bookings.room_id')\n ->whereBetween('booking_time', [\n date('Y-m-d 00:00:01'),\n date('Y-m-d 23:59:59')\n ])\n ->select(\n 'bookings.booking_time', 'bookings.total_person', 'bookings.noted',\n 'users.id as user_id', 'users.email', 'rooms.room_name'\n )\n ->get()\n ->toArray();\n }",
"public function getReserv()\r\n {\r\n $query = \"SELECT * FROM list_reservation\";\r\n $stmt = $this->connexion()->prepare($query);\r\n $stmt->execute();\r\n\r\n while ($result = $stmt->fetchAll()) {\r\n return $result;\r\n }\r\n }",
"function fetchOrderByBookingId(String $bookingId): Order\n\t{\n\t\t$sql = \"SELECT o.booking_id,o.journey_id,o.booking_time,o.email, o.amount, r.route_name, o.order_status, j.departure_date, j.departure_time, j.vehicle_reg,j.route_id, j.driver_id, j.conductor_id, b.color,b.model,b.coach,b.no_of_seats,r.start_point, r.end_point, r.distance,r.duration, j.driver_name,j.conductor_name,b.imgurl,b.normal_seats,b.vip_seats FROM booking as o, journey as j, route as r, bus as b WHERE o.booking_id = '$bookingId' AND j.journey_id = o.journey_id AND j.route_id = r.route_id AND j.vehicle_reg = b.registration AND j.route_id = r.route_id\";\n\n\t\t$result = $this->conn->query($sql);\n\t\tif ($result->num_rows > 0) {\n\t\t\twhile ($row = $result->fetch_assoc()) {\n\t\t\t\t$order = new Order($row['booking_id'], $row['journey_id'], $row['booking_time'], $row['email'],\n\t\t\t\t\t$row['amount'], $row['route_name'], $row['order_status'],$row['departure_date'],\n\t\t\t\t\t$row['departure_time'],$row['vehicle_reg'],$row['route_id'],$row['driver_id'],$row['conductor_id'],\n\t\t\t\t\t$row['color'],$row['model'],$row['coach'],$row['no_of_seats'],$row['start_point'],$row['end_point'],\n\t\t\t\t\t$row['distance'],$row['duration'],$row['driver_name'],$row['conductor_name'],$row['imgurl'],$row['normal_seats'],$row['vip_seats']\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn $order;\n\t\t} else {\n\t\t\treturn [];\n\t\t}\n\t}",
"public function getBookById($id) {\n\t\t$book = null;\n\n foreach ($this->db-> query(\"SELECT * FROM book WHERE id=$id\") as $row){\n \n $book = new Book($row['title'], $row['author'], $row['description'], $row['id']);\n }\n\n return $book;\n }",
"public function bookingList()\n {\n $user = User::find(Auth::user()->id);\n return view('booking.booking_list', compact('user'));\n }",
"function EM_Booking( $booking_data = false ){\r\n\t\tif( $booking_data !== false ){\r\n\t\t\t//Load booking data\r\n\t\t\t$booking = array();\r\n\t\t\tif( is_array($booking_data) ){\r\n\t\t\t\t$booking = $booking_data;\r\n\t\t\t\t//Also create a person out of this...\r\n\t\t\t \t$this->person = new EM_Person($booking_data);\r\n\t\t\t}elseif( $booking_data > 0 ){\r\n\t\t\t\t//Retreiving from the database\t\t\r\n\t\t\t\tglobal $wpdb;\t\t\t\r\n\t\t\t\t$sql = \"SELECT * FROM \". $wpdb->prefix . EM_BOOKINGS_TABLE .\" WHERE booking_id ='$booking_data'\"; \r\n\t\t\t \t$booking = $wpdb->get_row($sql, ARRAY_A);\r\n\t\t\t \t//Get the person for this booking\r\n\t\t\t \t$this->person = new EM_Person($booking['person_id']);\r\n\t\t\t}\r\n\t\t\t//Save into the object\r\n\t\t\t$this->to_object($booking);\r\n\t\t}\r\n\t}",
"public function show($id)\n {\n //\n $direct_booking = DirectBooking::where('id', $id)->first();\n if ($direct_booking !== null) {\n \n $response = [\n 'success' => true,\n 'message' => 'Booking successfully found!!',\n 'data' => $direct_booking,\n ];\n return response()->json($response, 200);\n } else {\n return response()->json(\n [\n 'success'=> false,\n 'message' => 'Booking not found',\n ],\n 500);\n }\n }",
"public function show(BookingRoom $bookingRoom,$bookingID)\n {\n //\n \n \n $bookingStatus=BookingRoom::where('order_id',$bookingID)->get();\n // $bookingStatus=BookingRoom::where('username',$username)->get();\n if(empty($bookingStatus[0])){\n return response(['message'=>'Invalid Booking ID !No Record found'],404);\n }\n return response(['Booking Status'=>$bookingStatus,'message'=>'Data Retreived Successfully','total'=>count($bookingStatus)],200);\n\n }",
"public function booking()\n {\n $booking_active = true;\n $branchs = $this->branch_services->all('asc');\n $type_services = $this->type_services->all('asc');\n\n return view('client.booking', compact('branchs', 'type_services', 'booking_active'));\n }",
"public static function getBookingByHotelAndStatus($hotel, $status) {\n \t$table = new Booking();\n \t$where = $table->select()->where(\"from_hotel=\".$hotel->id.\" OR to_hotel=\".$hotel->id);\n \tif (!empty($status)) {\n \t\t$where = $where->where(\"status IN (?)\", $status);\n \t}\n \t$where = $where->order(\"created DESC\");\n \treturn $table->fetchAll($where);\n }",
"public function getBooking($locata) \n {\n // detalles reserva en nuestra base de datos\n $reserva = $this->reservas->where('locata',$locata)->first();\n \n try {\n // detalles reserva en Sidetours\n $xml = new XmlConector();\n $xml->servicio = \"502\";\n $param = '<PARAMETERS locata=\"'.$locata.'\" language=\"2\" />';\n $xml->parametros = $param;\n $booking = new XmlParser($xml->getString());\n $fecha = $this->spanishDate(); \n if ($booking->hasError()){\n return view('hotel.view_booking_error',compact('booking'));\n } else {\n // detalles hotel\n foreach($booking->getNodes(\"RESERVATION\",false) as $b){\n $hotelId = $b['building_id'];\n }\n $xml->servicio = \"200\";\n $param = '<PARAMETERS language=\"2\" building_id=\"'.$hotelId.'\"></PARAMETERS>'; \n //dd($param);\n $xml->parametros = $param;\n //dd($xml->parametros);\n $hotel = new XmlParser($xml->getString());\n return view('hotel.view_booking',compact('booking','hotel','reserva','locata','fecha'));\n }\n }\n catch(Exception $e) {\n $bookingError = $e->getMessage();\n return false;\n }\n }",
"function getBuildingInfo() {\n return getOne(\"SELECT * FROM building WHERE id = ?\",[getLogin()['bid']]);\n}",
"public function get($boletoID);",
"function RezervationDetail($id){\n global $db;\n $sql=(\"SELECT * FROM `p149pm_roombook` where id=:rezID\");\n $SqlStmt = $db->prepare($sql);\n $SqlStmt->bindParam(':rezID', $id, PDO::PARAM_INT);\n try\n { \n $SqlStmt->execute(); \n } \n catch (PDOException $e) \n { \n die(); \n }\n $row = $SqlStmt->fetch(PDO::FETCH_ASSOC);\n if ($SqlStmt->rowCount() > 0) \n { \n return $row; \n }\n}",
"public function show(Booking $booking)\n {\n return response()->json([\n 'data' => $booking->load(['bookingContainers', 'bookingGoods'])\n ]);\n }",
"public function booking()\n {\n return view('templates.them8.booking');\n }",
"public function getBookings()\n {\n return $this->hasMany(Booking::className(), ['id_complaints' => 'id_complaint']);\n }",
"public function findAppointmentSlot($slotdetailid,$bookdate){\r\n $appointment = new UserAppoinment();\r\n $findSlotBook = $appointment->findSlotBooking($slotdetailid,$bookdate);\r\n return $findSlotBook;\r\n \r\n }",
"public function booking(Request $request)\n {\n $antrianDrivers = AntrianDriver::with(\"Booking\")->where(\"driver_iddriver\", $request->iddriver)->where(\"antriandriver_status\", \"accepted\")->where(\"antriandriver_status_baca\", \"belum\")->get();\n\n $response = array();\n foreach ($antrianDrivers as $antriandriver) {\n if($antriandriver['booking'] != null){\n array_push($response, $antriandriver);\n }\n }\n\n if(empty($response)){\n return response()->json(null);\n }\n return response()->json($response);\n }",
"function Buildings_get() {\n\n $model = M('Buildings');\n if ($id = $this->_get('id')) {\n $data = $model->find($id);\n if ($data) {\n $this->response($data);\n } else {\n //NOT FOUND\n $this->response(NULL, NULL, 404);\n }\n }\n else if($name=$this->_get('name')){\n $data = $model->where(array(\"name\"=>$name))->select();\n if($data){\n $this->response($data);\n }else{\n $this->response(NULL,NULL,404);\n }\n }\n else {\n $data = $model->select();\n $this->response($data);\n }\n }",
"public static function forApartment($apartment_id) {\n\t\t\t\n\t\t\treturn Booking::where('apartment_id', $apartment_id)->get();\n\t\t}",
"public function addBooking($booking){\n \n }",
"function getBookingByMonth()\n {\n $query = $this->db->select('BK_Year,BK_Month,BK_Day')\n ->get('booking');\n return $query->result();\n }",
"public function readOne ()\n {\n $query = \"SELECT\n book_id,type_id,name,isbn,publisher,author,price\n FROM\n \" . $this->table_name . \"\n WHERE\n book_id = $this->book_id\";\n\n $stmt = $this->conn->prepare( $query );\n\n $stmt->execute();\n\n\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\n\n $this->book_id = $row['book_id'];\n $this->type_id = $row['type_id'];\n $this->name = $row['name'];\n $this->isbn = $row['isbn'];\n $this->publisher=$row['publisher'];\n $this->author=$row['author'];\n $this->price=$row['price'];\n\n\n }",
"public function getbooking_detail($status=''){\n \t\t $this->db->select('*');\n\t\t\t$this->db->from(PAYMENT);\n\t\t\tif($status!='') {\n\t\t\t$this->db->where(PAYMENT.'.payment_type',$status);\n\t\t\t}\n\t\t\t$query = $this->db->get();\t\t\t\n\t\t\t$resultContent = $query->result_array();\n\t\t\treturn $resultContent;\t\n }",
"private function get()\n {\n $db = 'Ernio\\\\Bankas\\\\' . $this->settings;\n return $db::get();\n }",
"protected function doGet()\n {\n $apptId = intval($_GET['id']);\n try {\n $apptDetailBO = new AppointmentDetailBO();\n $this->appointmentDetail = $apptDetailBO->getAppointmentDetails($apptId);\n } catch (NoDataFoundException $e) {\n parent::setAlertErrorMessage($e->getMessage());\n }\n\n parent::doGet();\n\n }",
"public function findAppointmentQueue($slotid,$bookdate){\r\n $appointment = new UserAppoinment();\r\n $findQueueBook = $appointment->findQueueBooking($slotid,$bookdate);\r\n return $findQueueBook;\r\n \r\n }",
"function get_chamber_business(){\r\n $sql = $this->db->prepare(\"SELECT businessID, businessname FROM BUSINESS WHERE chamberID = :chamberid;\");\r\n\r\n $result = $sql->execute(array(\r\n \"chamberid\" => $_SESSION['chamber'],\r\n ));\r\n\r\n if ($result)\r\n return $sql->fetchAll(PDO::FETCH_ASSOC);\r\n else\r\n return false;\r\n }",
"public function viewBooking($id)\n\t{\n\t\t// Checks for are you the traveller of this booking??? otherwise 403 MF. \n\t\t$booking = Booking::find($id);\n\t\t\n\t\t$listing = Listing::where('id', '=', $booking->listing_id)\t\t\t\n\t\t\t->leftJoin(DB::raw(\"(select traveller_photo as host_url, name as host_name, host_description, id as host_id\n\t\t\t\t\t\t\tfrom `users`) as `host`\"), 'host.host_id', '=', 'listings.user_id')\n\t\t\t->leftJoin(DB::raw(\"(select id as address_id, city, state, lat, lng\n\t\t\t\t\t\t\tfrom `listing_addresses`) as `address`\"), 'address.address_id', '=', 'listings.id')\n\t\t\t->first();\n\t\t$listing->rating = $listing->getRating();\n\t\t$listing->reviews = $listing->getTotalReviews();\n\t\t\n\t\t$listing->nearby_attractions = json_decode($listing->nearby_attractions);\n\t\t$listing->nearby_conveniences = json_decode($listing->nearby_conveniences);\n\t\t\n\t\t\n\t\t// Listing Images\n\t\t$listing->images = ListingImages::where('listing_id', '=', $booking->listing_id)\n\t\t\t->orderBy('primary')\n\t\t\t->get();\n\t\t\n\t\t$amenities = Amenities::all();\n\t\t$listing->amenities = json_decode($listing->amenities);\n\t\t\n\t\tif(isset($listing->amenities)){\n\t\t\tforeach($amenities as $amenity){\n\t\t\t\tif(in_array($amenity->id, $listing->amenities)){\n\t\t\t\t\t$amenity->active = \"yes\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(isset(Auth::user()->id)){\n\t\t\t$listing->favorite = Favorite::where('listing_id', '=', $booking->listing_id)\n\t\t\t\t\t\t\t->where('user_id', '=', Auth::user()->id)\n\t\t\t\t\t\t\t->first();\n\t\t}\n\t\t\n\t\t// Grab the listing owner's other listings\n\t\t$other_listings = Listing::where('user_id', '=', $listing->user_id)\n\t\t\t ->where('id', '!=', $listing->id)\n\t\t\t ->leftJoin(DB::raw(\"(select city, state, id as listing_id \n\t\t\t\t\t\t\tfrom `listing_addresses` ) as `list_address`\"), 'list_address.listing_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->limit('3')\n\t\t\t->getPublished();\n\t\t\n\t\t$reviews = Review::where('listing_id', '=', $listing->id)\n\t\t\t->leftJoin('users', 'users.id', '=', 'reviews.user_id')\n\t\t\t->get();\n\t\t\n\t\treturn view('dashboard.traveller.booking')\n\t\t\t->with('listing', $listing)\n\t\t\t->with('amenities', $amenities)\n\t\t\t->with('other_listings', $other_listings)\n\t\t\t->with('reviews', $reviews)\n\t\t\t->with('booking', $booking);\n\t}",
"public function bookingitem()\n {\n $adminId=Session::get('admin')['id'];\n return booking::where('admin_id',$adminId)->count();\n }",
"public function getBookingsByDate(Request $request)\n {\n $booking_obj = new Booking();\n return $booking_obj->getFutureBookingsByServiceAndDate($request->sv_id, $request->start, $request->end);\n }",
"public function show($id)\n {\n $booking = Booking::find($id);\n //obj \n return view('bookings.detail',compact('booking'));\n \n }",
"function viewBookings() {\n try {\n $databaseConnection = new PDO( DB_NAME, DB_USERNAME, DB_PASSWORD ); //Creates database connection\n $databaseConnection->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\n } \n catch ( PDOException $e ) {\n echo \"Connection failed: \" . $e->getMessage();\n }\n\n $date = $_POST[\"year\"] . \"-\" . $_POST[\"month\"] . \"-\" . $_POST[\"day\"] . \" \" . \"0\" . \":0:0\"; //Converts the date to a mySQL friendly format \n $date = strtotime($date);\n $maxDate = $date + DAY;\n $date = gmdate(\"Y-m-d H:i:s\", $date);\n $maxDate = gmdate(\"Y-m-d H:i:s\", $maxDate);\n $sql = \"SELECT * FROM `bookings` WHERE `time` >= :date AND `time` < :maxDate ORDER BY `time` AND `room`\"; //Selects all bookings for the inputed time\n try {\n $connection = $databaseConnection->prepare( $sql );\n $connection-> bindValue( \":date\", $date, PDO::PARAM_STR );\n $connection-> bindValue( \":maxDate\", $maxDate, PDO::PARAM_STR );\n $connection-> execute();\n $queryResult = $connection->fetchAll();\n $databaseConnection = \"\"; //closes connection\n }\n catch (PDOException $e) {\n $databaseConnection = \"\"; //closes connection\n die ( \"Invalid query: \" . $e->getMessage() );\n }\n \n echo \"<h1>Bookings for \" . $_POST[\"day\"] . \"/\" . $_POST[\"month\"] . \"/\" . $_POST[\"year\"] . \"</h1>\";\n if($queryResult) { //Checks that the query returned data\n echo \"<table><tr><th>Time</th><th>Room Number</th><th>Name</th><th>purpose</th></tr>\"; //table header\n foreach ( $queryResult as $row ) {\n echo \"<tr><td>\" . $row[\"time\"] . \"</td><td>\" . $row[\"room\"] . \"</td><td>\" . User::getUsersName($row[\"user\"]) . \"</td><td>\" . $row[\"purpose\"] . \"</td></tr>\";\n } \n echo \"</table>\";\n }\n else {\n echo \"There are no bookings for that time.\";\n }\n}",
"function wpbs_get_booking_by_hash($hash)\n {\n $bookings = wpbs_get_bookings(array('invoice_hash' => $hash));\n\n if (empty($bookings)) {\n return false;\n }\n\n $booking = array_shift($bookings);\n\n return $booking;\n }",
"public function index()\n {\n return BookResource::collection(Book::orderByDesc(\"id\")->get());\n }",
"public function getBook($title) \n {\n // in a real life scenario this will be done through a db select command \n $allBooks = $this->getBookList(); \n return $allBooks[$title]; \n }",
"function getAllBookings($userID){\n $query = $this->db->query(\"SELECT bookings.*,buildings.name as buildingName, buildings.id as buildingID ,rooms.name as roomName,rooms.floorNumber , rooms.type from bookings join rooms on rooms.roomId = bookings.roomID join buildings on buildings.id = rooms.buildingId where userID = $userID\");\n\n if($query->num_rows()>0)\n {\n $response['status'] = 'success';\n $response['data']=$this->getParticipantsForMeetings($query->result_array());\n }\n else\n {\n $response['status'] = 'failure';\n $response['code'] = 'database failure';\n\n }\n return $response;\n }",
"public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }",
"function afficherreservation(){\n\t\t$sql=\"SElECT * From reservation\";\n\t\t$db = config::getConnexion();\n\t\ttry{\n\t\t$liste=$db->query($sql);\n\t\treturn $liste;\n\t\t}\n catch (Exception $e){\n die('Erreur: '.$e->getMessage());\n }\t\n\t}",
"public function actionBooking($id)\n {\n $length = rand(1,1);\n $chars = array_merge(range(5,9));\n shuffle($chars);\n $number = implode(array_slice($chars, 0,$length));\n \n $query = new Query;\n $query ->select(['ars_accommodation.id','ars_accommodation.acc_bathroom','ars_accommodation.acc_price','ars_accommodation.acc_noRoom','ars_accommodation.acc_description','ars_accommodation.acc_title','ars_accommodation.acc_preference','ars_accommodation.acc_address','ars_accommodation.acc_image', 'ars_user.user_name','ars_user.user_phone','ars_accommodation.acc_lat','ars_accommodation.acc_long']) \n ->from('ars_accommodation')\n ->leftJoin('ars_user', 'ars_user.id = ars_accommodation.user_id')\n ->where(['ars_accommodation.id'=>$id]);\n $model2 = ArsAccommodation::find()\n ->where(['acc_status'=>'Publish'])\n ->limit($number)\n ->all();\n\n $command = $query->createCommand();\n $model = $command->queryAll();\n\n return $this->render('booking', [\n 'model' => $model,\n 'model2'=>$model2,\n ]);\n }",
"public function myBooking()\n {\n $loginUser = Auth::user();\n\n $bookingService = BookingService::select('BookingService.*','TourProduct.adultPrice','TourProduct.childPrice','TourProduct.tourTitle')\n ->join('TourProduct','BookingService.tourCode','=','TourProduct.tourCode')\n ->join('UserAccount','BookingService.uIdx','=','UserAccount.uIdx')\n ->where('BookingService.uIdx', '=', $loginUser->uIdx)\n ->orderBy('tourDate', 'desc')\n ->paginate(10);\n\n return view('mypage.myBooking', ['bookingService' => $bookingService]);\n }"
] | [
"0.68165016",
"0.6689585",
"0.6688761",
"0.6624235",
"0.6612698",
"0.6609452",
"0.66028154",
"0.65940285",
"0.6566788",
"0.6486003",
"0.6486003",
"0.6486003",
"0.6486003",
"0.6486003",
"0.64596516",
"0.6439326",
"0.6397243",
"0.63886625",
"0.6357851",
"0.6353273",
"0.6336224",
"0.6273386",
"0.62727714",
"0.625792",
"0.62461805",
"0.62342614",
"0.62288964",
"0.62120295",
"0.620416",
"0.6184843",
"0.61720824",
"0.61507577",
"0.61314607",
"0.6105443",
"0.60909796",
"0.60685796",
"0.6067967",
"0.6055416",
"0.6010703",
"0.59802294",
"0.59772223",
"0.5954585",
"0.5934293",
"0.59250575",
"0.59239393",
"0.59131455",
"0.5908484",
"0.59069276",
"0.5878397",
"0.5864537",
"0.5858544",
"0.5833353",
"0.58309364",
"0.58267134",
"0.58114237",
"0.58070517",
"0.5793687",
"0.5785126",
"0.5779168",
"0.5777174",
"0.5767249",
"0.5758447",
"0.5757372",
"0.57446176",
"0.5738316",
"0.57297915",
"0.5704217",
"0.5688088",
"0.5688051",
"0.5685911",
"0.5668282",
"0.5664918",
"0.5661107",
"0.56508243",
"0.5627064",
"0.56261617",
"0.56222785",
"0.5618828",
"0.5599887",
"0.5594054",
"0.55889475",
"0.5580977",
"0.5578743",
"0.5567057",
"0.5563257",
"0.5561261",
"0.55597794",
"0.55542254",
"0.5553926",
"0.5549131",
"0.5545799",
"0.5545426",
"0.5526933",
"0.5520117",
"0.5515597",
"0.55098647",
"0.5504337",
"0.5488776",
"0.5487151",
"0.5484821"
] | 0.7391453 | 0 |
Inserts a new booking into the database | function wpbs_insert_booking($data)
{
return wp_booking_system()->db['bookings']->insert($data);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function addBooking()\r\n {\r\n $loggedin = isset($_SESSION['user']);\r\n if(! $loggedin)\r\n {\r\n return redirect('');\r\n }\r\n $user = $_SESSION['user']->account_no;\r\n\r\n $showtime = $_POST['showtime'];\r\n $num_seats = $_POST['num_seats'];\r\n\r\n App::get('database')->insert('booking', compact('user', 'showtime', \"num_seats\"));\r\n\r\n redirect('');\r\n }",
"public function addBooking() {\n // get data\n $this->getdata();\n \n // validate data\n if (!isset($this->data['cnp']) || empty($this->data['cnp'])) {\n exit('Please provide a CNP');\n } elseif(!$this->userExists()) {\n exit('No user found with provided CNP');\n } elseif(!$this->isClient()) {\n exit('Incorrect user role');\n }\n if (!isset($this->data['program']) || empty($this->data['program'])) {\n exit('Please provide a program');\n } elseif (!$this->programExists($this->data['program'])) {\n exit('Program does not exist');\n } else {\n // check if program is not due\n $program = $this->getProgram($this->data['program']);\n if (strtotime($program->start_date) <= time()) {\n exit('Program is due');\n }\n // check if date range is available, seats not taken and not already booked\n if (!$this->isBooked() && $this->isAvailable($program) && $this->hasSeats($program)) {\n // insert booking to database\n $statement = 'INSERT INTO booking (user_id, program_id) VALUES (:user_id, :program_id);';\n try {\n $statement = $this->db->prepare($statement);\n $statement->execute(array(\n 'user_id' => $this->getUser($this->data['cnp']),\n 'program_id' => $this->data['program']\n ));\n echo 'Succesfully added booking';\n } catch (\\PDOException $e) {\n exit($e->getMessage());\n } \n }\n }\n }",
"function insertNewBooking($bookingnum, $custid, $pkgId) {\n $query = \"INSERT INTO `bookings` (BookingDate, BookingNo, TravelerCount, CustomerId, PackageId) VALUES ('\".date(\"Y-m-d H:i:s\").\"', '$bookingnum', '1', '$custid', '$pkgId')\";\n $result = Database::insertQuery($query); \n if ($result) {\n return true;\n } else {\n return false;\n }\n }",
"public function saveBooking() {\n $connection = Yii::app()->db;\n $loginUserID = Yii::app()->user->id;\n $transaction = $connection->beginTransaction();\n try {\n $created_date = date('Y-m-d H:i:s');\n $sql = \"INSERT INTO `booking` (\n `yatrik_name`,\n `address`,\n `city`,\n `pincode`,\n `mobile_no`,\n `email`,\n `arrival_date`,\n `departure_date`,\n `receipt_no`,\n `deposit_amount`,\n `actual_amount`,\n `notes`,\n `created_date`,\n `created_by`,\n `updated_date`,\n `updated_by`\n )\n VALUES\n (\n :yatrik_name,\n :address,\n :city,\n :pincode,\n :mobile_no,\n :email,\n :arrival_date,\n :departure_date,\n :receipt_no,\n :deposit_amount,\n :actual_amount,\n :notes,\n :created_date,\n :created_by,\n :updated_date,\n :updated_by\n )\";\n $command = $connection->createCommand($sql);\n $command->bindParam(\":yatrik_name\", $this->yatrik_name, PDO::PARAM_STR);\n $command->bindParam(':address', $this->address, PDO::PARAM_STR);\n $command->bindParam(':city', $this->city, PDO::PARAM_STR);\n $command->bindParam(':pincode', $this->pincode, PDO::PARAM_INT);\n $command->bindParam(':mobile_no', $this->mobile_no, PDO::PARAM_INT);\n $command->bindParam(':email', $this->email, PDO::PARAM_STR);\n $command->bindParam(':arrival_date', $this->arrival_date, PDO::PARAM_STR);\n $command->bindParam(':departure_date', $this->departure_date, PDO::PARAM_STR);\n $command->bindParam(':receipt_no', $this->receipt_no, PDO::PARAM_STR);\n $command->bindParam(':deposit_amount', $this->deposit_amount, PDO::PARAM_INT);\n $command->bindParam(':actual_amount', $this->actual_amount, PDO::PARAM_INT);\n $command->bindParam(':notes', $this->notes, PDO::PARAM_STR);\n $command->bindParam(':created_date', $created_date, PDO::PARAM_STR);\n $command->bindParam(':created_by', $loginUserID, PDO::PARAM_INT);\n $command->bindParam(':updated_date', $created_date, PDO::PARAM_STR);\n $command->bindParam(':updated_by', $loginUserID, PDO::PARAM_INT);\n $command->execute();\n\n $booking_id = $connection->getLastInsertID();\n $this->id = $booking_id;\n\n $sql = \"INSERT INTO `booking_details` (\n `booking_id`,\n `room_id`,\n `number_count`,\n `room_price`\n )\n VALUES\n (\n :booking_id,\n :room_id,\n :number_count,\n :room_price\n )\";\n $command = $connection->createCommand($sql);\n\n foreach ($this->rooms as $key => $room) {\n $roomObj = Rooms::model()->findByPk($room);\n $command->bindValues(array(\n 'booking_id' => $booking_id,\n 'room_id' => $room,\n 'number_count' => $this->noOfRooms[$key],\n 'room_price' => $roomObj->room_price\n ));\n $command->execute();\n }\n $transaction->commit();\n\n $this->sendMail();\n\n Yii::app()->user->setFlash('success', \"Booking is successfully done.\");\n return $booking_id;\n } catch (Exception $e) // an exception is raised if a query fails\n {\n $transaction->rollback();\n return false;\n }\n }",
"public function addBooking($booking){\n \n }",
"protected function insert()\n\t{\n\t\t$query = $this->connection->prepare\n\t\t(\"\n\t\t\tinsert into\n\t\t\t\tBooth (BoothNum)\n\t\t\t\tvalues (?)\n\t\t\");\n\n\t\t$query->execute(array_values($this->fields));\n\n\t}",
"public function insertAction()\r\n\t{\r\n\t\tif ($this->request->getPost('submit')) {\r\n\t\t\t$name = $this->request->getPost('name');\r\n\t\t\t$phone = $this->request->getPost('phone');\r\n\t\t\t$arrPost = array('name' => $name, 'phone' => $phone);\r\n\t\t\t$room = new Room();\r\n\t\t\tif ($room->save($arrPost)) {\r\n\t\t\t\t$this->response->redirect(\"/users/index\", true);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}",
"public function createBooking(array $data);",
"public function store() {\n try {\n $this->booking->create(Input::all());\n Notification::success( trans('app.booking_added') );\n return langRedirectRoute('admin.booking.index');\n } catch (ValidationException $e) {\n return langRedirectRoute('admin.booking.create')->withInput()->withErrors($e->getErrors());\n }\n }",
"public function insert($calendario);",
"function createAppointment(){\n\t\t\t$query = \"INSERT INTO appointment set appTime=?, custId=?\";\n\t\t\t$stmt = $this->conn->prepare($query);\n\t\t\t// $stmt->bindparam(1, $this->serviceType);\n\t\t\t// $stmt->bindparam(2, $this->serviceName);\n\t\t\t// $stmt->bindparam(3, $this->appDate);\n\t\t\t$stmt->bindparam(1, $this->appTime);\n\t\t\t$stmt->bindparam(2, $_SESSION['username']);\n\n\t\t\tif($stmt->execute()){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}",
"function save(){\r\n\t\tglobal $wpdb;\r\n\t\t$table = $wpdb->prefix.EM_BOOKINGS_TABLE;\r\n\t\t//First the person\r\n\t\t//Does this person exist?\r\n\t\t$person_result = $this->person->save();\r\n\t\tif( $person_result === false ){\r\n\t\t\t$this->errors = array_merge($this->errors, $this->person->errors);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t$this->person_id = $this->person->id;\r\n\t\t\r\n\t\t//Now we save the booking\r\n\t\t$data = $this->to_array();\r\n\t\tif($this->id != ''){\r\n\t\t\t$where = array( 'booking_id' => $this->id ); \r\n\t\t\t$result = $wpdb->update($table, $data, $where, $this->get_types($data));\r\n\t\t}else{\r\n\t\t\t$result = $wpdb->insert($table, $data, $this->get_types($data));\r\n\t\t $this->id = $wpdb->insert_id; \r\n\t\t}\r\n\t\tif( $result === false ){\r\n\t\t\t$this->errors[] = __('There was a problem saving the booking.', 'dbem'); \r\n\t\t}\r\n\t\t\r\n\t\tglobal $current_booking_id ; \r\n\t\t$current_booking_id = $this->id ;\r\n\t\t\r\n\t\t//Give feedback on result\r\n\t\tif( count($this->errors) == 0 ){\r\n\t\t\t//Success\r\n\t\t\t$this->feedback_message = __('Your booking has been recorded','dbem');\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\t\t\r\n\t\treturn true;\r\n\t}",
"public function criar()\n {\n\n $data = array(\n 'titulo' => $this->input->post('book_titulo'),\n 'autor' => $this->input->post('book_autor')\n );\n\n // $this->db->query($sql, $data);\n\n $this->db->insert('books', $data);\n }",
"public function insert($roomId, $userId, $checkInDate, $checkOutDate) \n {\n $this->getPdo()->beginTransaction();\n\n //Step 2, get room info \n $parameters = [\n ':room_id' => $roomId,\n ];\n $roomInfo = $this->fetch('SELECT * FROM room WHERE room_id = :room_id', $parameters);\n \n $price = $roomInfo['price'];\n\n // Step 3, Calculate final price (from dates)\n $checkInDateTime = new DateTime($checkInDate);\n $checkOutDateTime = new DateTime($checkOutDate);\n $daysDiff = $checkOutDateTime->diff($checkInDateTime)->days;\n $totalPrice = $price * $daysDiff;\n\n // Step 4, Book room \n $parameters = [\n ':room_id' => $roomId,\n ':user_id' => $userId,\n ':total_price' => $totalPrice,\n ':check_in_date' => $checkInDate,\n ':check_out_date' => $checkOutDate,\n ];\n \n $this->execute('INSERT INTO booking (room_id, user_id, total_price, check_in_date, check_out_date) \n VALUES (:room_id, :user_id, :total_price, :check_in_date, :check_out_date)', $parameters);\n \n // Step 5, commit \n return $this->getPdo()->commit();\n }",
"public function addBooking($data)\n\t{\n\t\t$this->db->insert($this->pro->prifix.$this->pro->booking,$data);\n\t\treturn $this->db->insert_id();\n\t\t\n\t}",
"public function store(BookingStoreRequest $request)\n {\n $start_time = Booking::nextAvailable($request->start_time, $request->service_id);\n \n if ($request->start_time != $start_time) {\n return back()->withErrors('The booking time you choosen is not available. Next available is ' . $start_time);\n }\n \n $end_time = Booking::ends($start_time, $request->service_id);\n \n $parameters = [\n 'car_id' => $request->car_id,\n 'service_id' => $request->service_id,\n 'start_time' => $start_time,\n 'end_time' => $end_time,\n 'note' => $request->note\n ];\n\n if($request->bookWithRegister) {\n DB::beginTransaction();\n \n $user = (new UserService())\n ->make($request->validated());\n $car = $user->cars()->save(\n new Car($request->validated())\n );\n $car->bookings()->save(\n new Booking($parameters)\n );\n \n DB::commit();\n session()->flash('message', 'You created new user and car and made a booking for him');\n } else {\n $this->service->make($parameters);\n \n session()->flash('message', 'You made a booking for existing user');\n }\n\n return redirect('/bookings');\n }",
"public function store()\n\t{\n\t\t$validator = Validator::make($data = Input::all(), Booking::$rules, Booking::$messages);\n\n\t\tif ($validator->fails())\n\t\t{\n\t\t\treturn Redirect::back()->withErrors($validator)->withInput();\n\t\t}\n\n\t\t$client = Client::findOrFail(Input::get('client_id'));\n\t\t$car = Car::findOrFail(Input::get('car_id'));\n\n\t\t$booking = new Booking;\n\n\t\t$booking->client()->associate($client);\n\t\t$booking->car()->associate($car);\n\t\t$booking->date = date('Y-m-d');\n\t\t$booking->destination = Input::get('destination');\n\t\t/*$booking->distance = Input::get('distance');*/\n\t\t$booking->date_out = Input::get('date_out');\n\t\t$booking->date_back = Input::get('date_back');\n\t\t$booking->branch = Input::get('branch');\n\t\t$booking->status = 'active';\n\n\t\t$booking->save();\n\n\n\t\t$car->status = 'booked';\n\t\t$car->update();\n\t\treturn Redirect::route('bookings.index');\n\n\t}",
"function insert() {\n\t\t$sql = \"INSERT INTO lessons\n\t\t\t\tVALUES (?, ?, ?, ?, ?)\";\n\t\t\n\t\t$this->db->query($sql, array($this->lessons_id, $this->name, $this->date, $this->active, $this->rank));\n\t\t$this->last_insert_id = $this->db->insert_id();\t\t\n\t\t\n\t}",
"public function booking_save()\n\t{\n\n\t\t$validator = Validator::make(\n\t\t\tInput::all(),\n\t\t\tarray(\n\t\t\t\t'book_id' => 'bail|required',\n\n\t\t\t\t'name' => 'bail|string',\n\t\t\t\t'mail' => 'bail|required|email',\n\n\t\t\t\t'hours' => 'bail|numeric',\n\t\t\t\t'supplies' => 'bail|boolean',\n\t\t\t\t'instruction' => 'bail|string'\n\t\t\t)\n\t\t);\n\n\t\tif ($validator->passes()) {\n\n\t\t\t$client_id = 0;\n\t\t\t$book_id = typecast(Input::get('book_id'), 'string');\n\t\t\t\n\t\t\t// Timetable data\n\t\t\t$id_data = explode('_', $book_id);\n\t\t\t$timetable_id = typecast(substr($id_data[0], 1), 'int');\n\n\t\t\t// Validate slots\n\t\t\t$interval = self::valid_hour(Input::get('hours'));\n\t\t\t$timetable = GeneratorModel::get_active_timetable();\n\t\t\t$slotlist = GeneratorModel::generate_schedule($timetable, $interval);\n\t\t\t$summary = self::get_slot($book_id);\n\n\n\t\t\t$slotdata = array();\n\t\t\tforeach ($slotlist as $slot) {\n\n\t\t\t\tif ($slot['group_id'] == $book_id) {\n\n\t\t\t\t\t$slotdata = $slot;\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t\tif ($slotdata and $summary) {\n\n\t\t\t\t// Get client_id based from given email\n\t\t\t\t$email = typecast(Input::get('mail'), 'string');\n\t\t\t\t$is_valid_email = ValidatorModel::email($email, true);\n\n\t\t\t\tif (count($is_valid_email) > 1) {\n\n\t\t\t\t\t$client_id = $is_valid_email['client_id'];\n\n\t\t\t\t} else {\n\n\t\t\t\t\treturn Msg::error('Email is not available.');\n\t\t\t\t}\n\n\n\t\t\t\t// Generate encrypted payload\n\t\t\t\t$payload = Aes::payload(array(\n\t\t\t\t\t'c_id' => $client_id,\n\t\t\t\t\t's_id' => $book_id,\n\t\t\t\t\t'prc' => $slotdata['price']\n\t\t\t\t));\n\n\n\t\t\t\t// Save booking information\n\t\t\t\t$save = BookingModel::save_booking(array(\n\n\t\t\t\t\t'timetable_id' => $timetable_id,\n\n\t\t\t\t\t'client_id' => $client_id,\n\n\n\t\t\t\t\t'need_supplies' => typecast(Input::get('supplies'), 'integer'),\n\n\t\t\t\t\t'instructions' => typecast(Input::get('instruction'), 'string'),\n\n\t\t\t\t\t'schedule_start' => $slotdata['schedule_start'],\n\n\t\t\t\t\t'schedule_end' => $slotdata['schedule_end'],\n\n\t\t\t\t\t'price' => $slotdata['price'],\n\n\t\t\t\t\t'payload' => $payload,\n\n\n\t\t\t\t\t'tmp_book_id' => typecast(Input::get('book_id'), 'string'),\n\t\t\t\t\t'tmp_interval' => self::valid_hour(Input::get('hours'))\n\t\t\t\t));\n\n\t\t\t\tif (is_array($save) and isset($save['booking_id'])) {\n\t\t\t\t\t\n\t\t\t\t\t// Add booking_id on the payload\n\t\t\t\t\t$booking_id = $save['booking_id'];\n\t\t\t\t\t$decrypt = json_decode(Aes::decrypt(urldecode($payload)), true);\n\t\t\t\t\t$decrypt['b_id'] = $booking_id;\n\t\t\t\t\t$new_data = json_encode($decrypt);\n\t\t\t\t\t$new_payload = urlencode(Aes::encrypt($new_data));\n\n\n\t\t\t\t\t$base_url = MODULE_BASE_URL;\n\t\t\t\t\t$payload_url = \"{$base_url}/confirm?pl={$new_payload}\";\n\t\t\t\t\t$payload_name = typecast(Input::get('name'), 'string');\n\n\n\t\t\t\t\t$template = Template::generate('confirmation', array(\n\t\t\t\t\t\t'logo' => ASSET_LOGO,\n\t\t\t\t\t\t'name' => ucwords($payload_name),\n\t\t\t\t\t\t'link' => $payload_url,\n\n\t\t\t\t\t\t'date' => $summary['date_available'],\n\t\t\t\t\t\t'time' => \"{$summary['schedule_start']} to {$summary['schedule_end']}\",\n\t\t\t\t\t\t'hourly' => $summary['hours_text'],\n\t\t\t\t\t\t'total' => $summary['price'],\n\n\t\t\t\t\t\t'avatar' => $summary['avatar'],\n\t\t\t\t\t\t'cleaner' => \"{$summary['firstname']} {$summary['lastname']}\",\n\t\t\t\t\t\t'rating' => $summary['rate']\n\t\t\t\t\t));\n\n\n\t\t\t\t\t// Send email confirmation\n\t\t\t\t\tif (ENVIRONMENT === 'production') {\n\n\t\t\t\t\t\t$bcc = defined('EMAIL_CONFIRM_BCC') ? EMAIL_CONFIRM_BCC : null;\n\n\t\t\t\t\t\temailer($email, 'Rosie Services Confirm Booking', $template, $bcc);\n\t\t\t\t\t\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tlog_write('email_conf', $template);\n\n\t\t\t\t\t\treturn self::success($payload_url);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn self::success(\"Thank your for booking. An email confirmation has been sent to <b>{$email}</b>. The slot confirmation will be <b>valid within 24 hours</b>.\");\n\t\t\t\t\n\t\t\t\t} else if ($save === false) {\n\n\t\t\t\t\treturn Msg::error('Booking was not saved. Please review your booking information.');\n\n\t\t\t\t} else {\n\n\t\t\t\t\treturn Msg::error('This slot has already been booked. Please try other time slot.');\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\treturn Msg::error('Invalid booking request. Slot is not available.');\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\treturn Msg::error('Invalid booking request. Please verify the booking information before saving.');\n\t\t}\n\t}",
"public function insert()\n\t{\n\t\t$crud = $this->crud->data([\n\t\t\t'first_name' => $_POST['first_name'],\n\t\t\t'last_name' => $_POST['last_name'],\n\t\t]);\n\t\t$crud->insert();\n\t\t$this->redirect('crud');\n\t}",
"function insert() {\n if(!$this->valid):\n return;\n endif;\n \n $this->name = mysql_real_escape_string($this->name);\n $this->brief = mysql_real_escape_string($this->brief);\n $this->description = mysql_real_escape_string($this->description);\n $this->games = mysql_real_escape_string($this->games);\n $this->headquarter = mysql_real_escape_string($this->headquarter);\n \n $sql = \"INSERT INTO companies\n (name, brief, description, date_founded, headquarter, website, imageURL, games, num_likes)\n VALUES\n ('$this->name', '$this->brief', '$this->description', '$this->date_founded', '$this->headquarter', '$this->website', '$this->imageURL', '$this->games', '$this->num_likes')\";\n \n if(!mysqli_query($this->con, $sql)) {\n die('Error: ' . mysqli_error($this->con));\n }\n \n //mysqli_close($con);\n \n echo \"<br>Insertion Successful!<br>\";\n }",
"public function store(Request $request)\n {\n $this->validate($request, [\n 'booking_code' => 'required',\n 'order_date' => 'required',\n 'rental_date' => 'required',\n 'return_date' => 'required',\n 'price' => 'required',\n 'status' => 'required',\n 'fine' => 'required',\n 'car_id' => 'required',\n 'client_id' => 'required'\n ]);\n\n $insert = [\n 'booking_code'=> $request->booking_code,\n 'order_date'=> $request->order_date,\n 'rental_date'=> $request->rental_date,\n 'return_date'=> $request->return_date,\n 'price'=> $request->price,\n 'status'=> $request->status,\n 'fine'=> $request->fine,\n 'car_id'=> $request->car_id,\n 'client_id'=> $request->client_id\n ];\n\n $bookingCreate = Booking::create($insert);\n return redirect()->route('booking.index');\n }",
"public function actionCreate() {\n $model = new Bookings();\n\n $model->load(Yii::$app->request->post());\n $query = Bookings::find()\n ->andWhere(['patients_id' => $model->patients_id])\n ->andWhere(['date' => $model->date])->one();\n\n\n if (!empty($query->doctors_id)) {\n Yii::$app->session->setFlash('error', 'You already have an appointment on this date');\n return $this->redirect(['view', 'id' => $query->id]);\n }\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n\n// $model->time = Yii::$app->formatter->\n// asDate($_POST['hours'].$_POST['minutes'], 'HH:mm');\n\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function store(BookingRequest $request)\n {\n return $this->bookingRepository->create($request->all());\n }",
"public function store()\n\t{\n\t\t$reserva = new Reserva;\n\t\t$reserva->persona_id = Input::get('persona_id');\n\t\t$reserva->puesto_id = Input::get('puesto_id');\n\t\t$reserva->start_date = Input::get('start_date');\n\t\t$reserva->end_date = Input::get('end_date');\n\t\t$reserva->save();\n\t}",
"public function run()\n {\n $booking_methods = [\n [ \n 'name' => 'Paypal',\n 'created_at' => now(),\n 'updated_at' => now()\n ],\n\n [\n 'name' => 'Credit Card',\n 'created_at' => now(),\n 'updated_at' => now()\n\n ],\n ];\n\n BookingMethod::insert($booking_methods);\n }",
"protected function insert()\n\t{\n\t\t$this->autofill();\n\n\t\tparent::insert();\n\n\t}",
"public static function insert(){\n $dayOfWeek = $_REQUEST[\"dayOfWeek\"];\n $startTime = $_REQUEST[\"startTime\"];\n $endTime = $_REQUEST[\"endTime\"];\n \n $result = DB::dataManipulation(\"INSERT INTO timeslots (dayOfWeek, startTime, endTime)\n VALUES ('$dayOfWeek','$startTime','$endTime')\");\n return $result;\n }",
"public function insert($gunBbl);",
"public function actionCreate()\n {\n $model = new ArsBooking();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"protected function createNew() {\n $this->db->insert($this->tableName, $this->mapToDatabase());\n $this->id = $this->db->insert_id();\n }",
"public function insert() {\n\n // Does the Course object already have an ID?\n if ( !is_null( $this->courseId ) ) trigger_error ( \"Course::insert(): Attempt to insert course object that already has its ID property set (to $this->courseId).\", E_USER_ERROR );\n\n // Insert the course\n $conn = new PDO( DB_DSN, DB_USERNAME, DB_PASSWORD );\n $sql = \"INSERT INTO course ( courseCode, courseName, description, headTeacher )\n VALUES (:courseCode,:courseName,:description,:headTeacher)\";\n $st = $conn->prepare ( $sql );\n $st->bindValue( \":courseCode\", $this->courseCode, PDO::PARAM_STR );\n $st->bindValue( \":courseName\", $this->courseName, PDO::PARAM_STR );\n $st->bindValue( \":description\", $this->description, PDO::PARAM_STR );\n $st->bindValue( \":headTeacher\", $this->headTeacher, PDO::PARAM_STR );\n\n $st->execute();\n $this->courseId = $conn->lastInsertId();\n $conn = null;\n }",
"public function insert_reservation($name,$phone,$date,$food_category,$username_account){\n $sql = \"INSERT INTO reservation (Name,Phone,Data,Food_Category,Username_Account) VALUES(?,?,?,?,?)\";\n $result =$this->connection()->prepare($sql);\n $result->execute(array($name,$phone,$date,$food_category,$username_account));\n }",
"public function create()\n {\n $this->validate($request,[\n 'customer_name'=>'required',\n 'catergory'=>'required',\n 'time_from'=>'nullable',\n 'time_to'=>'nullable',\n 'date'=>'nullable',\n 'description'=>'nullable'\n\n ]);\n\n //Create post\n $booking = new Booking;\n $booking->user_id=Auth::user()->id;\n $booking->saloon_id=Auth::user()->id;\n $booking->customer_name=$request->input('customer_name');\n $booking->catergory=$request->input('catergory');\n $booking->save();\n return redirect('/main_salon_account');\n }",
"protected function _insert()\n\t{\n\t\t$this->date_added = \\Core\\Date::getInstance(null,\\Core\\Date::SQL_FULL, true)->toString();\n\t\t$this->date_modified = $this->date_added;\n\t\t$this->last_online = $this->date_modified;\n\t\t$this->activity_open = $this->date_modified;\n\t\t$this->language_id = \\Core\\Base\\Action::getModule('Language')->getLanguageId();\n\t}",
"function insert_purchase_request($db, $buyer_id, $seller_id, $bookid)\n{\n\t/* Create the query */\n\t$sql = 'INSERT INTO purchase_requests (buyer_id, seller_id, bookid, date_time) \n\t\t\t\t\tVALUES (:buyer_id, :seller_id, :bookid, NOW())';\n\n\t/* Execute the query */\n\t$st = $db->prepare($sql);\n\t$st->execute(array(':buyer_id' =>$buyer_id, ':seller_id'=> $seller_id,\n\t\t\t\t\t\t\t\t\t\t ':bookid'=> $bookid));\n}",
"public static function insertData($data){\n DB::table('auctions')->insert($data);\n }",
"function insert_slot($id,$date,$month,$year,$slot_schedule){\n\t\t$database=new Database();\n\t\t$sql=\"INSERT INTO `schedule`(`id`, `date`, `month`, `year`, `slot_schedule`, `counselor_id`) VALUES (NULL,'$date','$month','$year','$slot_schedule','$id')\";\n\t\t$stmt=$database->connect()->prepare($sql);\n\t\t$stmt->execute();\n\t}",
"public function store(Request $request)\n {\n //\n $validator = Validator::make($request->all(), [\n 'trip_id' => 'required',\n // 'start_location_id' => 'required',\n // 'end_location_id' => 'required',\n 'vehicle_id' => 'required',\n 'seat_id' => 'required',\n \n ]);\n\n if($validator->fails()) {\n return $this->formatInputErrorResponse($validator->errors());\n }\n\n $trip = Trip::where('id',$request->trip_id)->first();\n \n // dd($trip);\n if(!$trip){\n return $this->notFoundResponse('The selected trip does not exist');\n }\n\n $bookingData = [\n 'trip_id' => $request->trip_id,\n 'customer_name' => $request->customer_name,\n 'start_location_id' => $trip->start_location_id,\n 'end_location_id' => $trip->end_location_id,\n 'vehicle_id' => $request->vehicle_id,\n 'seat_id' => $request->seat_id,\n 'ticket_code' => $this->generateTicket(),\n ];\n\n $booking = Booking::create($bookingData);\n\n // update seat availability\n $seat = Seat::find($request->seat_id);\n $seat->status = false;\n $seat->save();\n\n return $this->formatCreatedResponse('Booking successful', $booking);\n\n }",
"public function store(Request $request)\n {\n //\n DB::beginTransaction();\n try {\n \n $direct_booking = DirectBooking::create($request->all());\n DB::commit();\n $response = [\n 'success' => true,\n 'message' => 'Booking successfully created!!',\n 'data' => $direct_booking,\n ];\n event(new \\App\\Events\\NotifyDriverBookingEvent(auth()->user(), $direct_booking));\n return response()->json($response, 200);\n \n } catch (\\Exception $ex) {\n DB::rollback();\n $booking = DirectBooking::find(1);\n return response()->json(\n [\n 'success'=> false,\n 'error' => $ex->getMessage(),\n 'message' => 'Booking not created',\n ],\n 500);\n \n \n }\n }",
"public function insert()\n {\n $this->_checkItem();\n $service = $this->getService();\n $entry = $service->newItemEntry();\n $this->setEntry($entry);\n $this->_prepareEnrtyForSave();\n $this->getEntry()->setItemType($this->_getItemType());\n $entry = $service->insertGbaseItem($this->getEntry());\n $this->setEntry($entry);\n $entryId = $this->getEntry()->getId();\n $published = $this->gBaseDate2DateTime($this->getEntry()->getPublished()->getText());\n $this->getItem()\n ->setGbaseItemId($entryId)\n ->setPublished($published);\n\n if ($expires = $this->_getAttributeValue('expiration_date')) {\n $expires = $this->gBaseDate2DateTime($expires);\n $this->getItem()->setExpires($expires);\n }\n }",
"public function insert($data);",
"function insertVoucher(){\n $db =new Database();\n $query=\"INSERT INTO `gutscheine`(`GutscheinID`, `Wert`, `Gueltigkeit`, `Eingeloest`) VALUES \"\n .\"('\".$this->gutscheinID.\"','\".$this->wert.\"','\".$this->gueltigkeit.\"','\".$this->eingeloest.\"')\";\n $db->insert($query);\n }",
"public function store( Request $request ) {\n $booking = Booking::create( $request->input() );\n\n /* Make the connection between the booking and the user */\n $booking->users()->attach( $request->input( 'user_id' ) );\n\n return redirect()->route( 'bookings.index' );\n }",
"function crear_reserva($reserva) {\n $this->db->insert('edicion', $reserva);\n }",
"function insert_guest()\n\t{\n\t\t$this->auth_is('pce_da5');\n\n\t\t$data = array('app_num'=>$this->input->post('app_num'),\n\t\t\t\t\t 'name'=>filter_var($this->input->post('name'), FILTER_SANITIZE_STRING),\n\t\t\t\t\t 'designation'=>filter_var($this->input->post('designation'), FILTER_SANITIZE_STRING),\n\t\t\t\t\t 'address'=>trim($this->input->post('address')),\n\t\t\t\t\t 'gender'=>$this->input->post('gender'),\n\t\t\t\t\t 'contact'=>filter_var($this->input->post('contact'), FILTER_SANITIZE_NUMBER_INT),\n\t\t\t\t\t 'email'=>filter_var($this->input->post('email'), FILTER_SANITIZE_EMAIL));\n\n\t\t$b_detail = $this->edc_booking_model->get_booking_details($data['app_num'])[0];\n \t\t//checking in before check in date is error\n\t\t//this restriction is put because if any applicant checks in before his appointed time\n\t\t//then there might be clashes with other bookings\n \t\tif(time() < strtotime($b_detail['check_in'])) \n \t\t{\n \t\t\t$this->session->set_flashdata('flashError', 'Checking In before Check In DateTime not allowed');\n \t\t\tredirect('edc_booking/guest_details');\n \t\t}\n\t\t//get identity card\n\t\t$upload = $this->upload_file('identity_card' , $data['app_num']);\n\t\tif ($upload)\n\t\t\t$data['identity_card'] = $upload['file_name'];\n\t\t//if group type, then add same entry to the rooms allocated\n\t\t$type_of_booking = $this->input->post('type_of_booking');\n\t\tif($type_of_booking == 'group')\n\t\t{\n\t\t\t$rooms_chosen = $this->input->post('ckbox_rooms'); //getting only room id\n\t\t\t$group_guests = $this->input->post('group_guests');\n\n\t\t\t//insert suite ac\n\t\t\t$count = 0;\n\t\t\tforeach($rooms_chosen as $room)\n\t\t\t{\n\t\t\t\tif($this->edc_allotment_model->get_room_details($room)['room_type'] == \"AC Suite\")\n\t\t\t\t{\n\t\t\t\t\techo 'SAC Room '.$room.', inserting data.<br/>';\n\t\t\t\t\t$data['room_alloted'] = $room;\n\t\t\t\t\tif($count < $group_guests)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->edc_booking_model->insert_guest_details($data);\n\t\t\t\t\t\t$this->edc_booking_model->set_check_in($data['app_num']);\n\t\t\t\t\t\t$count++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//insert double ac\n\t\t\tforeach($rooms_chosen as $room)\n\t\t\t{\n\t\t\t\tif($this->edc_allotment_model->get_room_details($room)['room_type'] == \"Double Bedded AC\")\n\t\t\t\t{\n\t\t\t\t\t$data['room_alloted'] = $room;\n\t\t\t\t\t$entries = $this->edc_booking_model->get_guest_entries($data['app_num'], $room);\n\t\t\t\t\tif($entries == 0)\n\t\t\t\t\t{\t//insert two entries\n\t\t\t\t\t\tif($count < $group_guests)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->edc_booking_model->insert_guest_details($data);\n\t\t\t\t\t\t\t$count++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif($count < $group_guests)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->edc_booking_model->insert_guest_details($data);\n\t\t\t\t\t\t\t$count++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if($entries == 1)\n\t\t\t\t\t{\t//insert one entry\n\t\t\t\t\t\tif($count < $group_guests)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->edc_booking_model->insert_guest_details($data);\n\t\t\t\t\t\t\t$count++;\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\telse if($type_of_booking == 'individual'){\n\t\t\t$data['room_alloted'] = $this->input->post('room_alloted');\n\t\t\t$this->edc_booking_model->insert_guest_details($data);\n\t\t}\n\n\t\t$this->session->set_flashdata('flashSuccess','Check In Successful.');\n\t\tredirect('edc_booking/guest_details/edit/'.$this->input->post('app_num'));\n\t}",
"public function store()\n\t{\n\t\t$validator = \\Validator::make($data = \\Request::all(), Booking::$rules);\n\n\t\tif ($validator->fails())\n\t\t{\n\t\t\treturn \\Redirect::back()->withErrors($validator)->withInput();\n\t\t}\n\n\t\tBooking::create($data);\n\n\t\treturn \\Redirect::route('bookings');\n\t}",
"protected function _insert()\n {\n \t$metadata = $this->_table->info(Zend_Db_Table_Abstract::METADATA);\n \t\n \tif(isset($metadata['created_at']))\n\t\t\t$this->_data['created_at'] = new Zend_Date ();\n \tif(isset($metadata['updated_at']))\n\t\t\t$this->_data['updated_at'] = new Zend_Date ();\n }",
"public function insert() {\n\t$stmt = $this->_database->prepare('INSERT INTO planetterrains (planetid, terrainid, x, y) VALUES (?, ?, ?, ?)');\n\t$stmt->bind_param('iiii', $this->planetid, $this->terrainid, $this->x, $this->y);\n\t$stmt->execute();\n\t$this->refid = $this->_database->insert_id;\n\tif (\\is_array($this->deposit) && \\count($this->deposit) > 0) {\n\t $this->deposit[$this->refid]->terrainid = $this->refid;\n\t $this->deposit[$this->refid]->commit();\n\t}\n\telse if (!\\is_array($this->deposit)) {\n\t $this->deposit->terrainid = $this->refid;\n\t $this->deposit->commit();\n\t}\n }",
"function Insert(){\r\n $query = \"INSERT INTO userschedules\r\n (userName,organizationId,branchId,locationCode,date,startingTime,signedIn,finishingTime,signedOut,status)\r\n VALUES('$this->userName',$this->organizationId,$this->branchId,'$this->locationCode','$this->date',\r\n '$this->startingTime','$this->signedIn','$this->finishingTime','$this->signedOut','$this->status')\";\r\n include(\"includes/dbConnection.php\");\t\t\t\r\n $executeQuery = $db->prepare($query);\r\n $executeQuery->execute() or exit(\"Error: INSERT query failed.\");\r\n }",
"function save(){\r\n\t\tglobal $wpdb;\r\n\t\t$table = EM_TICKETS_BOOKINGS_TABLE;\r\n\t\tdo_action('em_ticket_booking_save_pre',$this);\r\n\t\t//First the person\r\n\t\tif($this->validate()){\t\t\t\r\n\t\t\t//Now we save the ticket\r\n\t\t\t$this->booking_id = $this->get_booking()->id; //event wouldn't exist before save, so refresh id\r\n\t\t\t$data = $this->to_array(true); //add the true to remove the nulls\r\n\t\t\tif($this->id != ''){\r\n\t\t\t\t$where = array( 'ticket_booking_id' => $this->id ); \r\n\t\t\t\t$result = $wpdb->update($table, $data, $where, $this->get_types($data));\r\n\t\t\t\t$this->feedback_message = __('Changes saved','dbem');\r\n\t\t\t}else{\r\n\t\t\t\t//TODO better error handling\r\n\t\t\t\t$result = $wpdb->insert($table, $data, $this->get_types($data));\r\n\t\t\t $this->id = $wpdb->insert_id; \r\n\t\t\t\t$this->feedback_message = __('Ticket booking created','dbem'); \r\n\t\t\t}\r\n\t\t\tif( $result === false ){\r\n\t\t\t\t$this->feedback_message = __('There was a problem saving the ticket booking.', 'dbem');\r\n\t\t\t\t$this->errors[] = __('There was a problem saving the ticket booking.', 'dbem');\r\n\t\t\t}\r\n\t\t\treturn apply_filters('em_ticket_booking_save', ( count($this->errors) == 0 ), $this);\r\n\t\t}else{\r\n\t\t\t$this->feedback_message = __('There was a problem saving the ticket booking.', 'dbem');\r\n\t\t\t$this->errors[] = __('There was a problem saving the ticket booking.', 'dbem');\r\n\t\t\treturn apply_filters('em_ticket_booking_save', false, $this);\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"public function store(Request $request)\n {\n $this->validate($request,[\n 'no_attending'=>'required',\n 'price'=>'required',\n 'id'=>'required',\n 'onarrival'=>'required'\n ]);\n $booking = new newBooking();\n $user = auth()->user();\n $booking->booked_by=$user->id;\n $booking->event_id=$request->id;\n $booking->price=$request->price;\n $booking->expected_people=$request->no_attending;\n $booking->payment=$request->onarrival;\n $booking->save();\n return redirect()->route('show',$request->id)->with('success',\"event booked succcesfully\");\n }",
"public function insert($cargo){\n $id=$cargo->getId();\n$fecha_ingreso=$cargo->getFecha_ingreso();\n$empresa_idempresa=$cargo->getEmpresa_idempresa()->getIdempresa();\n$area_empresa_idarea_emp=$cargo->getArea_empresa_idarea_emp()->getIdarea_emp();\n$cargo_empreso_idcargo=$cargo->getCargo_empreso_idcargo()->getIdcargo();\n$puesto_idpuesto=$cargo->getPuesto_idpuesto()->getIdpuesto();\n\n try {\n $sql= \"INSERT INTO `cargo`( `id`, `fecha_ingreso`, `empresa_idempresa`, `area_empresa_idarea_emp`, `cargo_empreso_idcargo`, `puesto_idpuesto`)\"\n .\"VALUES ('$id','$fecha_ingreso','$empresa_idempresa','$area_empresa_idarea_emp','$cargo_empreso_idcargo','$puesto_idpuesto')\";\n return $this->insertarConsulta($sql);\n } catch (SQLException $e) {\n throw new Exception('Primary key is null');\n }\n }",
"function wisataone_X1_insert_order($id_booking) {\n if (wisataone_X1_is_order_exist($id_booking)) { return false; };\n $y = wisataone_X1_get_tour_data($id_booking);\n $res_y = wisataone_X1_insert_order_full_data($y);\n\n if (!$res_y[0]) {\n return false;\n }\n\n $schedule = (new WSTX1Scheduler([]))->load($res_y[1]);\n $schedule->checkMailQueue();\n\n return true;\n}",
"function insertIntoRequests($db, $upload_book_id, $days, $borrower_id, $lender_id){\n echo \"inster\";\n try {\n $query = 'INSERT INTO requests (uploaded_book_id, days, borrower_id,lender_id) VALUES (:np_uploaded_book_id, :np_days, :np_borrower_id, :np_lender_id)';\n $statement = $db->prepare($query);\n echo \"inster1\";\n $statement->bindValue(':np_uploaded_book_id', $upload_book_id);\n $statement->bindValue(':np_days', $days);\n $statement->bindValue(':$borrower_id', $borrower_id);\n $statement->bindValue(':np_lender_id', $lender_id);\n $statement->execute();\n } catch (PDOException $e) {\n $error = $e->getMessage();\n include('database_error.php');\n exit();\n }\n \n}",
"public function run()\n {\n $data =\t[\n \t['hotel_id' => 1,'room_id'=> 1],\n ];\n DB::table('hotel_rooms')->insert($data);\n }",
"public function setcreatecompetence(){\n\n\n\n\n global $conn;\n\n\n $stmt = $conn->prepare(\"insert into competences(`competence`,`end`) value (?,?)\");\n $stmt->bind_param(\"ss\",$this->competence,$this->end);\n $stmt->execute();\n $stmt->close();\n\n\n\n\n\n }",
"public function insert() {\n\n // Does the program object already have an ID?\n if ( !is_null( $this->programID ) ) trigger_error ( \"program::insert(): Attempt to insert an program object that already has its ID property set (to $this->id).\", E_USER_ERROR );\n\n // Insert the program\n $conn = new PDO( DB_DSN, DB_USERNAME, DB_PASSWORD );\n $sql = \"INSERT INTO programs ( programName, programStart, programFrequency ) VALUES ( :programName, :programStart, :programFrequency )\";\n $st = $conn->prepare ( $sql );\n $st->bindValue( \":programName\", $this->programName, PDO::PARAM_STR );\n $st->bindValue( \":programStart\", $this->programStart, PDO::PARAM_STR );\n\t$st->bindValue( \":programFrequency\", $this->programFrequency, PDO::PARAM_STR );\n $st->execute();\n $this->programID = $conn->lastInsertId();\n $conn = null;\n }",
"public function insert($insertConnection,$title,$description,$dueDate,$addDate,$editDate,$isDone){\n try {\n $query =\"INSERT INTO $this->tableName (title,description,dueDate,addDate,editDate,isDone)\n VALUES ('$title','$description','$dueDate','$addDate','$editDate','$isDone')\";\n $insertConnection->exec($query);\n echo json_encode(\"New record created successfully\");\n $insertConnection = null;\n } catch (PDOException $e) {\n echo json_encode(\"Execute failed: \".$e->getMessage());\n }\n }",
"protected function saveInsert()\n {\n }",
"public function prepare_insertNewBooking($params)\n\t{\n\t\t$xml_string = \"p_Token=\".$params['p_Token'].\"&p_UserID=\".$params['p_UserID'].\"&p_VillaID=\".$params['p_VillaID'].\"&p_CIDate=\".$params['p_CIDate'].\"&p_CODate=\".$params['p_CODate'].\"&p_GuestFirstName=\".$params['p_GuestFirstName'].\"&p_GuestLastName=\".$params['p_GuestLastName'].\"&p_Email=\".$params['p_Email'].\"&p_CountryOfResidence=\".$params['p_CountryOfResidence'].\"&p_MobileNo=\".$params['p_MobileNo'].\"&p_TelNo=\".$params['p_TelNo'].\"&p_BookingSourceID=\".$params['p_BookingSourceID'].\"&p_TotalPax=\".$params['p_TotalPax'].\"&p_TotalChild=\".$params['p_TotalChild'].\"&p_TotalInfant=\".$params['p_TotalInfant'].\"&p_SpecialRequest=\".$params['p_SpecialRequest'].\"&p_MarketingMediaID=\".$params['p_MarketingMediaID'].\"&p_AffID=\".$params['p_AffID'].\"\";\n\t\treturn $xml_string;\n\t}",
"function insert() {\n\t\t$solic = json_decode($_POST['DATA']);\n\t\t$service = new CompraService();\n\t\tif($service->insert($solic))\n\t\t\thttp_response_code();\n\t\telse\n\t\t\thttp_response_code(500);\n\t}",
"protected function _insert()\n {\n \n }",
"protected function _insert()\n {\n \n }",
"public function actionBooking() {\n $model = new Reservation();\n $check_in_date = Yii::$app->request->post('check_in');\n $check_out_date = Yii::$app->request->post('check_out');\n $rate_plan = Yii::$app->request->post('rate_plan_id');\n $total_amount = Yii::$app->request->post('total_amount');\n\n return $this->render('create', [\n 'check_in_date'=>$check_in_date,\n 'check_out_date'=>$check_out_date,\n 'rate_plan'=>$rate_plan,\n 'total_amount'=>$total_amount,\n 'model'=>$model,\n ]);\n\n }",
"public function insert() {\r\n\t\t$this->getMapper()->insert($this);\r\n\t}",
"public function insert() {\r\n\r\n\t\ttry {\r\n\t\t\tglobal $ks_db;\r\n\t\t\tglobal $ks_log;\r\n\r\n\t\t\t$ks_db->beginTransaction ();\r\n\t\t\t\r\n\t\t\t$arrBindings = array ();\r\n\t\t\t$insertCols = '';\r\n\t\t\t$insertVals = '';\r\n\t\t\t\r\n\t\t\tif (isset ( $this->userid )) {\r\n\t\t\t\t$insertCols .= \"lp_userid, \";\r\n\t\t\t\t$insertVals .= \"?, \";\r\n\t\t\t\t$arrBindings[] = $this->userid;\r\n\t\t\t}\r\n\t\t\tif (isset ( $this->random )) {\r\n\t\t\t\t$insertCols .= \"lp_random, \";\r\n\t\t\t\t$insertVals .= \"?, \";\r\n\t\t\t\t$arrBindings[] = $this->random;\r\n\t\t\t}\r\n\t\t\tif (isset ( $this->deadline )) {\r\n\t\t\t\t$insertCols .= \"lp_deadline, \";\r\n\t\t\t\t$insertVals .= \"?, \";\r\n\t\t\t\t$arrBindings[] = $this->deadline;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//remove trailing commas\r\n\t\t\t$insertCols = preg_replace(\"/, $/\", \"\", $insertCols);\r\n\t\t\t$insertVals = preg_replace(\"/, $/\", \"\", $insertVals);\r\n\t\t\t\r\n\t\t\t$sql = \"INSERT INTO $this->sqlTable ($insertCols)\";\r\n\t\t\t$sql .= \" VALUES ($insertVals)\";\r\n\t\t\t\r\n\t\t\t$ks_db->query ( $sql, $arrBindings );\r\n\r\n\t\t\t//set the id property\r\n\t\t\t$this->id = $ks_db->lastInsertId();\r\n\t\t\t\r\n\t\t\t$ks_db->commit ();\r\n\t\t\t\r\n\t\t} catch(Exception $e) {\r\n\t\t\t$ks_db->rollBack ();\r\n\t\t\t$ks_log->info ( 'Fatal Error: ' . __CLASS__ . '::' . __METHOD__ . '. ' . $e->getMessage () );\r\n\t\t\t$ks_log->info ( '<br>SQL Statement: ' . $sql);\r\n\t\t\techo \"Fatal Error: \" . __CLASS__ . '::' . __METHOD__ . '. ' . $e->getMessage ();\r\n\t\t\techo \"SQL Statement: \" . $sql;\r\n\t\t}\r\n\t}",
"public function insertAction() {\n if ($_POST) {\n try {\n $car = $this->carOperation->createCar($_POST[\"name\"], $_POST[\"volume\"], $_POST[\"power\"], $_POST[\"mileage\"],\n $_POST[\"manufacture_year\"], $_POST[\"top_speed\"], $_POST[\"acceleration\"], $_POST[\"price\"]);\n $car_id = $this->carOperation->insertCar($car, true);\n } catch (InvalidParamException $ex) {\n header(self::CODES[400]);\n return $this->render(\"car/insert.html.twig\", array(\"car\" => $car, \"error\" => $ex->getMessage()));\n }\n return $this->detailAction($car_id);\n } else {\n return $this->render(\"car/insert.html.twig\");\n }\n }",
"protected function addAnnouncementToDb()\n {\n $db = Db::getConnection();\n $db->query(\"INSERT INTO sale (id, id_user, is_banned, street, total_area, living_area, kitchen_area, balcony, description, price, type_house, floor, count_floor, rooms_count, ownership) VALUES (NULL, '$this->userId', NULL, '$this->street', '$this->totalArea', '$this->livingArea', '$this->kitchenArea', '$this->balcony', '$this->description', '$this->price', '$this->typeHouse', '$this->floor', '$this->countOfFloors', '$this->roomsCount', '$this->ownership');\");\n return $db->lastInsertId();\n }",
"public function insert() {\r\n\r\n\t\t// Does the Genre object already have an ID?\r\n\t\tif ( !is_null( $this->id ) ) trigger_error ( \"Genre::insert(): Attempt to insert an Genre object that already has its ID property set (to $this->id).\", E_USER_ERROR );\r\n\r\n\t\t// Insert the Genre\r\n\t\t$conn = new PDO( DB_DSN, DB_USERNAME, DB_PASSWORD );\r\n\t\t$sql = \"INSERT INTO :table ( id, name ) VALUES ( :id, :name )\";\r\n\t\t$st = $conn->prepare ( $sql );\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->bindValue( \":name\", $this->name, PDO::PARAM_STR );\r\n\t\t$st->execute();\r\n\t\t$this->id = $conn->lastInsertId();\r\n\t\t$conn = null;\r\n\t}",
"public function store(SaveBookingRequest $request)\n {\n return DB::transaction(function () use ($request) {\n $request->merge([\n 'total_gross_weight' => numeric(array_sum(array_column($request->input('goods', []), 'gross_weight'))),\n 'total_weight' => numeric(array_sum(array_column($request->input('goods', []), 'weight'))),\n ]);\n $booking = Booking::create($request->input());\n\n $booking->bookingContainers()->createMany($request->input('containers', []));\n $booking->bookingGoods()->createMany($request->input('goods', []));\n\n $booking->statusHistories()->create([\n 'status' => Booking::STATUS_DRAFT,\n 'description' => 'Initial booking'\n ]);\n\n return response()->json([\n 'status' => 'success',\n 'data' => $booking,\n 'message' => __(\"Booking :number successfully created\", [\n 'number' => $booking->booking_number\n ])\n ]);\n });\n }",
"function savecat(){\n\n $data =[\n\n 'reservation_category' => $_POST['reservation_category'],\n 'category_description' => $_POST['category_description'],\n 'reservation_duration' => $_POST['reservation_duration']\n\n ];\n\n insert( 'reservation_categories', $data );\n\n redirect( route('dashboard/reservation/categories') );\n}",
"public function _do_create()\n {\n $this->load->library(['form_validation' => 'fv']);\n\n // 2. Set the validation rules.\n $this->fv->set_rules([\n [\n 'field' => 'booking-email',\n 'label' => 'email',\n 'rules' => 'required|valid_email'\n ]\n ]);\n\n // 3. If the validation failed, we'll reload.\n if($this->fv->run() === FALSE)\n {\n return $this->create();\n }\n\n // 4. Get the inputs from the form.\n $screening = $this->input->post('booking-screening');\n $seats = $this->input->post('booking-seat');\n $email = $this->input->post('booking-email');\n\n // 5. Try to insert the data in its tables, and get back the ID.\n $booking_id = $this->booking_model->create_booking($screening, $seats, $email);\n if($booking_id === FALSE)\n {\n exit(\"Booking could not be created. Please try again later\");\n }\n\n redirect('booking');\n }",
"protected function _insert()\n\t{\n\t}",
"public function store(BookingFormRequest $request)\n {\n $validated = $request->validated();\n $booking = new Booking();\n $booking->guest_full_name = $validated['guest_full_name'];\n $booking->guest_credit_card = $validated['guest_credit_card'];\n $booking->room = $validated['room'];\n $booking->from_date = $validated['from_date'];\n $booking->to_date = $validated['to_date'];\n $booking->more_details = $validated['more_details'];\n\n $booking->Save();\n return view('bookings.index');\n }",
"public function add(){\n $tab = DB::table('student');\n $res = $tab -> insert(['name' => '小黑', 'age' => '18']);\n }",
"public function insert() {\n \n }",
"public function store(CreateBillRequest $request)\n {\n $userId = $this->auth->id();\n $data = $request->all();\n\n $data['author_id'] = $userId;\n $data['unique_number'] = uniqid('PC', false);\n\n if (!empty($data['start_date'])) {\n $data['start_date'] = \\DateTime::createFromFormat('d/m/Y', $data['start_date'])->format('Y-m-d');\n }\n $this->bill->create($data);\n\n if (!empty($data['booking_id'])) {\n $booking = Booking::find($data['booking_id']);\n if ($booking) {\n $this->alterBookingStatus($booking);\n }\n }\n\n if (empty($data['booking_id'])) {\n return redirect()->route('admin.bill.bill.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('bill::bills.title.bills')]));\n }\n\n return redirect()->route('admin.booking.booking.edit', [$data['booking_id']])\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('bill::bills.title.bills')]));\n }",
"public function _insert($data)\n {\n $this->insert($data);\n }",
"public function addbook($name, $publisher, $year, $description)\r\n {\r\n $sql = \"INSERT INTO book (name, publisher, year,description) VALUES (:name, :publisher, :year, :description)\";\r\n $query = $this->db->prepare($sql);\r\n $parameters = array(':name'=>$name, ':publisher'=>$publisher, ':year'=>$year, ':description'=>$description );\r\n // useful for debugging: you can see the SQL behind above construction by using:\r\n // echo '[ PDO DEBUG ]: ' . Helper::debugPDO($sql, $parameters); exit();\r\n $query->execute($parameters);\r\n }",
"public function create ()\n {\n $query = \"INSERT INTO \" . $this->table_name .\" \". \" SET\n book_id=:book_id, type_id=:type_id, name=:name, isbn=:isbn, publisher=:publisher,author=:author,price=:price\";\n $stmt = $this->conn->prepare($query);\n\n\n $this->book_id=htmlspecialchars(strip_tags($this->book_id));\n $this->type_id=htmlspecialchars(strip_tags($this->type_id));\n $this->name=htmlspecialchars(strip_tags($this->name));\n $this->isbn=htmlspecialchars(strip_tags($this->isbn));\n $this->publisher=htmlspecialchars(strip_tags($this->publisher));\n $this->author=htmlspecialchars(strip_tags($this->author));\n $this->price=htmlspecialchars(strip_tags($this->price));\n\n\n\n $stmt->bindParam(\":book_id\", $this->book_id);\n $stmt->bindParam(\":type_id\", $this->type_id);\n $stmt->bindParam(\":name\", $this->name);\n $stmt->bindParam(\":isbn\", $this->isbn);\n $stmt->bindParam(\":publisher\", $this->publisher);\n $stmt->bindParam(\":author\", $this->author);\n $stmt->bindParam(\":price\",$this->price);\n\n if($stmt->execute()){\n return true;\n }else{\n return false;\n }\n }",
"public function insertStory()\n\t\t{\n\n\t\t\t$sql = \"INSERT INTO `BreakingNews`(`News`) VALUES (\\\" \\\")\";\n\n\t\t\t$this->connection->query($sql);\n\n\t\t}",
"public function insert() {\n \n $sql = \"INSERT INTO $this->table(\"\n . \"tb_user_id,\"\n . \"tb_user_directors_id,\"\n . \"tb_boleto_venc_boleto,\"\n . \"tb_boleto_hash_boleto,\"\n . \"tb_boleto_hash_nfe,\"\n . \"tb_boleto_hash_sla,\"\n . \"tb_boleto_status_boleto,\"\n . \"tb_boleto_date,\"\n . \"tb_boleto_hour)\"\n . \"VALUES (?,?,?,?,?,?,?,?,?)\";\n \n $stmt = DB::prepare($sql);\n \n $stmt->bindParam(1, $this->tb_user_id);\n $stmt->bindParam(2, $this->tb_user_directors_id);\n $stmt->bindParam(3, $this->tb_boleto_venc_boleto);\n $stmt->bindParam(4, $this->tb_boleto_hash_boleto);\n $stmt->bindParam(5, $this->tb_boleto_hash_nfe);\n $stmt->bindParam(6, $this->tb_boleto_hash_sla);\n $stmt->bindParam(7, $this->tb_boleto_status_boleto);\n $stmt->bindParam(8, $this->tb_boleto_date);\n $stmt->bindParam(9, $this->tb_boleto_hour);\n \n $stmt->execute();\n }",
"public function store(Request $request)\n {\n Booking::create($request->input());\n return redirect()->action('BookingController@index');\n }",
"public function insert()\n {\n $this->id = insert($this);\n }",
"public function book()\n {\n// and creates a booking for each selected board. also updates the board\n// table with the relevant campaign name for every selected board\n\n if (empty($_POST)) {\n $_POST = json_decode(file_get_contents(\"php://input\"), true);\n\n}\n App::get('database')->insert('campaigns', [\n 'totalBoards' => $_POST['totalBoards'],\n 'totalPrice' => $_POST['totalPrice'],\n 'name' => $_POST['campaignName'],\n 'startDate' => $_POST['startDate'],\n 'endDate' => $_POST['endDate'],\n\n ]);\n\n foreach ($_POST['boardSelection'] as $board) {\n\n App::get('database')->insert('bookings', [\n 'startDate' => $_POST['startDate'],\n 'endDate' => $_POST['endDate'],\n 'users_name' => $_POST['user'],\n ]);\n App::get('database')->update('boards', [\n 'id' => $board,\n 'campaign_name' => $_POST['campaignName'],\n ]);\n\n }\n\n return ('complete');\n\n }",
"public function insertBook(Request $request) {\n\n $request->validate([\n 'title' => 'required',\n 'description' => 'required',\n 'genre' => 'required',\n 'isbn' => 'required'\n ]);\n\n $insertBook = new Libro;\n\n $insertBook->title = $request->title;\n $insertBook->description = $request->description;\n $insertBook->genre = $request->genre;\n $insertBook->isbn = $request->isbn;\n $insertBook->pdf = \"aa\";\n \n $insertBook->save();\n\n return(\"Libro guardado con exito\");\n }",
"function add_booksinn($params)\n {\n $this->db->insert('booksinn',$params);\n return $this->db->insert_id();\n }",
"public function insert($post);",
"public function addNewGig() {\n $user = $this->db->getUser('username', $_POST['username']); \n $begin_date = $_POST['begin_date'];\n $begin_time = $_POST['begin_time'];\n $begin = strtotime($begin_date . ' ' . $begin_time);\n \n $end_date = $_POST['end_date'];\n $end_time = $_POST['end_time'];\n $end = strtotime($end_date . ' ' . $end_time);\n \n $arr = array(\n 'user_id' => $user->get('id'),\n 'name' => $_POST['name'],\n 'begin' => $begin,\n 'end' => $end,\n 'location'=> $_POST['location'],\n );\n $location_id = $this->db->getLocationID($arr['location']);\n $arr['location_id'] = $location_id;\n $gig = new Gig($arr);\n $gig->save($this->db);\n header('Location: ' . route('gigs'));\n }",
"function create_hotel($hotel_data)\n\t{\n\t\t$this->db->insert('sb_hotels',$hotel_data);\n\t\treturn $this->db->insert_id();\n\t}",
"public function insert() {\n $conexion = StorianDB::connectDB();\n $insercion = \"INSERT INTO cuento (titulo, contenido, autor) VALUES (\\\"\".$this->titulo.\"\\\", \\\"\".$this->contenido.\"\\\", \\\"\".$this->autor.\"\\\")\";\n $conexion->exec($insercion);\n }",
"function insert() {\n\t\t$sql = \"INSERT INTO cost_detail (cd_fr_id, cd_seq, cd_start_time, cd_end_time, cd_hour, cd_minute, cd_cost, cd_update, cd_user_update)\n\t\t\t\tVALUES(?, ?, ?, ?, ?, ?, ?, ?, ?)\";\n\t\t$this->ffm->query($sql, array($this->cd_fr_id, $this->cd_seq, $this->cd_start_time, $this->cd_end_time, $this->cd_hour, $this->cd_minute, $this->cd_cost, $this->cd_update, $this->cd_user_update));\n\t\t$this->last_insert_id = $this->ffm->insert_id();\n\t}",
"public function insert()\n {\n \n }",
"public function insert()\n {\n }",
"public function insert()\n {\n }",
"public function store(Request $request)\n {\n $booking = new Booking();\n $booking->room_id = $request.get('room_id');\n $booking->payment_id = null;\n $booking->check_in_time = $request->get('check_in_time');\n $booking->check_out_time = $request->get('check_out_time');\n $booking->customer_id = null;\n $booking->confirmed = false;\n $booking->adult = $request->get('adult');\n $booking->children = $request->get('children');\n $booking->no_of_rooms = $request->get('no_of_rooms');\n\n $booking->save();\n\n return redirect()->action('BookingController@index')->with('status', 'Room booked successfully!');\n }",
"public function add_appointment(){\n $data = array(\n 'appointmentID' => $this->randomString_appointmentID(),\n 'counsellingID' => $this->input->post('counsellingID'),\n 'clientID' => $this->input->post('clientID'),\n 'psyID' => $this->input->post('psyID'),\n 'date' => $this->input->post('date'), //need to take care of, because the type is date\n 'time' => $this->input->post('time'),\n 'status' => $this->input->post('status')\n );\n\n $this->db->insert('appointment', $data);\n\t\treturn ($this->db->affected_rows() > 0); /* if success return true, false otherwise */\n }",
"public function insert()\n {\n # code...\n }",
"public function insert(){\n\t\t// $post->title = 'A post from the insert method';\n\t\t// $post->body = 'Some random ghibberrish';\n\t\t// $post->save();\n\n\t\t$data = array(\n\t\t\t'title' => 'A post from the insert method, using the data array',\n\t\t\t'body' => 'Some random ghibberrish, using the data array',\n\t\t\t'user_id' => 1\n\t\t);\n\n\t\tPost::create($data);\n\n\t\tdd('post inserted');\n\t}"
] | [
"0.72324854",
"0.7022042",
"0.6997521",
"0.6811457",
"0.6730472",
"0.65867186",
"0.65729856",
"0.6424492",
"0.64137965",
"0.63904387",
"0.63881373",
"0.637843",
"0.63579226",
"0.6351279",
"0.6337271",
"0.6236255",
"0.62203753",
"0.6162544",
"0.6160961",
"0.61572355",
"0.61406255",
"0.6131232",
"0.61247706",
"0.6096146",
"0.6091644",
"0.6089519",
"0.6072917",
"0.6062389",
"0.6045828",
"0.60400546",
"0.6033324",
"0.6030478",
"0.60139",
"0.60070497",
"0.59719616",
"0.5969481",
"0.5968327",
"0.5966738",
"0.59523",
"0.5948957",
"0.59458494",
"0.5944771",
"0.5940112",
"0.5939242",
"0.59253496",
"0.59238154",
"0.59166574",
"0.5916213",
"0.5910162",
"0.5904327",
"0.59035623",
"0.5901505",
"0.5901257",
"0.5899323",
"0.5897761",
"0.5893916",
"0.5884409",
"0.587869",
"0.58731526",
"0.58675617",
"0.5864738",
"0.5854137",
"0.58531046",
"0.58531046",
"0.5850168",
"0.58479345",
"0.584625",
"0.5841289",
"0.58346725",
"0.5832775",
"0.5821791",
"0.5815718",
"0.5805681",
"0.5798705",
"0.57963115",
"0.57890004",
"0.5785069",
"0.5773654",
"0.5765537",
"0.5764242",
"0.5764071",
"0.5763248",
"0.5759005",
"0.5755646",
"0.57522434",
"0.5751617",
"0.5751291",
"0.57507366",
"0.5747655",
"0.57464254",
"0.5739849",
"0.5738911",
"0.5738879",
"0.5738762",
"0.5735247",
"0.5735247",
"0.5732242",
"0.5726302",
"0.5721625",
"0.5716172"
] | 0.7374026 | 0 |
Updates a booking from the database | function wpbs_update_booking($booking_id, $data)
{
return wp_booking_system()->db['bookings']->update($booking_id, $data);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function updateBooking(Request $request, $id)\n{\n $booking = Booking::find($id);\n $booking->update($request->all());\n\n $response = [\n 'message'=>'Update Succesfully',\n 'booking' => $booking,\n \n \n ];\n\n return response($response); \n}",
"public function update(Request $request, Booking $booking)\n {\n //\n }",
"public function update(Request $request, Booking $booking)\n {\n //\n }",
"public function update(Request $request, Booking $booking)\n {\n //\n }",
"public function update(Request $request, Booking $booking)\n {\n //\n }",
"public function update(Request $request, Booking $booking)\n {\n //\n }",
"public function updateBookingStatus(){\n $command = Yii::$app->db->createCommand();\n $id= Yii::$app->request->bodyParams[\"booking2\"];\n\n try {\n $command->update('car', ['pendingTime' => 'on', 'inUse' => 'pending'], 'id = '.$id)->execute();\n } catch (Exception $e) {\n printf(\"Cannot update data\");\n }\n }",
"public function update() {\n $bookingJson = array(\n 'adults' => $this->getAdults(),\n 'children' => $this->getChildren(),\n 'infants' => $this->getInfants()\n );\n $response = \\tabs\\api\\client\\ApiClient::getApi()->put(\n \"/booking/{$this->getBookingId()}\",\n array(\n 'data' => json_encode($bookingJson)\n )\n );\n if ($response->status !== 204) {\n throw new \\tabs\\api\\client\\ApiException(\n $response,\n 'Could not update booking'\n );\n }\n\n return $this;\n }",
"public function update(SaveBookingRequest $request, Booking $booking)\n {\n return DB::transaction(function () use ($request, $booking) {\n $request->merge([\n 'total_weight' => numeric(array_sum(array_column($request->input('goods', []), 'weight'))),\n 'total_gross_weight' => numeric(array_sum(array_column($request->input('goods', []), 'gross_weight'))),\n ]);\n $booking->fill($request->input());\n $booking->save();\n\n // sync booking containers\n $excluded = collect($request->input('containers', []))->filter(function ($container) {\n return !empty($container['id']);\n });\n $booking->bookingContainers()->whereNotIn('id', $excluded->pluck('id'))->delete();\n foreach ($request->input('containers', []) as $container) {\n $booking->bookingContainers()->updateOrCreate(\n ['id' => data_get($container, 'id')],\n $container\n );\n }\n\n // sync booking goods\n $excluded = collect($request->input('goods', []))->filter(function ($item) {\n return !empty($item['id']);\n });\n $booking->bookingGoods()->whereNotIn('id', $excluded->pluck('id'))->delete();\n foreach ($request->input('goods', []) as $item) {\n $booking->bookingGoods()->updateOrCreate(\n ['id' => data_get($item, 'id')],\n $item\n );\n }\n\n return response()->json([\n 'status' => 'success',\n 'data' => $booking,\n 'message' => __(\"Booking :number successfully updated\", [\n 'number' => $booking->booking_number\n ])\n ]);\n });\n }",
"public function myBookingEdit(Request $request)\n {\n $bookingService = BookingService::select()\n ->where('bookingCode', '=', $request->get('bookingCode'))\n ->first();\n\n $tourDate = Carbon::createFromFormat('d/m/Y', $request->get('tourDate'))->format('Y-m-d'); \n \n $bookingService->countAdult = $request->get('countAdult');\n $bookingService->countChild = $request->get('countChild');\n $bookingService->tourDate = $tourDate;\n $bookingService->userRequirement = $request->get('userRequirement');\n $bookingService->totalPrice = $request->get('totalPrice');\n\n // Update to DB\n $bookingService->save();\n\n return response()->json(['success'=>'Booking Edit']);\n }",
"public function edit(Booking $booking)\n {\n //\n }",
"public function edit(Booking $booking)\n {\n //\n }",
"public function edit(Booking $booking)\n {\n //\n }",
"public function edit(Booking $booking)\n {\n //\n }",
"public function edit(Booking $booking)\n {\n //\n }",
"public function edit(Booking $booking)\n {\n //\n }",
"public function update(Request $request, Booking $booking)\n {\n $request->validate([\n 'name' => 'nullable|string',\n 'start_date' => 'nullable|date',\n 'end_date' => 'nullable|date',\n 'customer_full_name' => 'nullable|string',\n 'customer_email' => 'nullable|string',\n 'user_id' => 'nullable|numeric',\n 'room_id' => 'nullable|numeric',\n ]);\n\n $start_date = Carbon::parse($request->start_date ?? $booking->start_date);\n $end_date = Carbon::parse($request->end_date ?? $booking->end_date);\n\n if($start_date->greaterThan($end_date)) {\n $errorMessage = array(\n 'status' => 'error',\n 'message' => 'Check-in date cannot be greater than checkout date!'\n );\n return response()->json($errorMessage, 500);\n }\n\n $conflicting_bookings = $this->get_conflicting_bookings($start_date, $end_date);\n\n $conflicting_bookings_without_current_booking = $conflicting_bookings->where('id', '!=', $booking->id);\n\n if(!$conflicting_bookings_without_current_booking->isEmpty()) {\n $errorMessage = array(\n 'status' => 'error',\n 'message' => 'Attempting to book room on occupied dates!'\n );\n return response()->json($errorMessage, 500);\n }\n\n if(Auth::user()) {\n $request->merge(['user_id'=> Auth::user()->id]);\n }\n if($booking->update($request->all())) {\n return response()->json($booking);\n }\n }",
"public function update(Request $request, BookingRoom $bookingRoom)\n {\n //\n }",
"public function update($id)\n\t{\n\t\t$booking = Booking::findOrFail($id);\n\n\t\t$validator = Validator::make($data = Input::all(), Booking::$rules);\n\n\t\tif ($validator->fails())\n\t\t{\n\t\t\treturn Redirect::back()->withErrors($validator)->withInput();\n\t\t}\n\n\t\t$client = Client::findOrFail(Input::get('client_id'));\n\t\t$car = Car::findOrFail(Input::get('car_id'));\n\n\t\t$booking->client()->associate($client);\n\t\t$booking->car()->associate($car);\n\t\t$booking->destination = Input::get('destination');\n\t\t$booking->date_out = Input::get('date_out');\n\t\t$booking->date_back = Input::get('date_back');\n\t\t$booking->branch = Input::get('branch');\n\t\t$booking->update();\n\n\t\treturn Redirect::route('bookings.index');\n\t}",
"public function update(Request $request, $id)\n {\n $request->validate([\n 'seatno' => 'required',\n 'price' => 'required',\n 'date' => 'required' \n ]);\n $booking = Booking::find($id);\n $booking->route_id = 1;\n $booking->seat_no = request('seatno'); \n $booking->total_price = request('price'); \n $booking->dept_date = request('date');\n $booking->save();\n\n // return\n return redirect()->route('bookings.index'); \n }",
"public function update(Request $request, Booking $booking)\n {\n \\App\\Booking::whereId($booking->id)->update([\n 'booking_status'=>$request->input('booking_status')\n ]);\n $client_id=\\App\\Booking::whereClient_id($booking->client_id)->first()->client_id;\n\n $client=DB::table('bookings')\n ->join('clients','clients.id','=','bookings.client_id')\n ->where('bookings.client_id','=',$client_id)\n ->select('clients.*')\n ->first();\n \n if($request->input('booking_status')=='confirmed')\n {\n $subject = 'Booking number ['.$booking->id.'] confirmed !';\n Flashy::message($subject);\n Mail::to($client->email)->send(new BookingStatus($subject)); \n }else{\n $subject = 'Booking number ['.$booking->id.'] cancelled !';\n Flashy::error($subject);\n Mail::to($client->email)->send(new BookingStatus($subject)); \n }\n\n return redirect()->route('bookings.index'); \n \n }",
"public function update(BookingFormRequest $request, $id)\n {\n $validated = $request->validated();\n $booking = Booking::find($id);\n $booking->guest_full_name = $validated['guest_full_name'];\n $booking->guest_credit_card = $validated['guest_credit_card'];\n $booking->room = $validated['room'];\n $booking->from_date = $validated['from_date'];\n $booking->to_date = $validated['to_date'];\n $booking->more_details = $validated['more_details'];\n\n $booking->Save();\n return view('bookings.edit_booking_success', compact('booking'));\n\n\n\n }",
"public function update(UpdateBooking $request, $id)\n {\n //delete old items and enter new\n BookingItem::where('booking_id', $id)->delete();\n\n $services = $request->cart_services;\n $quantity = $request->cart_quantity;\n $prices = $request->cart_prices;\n $discount = $request->cart_discount;\n $payment_status = $request->payment_status;\n $discountAmount = 0;\n $amountToPay = 0;\n\n $originalAmount = 0;\n $bookingItems = array();\n\n foreach ($services as $key=>$service){\n $amount = ($quantity[$key] * $prices[$key]);\n\n $bookingItems[] = [\n \"business_service_id\" => $service,\n \"quantity\" => $quantity[$key],\n \"unit_price\" => $prices[$key],\n \"amount\" => $amount\n ];\n\n $originalAmount = ($originalAmount + $amount);\n }\n\n\n $booking = Booking::find($id);\n\n $taxAmount = 0;\n if($booking->tax_amount > 0){\n $taxAmount = $booking->tax_amount;\n }\n\n if($discount > 0){\n if($discount > 100) $discount = 100;\n\n $discountAmount = (($discount/100) * $originalAmount);\n }\n\n $amountToPay = ($originalAmount - $discountAmount + $taxAmount);\n $amountToPay = round($amountToPay, 2);\n\n\n $booking->date_time = $request->booking_date.' '.Carbon::createFromFormat('h:i A', $request->booking_time)->format('H:i:s');\n $booking->status = $request->status;\n $booking->employee_id = ($request->employee_id != '') ? $request->employee_id : null ;\n $booking->original_amount = $originalAmount;\n $booking->discount = $discountAmount;\n $booking->discount_percent = $request->cart_discount;;\n $booking->amount_to_pay = $amountToPay;\n $booking->payment_status = $payment_status;\n $booking->save();\n\n foreach ($bookingItems as $key=>$bookingItem){\n $bookingItems[$key]['booking_id'] = $booking->id;\n }\n\n DB::table('booking_items')->insert($bookingItems);\n\n $view = view('admin.booking.show', compact('booking'))->render();\n\n return Reply::successWithData('messages.updatedSuccessfully', ['status' => 'success', 'view' => $view]);\n }",
"public function update(Request $request)\n {\n if(is_array($request->id_booking)){\n for($i=0;$i<sizeof($request->id_booking);$i++){\n self::updateBooking($request->id_booking[$i],$request->user_id[$i],$request->house[$i],$request->room[$i],$request->date_from[$i],$request->date_to[$i],$request->status[$i],$request->mode[$i],$request->note[$i]);\n }\n }\n else{\n self::updateBooking($request->id_booking,$request->user_id,$request->house,$request->room,$request->date_from,$request->date_to,$request->status,$request->mode,$request->note);\n }\n return redirect(\"/booking\");\n }",
"public function update(BookingRequest $request, $id)\n {\n $this->authorize('update', Booking::class);\n\n $booking = Booking::find($id);\n\n $data = $request->validated();\n\n $booking->update($data);\n\n return $this->respond(\n 'Booking Updated Successfully',\n fractal(\n Booking::where('id' , $booking->id)->first(),\n new BookingTransformer()\n )\n );\n }",
"public function update(BookingRequest $request, $id)\n {\n return $this->bookingRepository->update($request->all(), $id);\n }",
"public function update(Request $request, $id)\n {\n if(Auth::check()){\n $booking = bookings::find($id);\n $booking -> confirm_price = request()-> confirm_price;\n $booking -> admin_msg = request()-> admin_msg;\n $booking -> status = 'acknowledge';\n $booking -> save();\n return redirect(route('manage_booking.index'))->with('status','Booking Replying Successfully!');\n }else{\n return redirect(route('login'));\n }\n\n }",
"public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'book_status' => 'required',\n ]);\n\n //Edit Booking\n $booking = Booking::find($id);\n $booking->book_status = $request->input('book_status');\n \n $booking->save();\n\n return redirect('/bookings')->with('success', 'Booking Updated');\n }",
"public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'booking_code' => 'required',\n 'order_date' => 'required',\n 'rental_date' => 'required',\n 'return_date' => 'required',\n 'price' => 'required',\n 'status' => 'required',\n 'fine' => 'required',\n 'car_id' => 'required',\n 'client_id' => 'required'\n ]);\n\n $insert = [\n 'booking_code'=> $request->booking_code,\n 'order_date'=> $request->order_date,\n 'rental_date'=> $request->rental_date,\n 'return_date'=> $request->return_date,\n 'price'=> $request->price,\n 'status'=> $request->status,\n 'fine'=> $request->fine,\n 'car_id'=> $request->car_id,\n 'client_id'=> $request->client_id\n ];\n\n $datas = Booking::where('id', $id)->update($insert);\n return redirect()->route('booking.index');\n }",
"public function update(Tool $tool, Booking $booking, Request $request)\n {\n $this->validate($request, [\n 'start' => 'required|date',\n 'end' => 'required|date',\n ]);\n\n $start = new Carbon($request->start);\n $end = new Carbon($request->end);\n\n $response = $this->bookingManager->update($tool, $booking, $start, $end);\n\n if (is_string($response)) {\n // response is some sort of error\n return response()->json($response, IlluminateResponse::HTTP_UNPROCESSABLE_ENTITY);\n } else {\n // response is the new booking object\n return response()->json($response, IlluminateResponse::HTTP_OK);\n }\n }",
"public function update(UpdateRequest $request, Booking $booking)\n {\n $booking->load(\n 'tour',\n 'tour.tourOptions',\n 'ticketOptions',\n 'bookingTickets',\n 'bookingTickets.ticket',\n // 'ticketOptions.tourOption',\n 'schedule',\n 'schedule.user',\n 'schedule.excursion'\n );\n\n $validated = $request->validated();\n $beforeSnapshot = Logging::bookingSnapshot($booking);\n\n $this->isValidTicketsQuantity($booking, $validated['tickets_list']);\n\n $beforeTotalPrice = $booking->bookingTickets->sum(function ($bookingTicket) {\n return $bookingTicket->getPrice();\n });\n\n DB::transaction(function () use ($booking, $validated, $beforeTotalPrice) {\n $booking->fill($validated);\n $booking->save();\n\n $currentUser = auth()->user();\n\n if (!empty($validated['comment'])) {\n $currentUser->comment($booking, $validated['comment']);\n }\n\n $bookingTickets = $booking->saveBookingTickets($validated['tickets_list']);\n\n $ticketOptions = TicketOption::whereIn('ticket_id', $bookingTickets->pluck('ticket_id'))\n ->whereIn('tour_option_id', $validated['options_list'])->get();\n\n $booking->ticketOptions()->sync($ticketOptions->pluck('id'));\n\n foreach($bookingTickets as $item) {\n $item->calculatePrice();\n }\n\n $booking->load('bookingTickets');\n\n if (!$currentUser->isAdmin() || !$currentUser->hasTourConciergeRole()) {\n $totalPrice = $booking->bookingTickets->sum(function ($bookingTicket) {\n return $bookingTicket->getPrice();\n });\n\n abort_if($beforeTotalPrice < $totalPrice, 422);\n }\n\n\n }, 2);\n\n $booking->fresh();\n $booking->load(\n 'tour',\n 'tour.tourOptions',\n 'ticketOptions',\n 'bookingTickets.ticket',\n 'ticketOptions.tourOption',\n 'schedule',\n 'schedule.user',\n 'schedule.excursion'\n );\n\n Logging::booking($booking, $beforeSnapshot);\n\n return [\n 'data' => [\n 'view' => new Resource($booking)\n ]\n ];\n }",
"public function update(Request $request, $id)\n {\n //\n $direct_booking = DirectBooking::find($id);\n if($direct_booking) {\n $updatedBooking = $direct_booking->update($request->all());\n $getUpdatedBooking = DirectBooking::find($id);\n $response = [\n 'success' => true,\n 'message' => 'Booking successfully updated!!',\n 'data' => $getUpdatedBooking,\n ];\n return response()->json($response, 200);\n } else {\n return response()->json(\n [\n 'success'=> false,\n 'message' => 'Booking not updated',\n ],\n 500);\n \n \n }\n }",
"public function update(Request $request, $id)\n\t{\n\t\t$booking = Booking::findOrFail($id);\n\n\t\t$validator = \\Validator::make($data = \\Request::all(), Booking::$rules);\n\n\t\tif ($validator->fails())\n\t\t{\n\t\t\treturn \\Redirect::back()->withErrors($validator)->withInput();\n\t\t}\n\n\t\t$booking->update($data);\n\n\t\tif ($request->filled('resolution_id')) {\n\t\t $resolution = Resolution::findOrFail($request->input('resolution_id'));\n\t\t $resolution->booking_id = $id;\n\t\t $resolution->save();\n\n Payment::where('resolution_id', $request->input('resolution_id'))\n ->where('type_id', PaymentType::ID_RESOLUTION)\n ->update(['booking_id' => $id]);\n } else {\n\t\t Resolution::where('booking_id', $id)->update(['booking_id' => null]);\n\t\t Payment::where('booking_id', $id)\n ->where('type_id', PaymentType::ID_RESOLUTION)\n ->update(['booking_id' => null]);\n }\n\n\t\treturn \\Redirect::route('bookings');\n\t}",
"public function update($data,$id){\n\t\t\n\t\t $this->db->where($this->pro->booking.\"_id\",$id);\n\t\t return $edit = $this->db->update($this->pro->prifix . $this->pro->booking,$data);\n\t}",
"function confirmseatdetails()\n {\n \n $b_id=$this->input->post('bid');\n $qry=\"update booking_tbl set Status='Booked' where Booking_id='$b_id'\";\n $qry=$this->db->query($qry);\n \n\n }",
"public function update(Request $request, book $book)\n {\n \n }",
"public function update(Request $request, $id)\n {\n $booking=Booking::findOrFail($id);\n $booking->check_in=$request->check_in;\n $booking->pelanggan_id=$request->pelanggan_id;\n $booking->kamar_id=$request->kamar_id;\n $booking->check_out=$request->check_out;\n $booking->save();\n return redirect()->route('booking.index')->with(['message'=>'Data Berhasil Di Update']);\n }",
"public function update(Request $request, BookTour $bookTour)\n {\n //\n }",
"public function testUpdate()\n\t{\n\t\t$this->resetReservationTable();\n\t\t$this->resetDateTimes();\n\t\t\n\t\t$reservation = new Reservation();\n\t\t$reservation->setAttributes(array(\n\t\t\t\t'roomid' => 1,\n\t\t\t\t'datefrom' => $this->_dateOverlapFrom,\n\t\t\t\t'numberofnights'=> $this->_numberofnights,\n\t\t\t\t));\n\t\t$reservation->save(false);\t\n\t\t$newDateTo = DateTime::createFromFormat('Y-m-d',$this->_dateOverlapToObj->format('Y-m-d'));;\n\t\t$newDateTo->add(new DateInterval('P10D'));\n\n\n\t\t$reservation = Reservation::model()->findByPk($reservation->getAttribute('id'));\n\t\t$reservation->setAttribute('dateto',$newDateTo->format('Y-m-d'));\n\t\t$reservation->setAttribute('confirmreservation',true);\n\t\t\n\t\t//must run validation rules\n\t\t$this->assertTrue($reservation->save());\n\t\n\t\t\n\t\t$reservation = Reservation::model()->findByPk($reservation->getAttribute('id'));\n\t\t$this->assertEquals($newDateTo->format('Y-m-d'),$reservation->dateto);\t\n\n\t\t\n\t}",
"public function update(Book $book)\n {\n $user = auth()->user()->id;\n $book->available = $book->available - 1;\n $book->save();\n \n $date = strtotime(date('Y/m/d'));\n $date = strtotime(\"+7 day\", $date);\n $return_date = date('Y/m/d', $date);\n \n\n Rent::create([\n 'name' => $book->name,\n 'student_id' => $user,\n 'rent_date' => date('Y-m-d'),\n 'return_date' => $return_date\n ]);\n \n return redirect('/user/rented');\n }",
"public function addBooking($booking){\n \n }",
"public function updateAvailable(Request $request, Book $book)\n {\n $updated_book = Book::find($book) ->first();\n/* $updated_book->available = $request->available ; */\n $updated_book->update(['available'=>$request->available]);\n return response()->json([\n 'status_code' => 200,\n 'message' => $updated_book,\n ]);\n }",
"public function update(Request $request, $id)\n {\n //\n \n $app_user_id = Auth::user()->id;\n \n $booking_id = $id;\n $approval = $request->input('approval');\n $approval_pickup_time = $request->input('approval_pickup_time');\n $approval_return_time = $request->input('approval_return_time');\n $driver_id = $request->input('driver_id');\n $plate_no = $request->input('plate_no');\n $approver_description = $request->input('approver_description');\n \n\n if($approval===false||$approval==false||$approval==\"false\"){\n try{\n DB::statement(DB::raw(\"update bookings set approval = $approval, approver_description =\n '$approver_description',approver_user_id=$app_user_id,updated_at=now() where booking_id = $id\"));\n if(App::getLocale()=='fa'){\n return \"رزرو را رد نمودید\"; \n }\n return \"you have rejected the booking\";\n\n } catch(QueryException $e){\n return $e->getMessage();\n }\n \n }else{\n \n if($approval == true || $approval ==\"true\"|| $approval === true){\n $rules = array(\n 'approval_pickup_time' => 'required|date',\n 'approval_return_time' => 'required|date|after:approval_pickup_time',\n 'driver_id' => 'required',\n 'plate_no' => 'required',\n );\n $validator = Validator::make($request->all(),$rules);\n if($validator->fails()){\n return $validator->errors()->toArray();\n }\n else{\n try{\n DB::statement(DB::raw(\"update bookings set plate_no=$plate_no, approval =$approval,approval_pickup_time='$approval_pickup_time'\n ,approval_return_time='$approval_return_time',driver_id=$driver_id,approver_description = '$approver_description',approver_user_id=$app_user_id,\n updated_at=now() where \n booking_id=$id\"));\n if(App::getLocale()=='fa'){\n return \"موفقانه تصویب گردید.\";\n }\n return \"successfully approved\";\n }\n catch(QueryException $e){\n return $ex->getMessage();\n }\n }\n }\n }\n }",
"public function update(Request $request, Borrower $borrower)\n {\n \n $borrower->user_id = Auth::user()->id;\n $borrower->book_id = $request->book_id; \n $borrower->customer_id = $request->customer_id;\n $borrower->issued_at = $request->issued_at;\n $borrower->return_at = $request->return_at;\n $borrower->status = $request->status;\n\n if ($borrower->save()){\n $book = Book::find($request->book_id);\n if ($request->status == 'Returned'){\n $book->status = 'Available';\n } else{\n $book->status = $request->status;\n }\n\n $book->save();\n\n return redirect()->route('borrowers.index')\n ->with('success','Borrower updated successfully');\n } else{\n return redirect()->route('borrowers.edit',$borrower)\n ->withError('Whoops! Something went wrong. Record not saved, try again later.');\n }\n }",
"public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'nume' => 'required',\n 'body' => 'required'\n ]);\n \n \n // Create Booking\n\n $booking = Booking::find($id) ;\n $booking->title = $request->input('nume');\n $booking->body = $request->input('body');\n $booking->save();\n\n return redirect('/bookings')->with('success', 'Boooking Updated');\n }",
"public function update(Request $input, $id)\n {\n $this->validate($input, [\n 'meeting_date'=>'required', \n 'meeting_start_time'=>'required',\n 'meeting_end_time'=>'required',\n 'purpose'=>'required',\n 'meeting_room'=>'required',\n ]);\n $bookingUpdate = bookings::find($id);\n $bookingUpdate->meeting_date = $input->meeting_date;\n $bookingUpdate->meeting_start_time = $input->meeting_start_time;\n $bookingUpdate->meeting_end_time = $input->meeting_end_time;\n $bookingUpdate->purpose = $input->purpose;\n $bookingUpdate->meeting_room = $input->meeting_room;\n // echo $post;\n $bookingUpdate->save();\n $bookings = bookings::all();\n if (Auth::user()->role=='user'){\n return view('welcome')->with('bookings', $bookings);\n }elseif (Auth::user()->role=='teamlead') {\n return view('teambookings')->with('bookings', $bookings);\n }else{\n return view('admindashboard')->with('bookings', $bookings);\n }\n // echo \"string\";\n }",
"public function update(Request $request, Book $book)\n {\n //\n }",
"public function update(Request $request, Book $book)\n {\n //\n }",
"public function update(Request $request, Book $book)\n {\n //\n }",
"public function update(Request $request, Book $book)\n {\n //\n }",
"public function update(Request $request, Book $book)\n {\n //\n }",
"public function update(Request $request, Book $book)\n {\n //\n }",
"public function update(Request $request, Book $book)\n {\n //\n }",
"public function update(Request $request, Book $book)\n {\n //\n }",
"public function update($meeting)\n {\n\n }",
"public function update(Store $request, $id)\n {\n $user = Auth::user();\n $booking = Booking::query()->find($id);\n if ($request->total_person > $booking->room->room_capacity) {\n return redirect()->back()->with('danger', \"Total person is more than the room's capacity!\");\n } else {\n $booking->update([\n 'total_person' => $request->total_person,\n 'note' => $request->note,\n 'booking_time' => $request->booking_time,\n 'check_in_time' => date_create($request->booking_time)->setTime(9, 00),\n 'check_out_time' => date_create($request->booking_time)->setTime(16, 00)\n ]);\n Mail::to($user->email)->send(new BookingUpdateMail());\n return redirect('user/bookings')->with('message', 'Your booking has been updated!');\n }\n }",
"public function update(Request $request, AvailableHotel $availableHotel)\n {\n //\n }",
"public function update(Request $request, book $book)\n {\n //\n }",
"public function seatBooking() {\n $id = $this->input->get('id');\n if ($this->input->post('submit', TRUE)) {\n $tdata = array(\n 'student_id' => $this->db->escape_like_str($this->input->post('studentId', TRUE)),\n 'student_name' => $this->db->escape_like_str($this->input->post('sudentName', TRUE)),\n 'class' => $this->db->escape_like_str($this->input->post('class_id', TRUE)),\n 'roll_number' => $this->db->escape_like_str($this->input->post('roll', TRUE))\n );\n $this->db->where('id', $id);\n if ($this->db->update('dormitory_bed', $tdata)) {\n redirect('dormitory/dormitoryReport', 'refresh');\n }\n } else {\n $this->load->view('temp/header');\n $this->load->view('seatBook');\n $this->load->view('temp/footer');\n }\n }",
"function wpbs_update_booking_meta($booking_id, $meta_key, $meta_value, $prev_value = '')\n{\n\n return wp_booking_system()->db['bookingmeta']->update($booking_id, $meta_key, $meta_value, $prev_value);\n\n}",
"public function update(Request $request, Transaction $transaction)\n {\n\n abort_unless(Gate::allows('update',$transaction), 403);\n \n $request->validate([\n\n //transaction table\n 'first_name' => 'required|min:3',\n 'last_name' => 'required|min:3', \n 'email'=> 'email:rfc,dns',\n 'contact_no' => 'required',\n 'address' => 'required',\n 'country' => 'required',\n\n //bookings table\n 'checkin' => 'required',\n 'checkout' => 'required',\n //'room_type_id' => 'required',\n //'no_of_rooms' => 'required',\n //'adult' => 'required',\n //'child' => 'required',\n ]);\n\n $room_type_ids = $request['room_type_id'];\n\n for($i=0;$i<count($room_type_ids);$i++) \n {\n $flagroomAvailable = $this->check_availability($request['checkin'],$request['checkout'],$room_type_ids[$i],$request['no_of_rooms'.$room_type_ids[$i]]);\n //echo \"Room Id \".$room_type_ids[$i];\n //echo \"Room Available \".$flagroomAvailable;\n if(!$flagroomAvailable)\n {\n break;\n }\n\n }\n\n if($flagroomAvailable)\n {\n $transaction->update([\n 'first_name' => $request['first_name'],\n 'last_name' => $request['last_name'], \n 'email' => $request['email'],\n 'contact_no' => $request['contact_no'],\n 'address' => $request['address'],\n 'country' => $request['country'],\n 'payment_method' => $request['payment_method']\n ]);\n\n $deletedRows = Booking::where('transaction_id', $transaction->transaction_id)->delete();\n print_r($deletedRows);\n\n for($i=0;$i<count($room_type_ids);$i++) \n {\n $booking = new Booking([\n 'transaction_id' => $transaction->transaction_id, \n 'from_date' => $request['checkin'],\n 'to_date' => $request['checkout'],\n 'room_type_id' => $room_type_ids[$i],\n 'no_of_rooms' => $request['no_of_rooms'.$room_type_ids[$i]],\n 'adult' => $request['adult'.$room_type_ids[$i]],\n 'child' => $request['child'.$room_type_ids[$i]],\n 'status' => \"confirmed\"\n ]);\n $booking->save();\n\n }\n\n\n\n return $this->booking_list()->with(\n [\n 'message_success' => \"Booking of <b>\" . $transaction->first_name . \"</b> is updated.\"\n ]\n );\n }\n else\n {\n return $this->booking_list()->with(\n [\n 'message_success' => \"Rooms NOT available.\"\n ]\n );\n }\n }",
"public function update(ReservationRequest $request, $id)\n {\n try {\n //return $request;\n\n DB::beginTransaction();\n $appointment =Appointment::findOrfail($request->id);\n\n $DoctorSchedule =DoctorSchedule::findOrfail($appointment->doctor_id);\n // return $DoctorSchedule;\n\n $DoctorSchedule->update([\n 'doctor_id' => (int)$request->doctor_id,\n 'scheduleDate' => $request->scheduleDate,\n 'startTime' => $request->startTime,\n 'endTime' => $request->endTime,\n 'bookAvailable' => $request->bookAvailable,\n ]);\n\n $appointment->update([\n 'doctor_id' => (int)$DoctorSchedule->id,\n 'name' => $request->name,\n 'phone' => $request->phone,\n ]);\n\n\n DB::commit();\n return redirect()->Back()->with(['success' => 'تم ألاضافة بنجاح']);\n\n } catch (\\Exception $ex) {\n DB::rollback();\n return redirect()->route('DoctorSchedule.index')->with(['error' => 'حدث خطا ما برجاء المحاوله لاحقا']);\n }\n }",
"public function update(Request $request)\n {\n $validator = Validator::make($request->all(), [\n 'id' => 'required',\n 'item_name' => 'required|min:3|max:255',\n 'item_number' => 'required|min:1|max:3',\n 'item_amount' => 'required|min:1|max:6',\n 'published' => 'required',\n ]);\n\n if ($validator->fails()) {\n return redirect('/')->withInput()->withErrors($validator);\n }\n\n $book = Book::where('user_id', Auth::user()->id)->find($request->id);\n $book->item_name = $request->item_name;\n $book->item_number = $request->item_number;\n $book->item_amount = $request->item_amount;\n $book->published = $request->published;\n $book->save();\n\n return redirect('/');\n }",
"function update_passenger_record($book_id, $sindex, $status) {\r\n\t\t$cond ['app_reference'] = $book_id;\r\n\t\t$cond ['segment_indicator'] = $sindex;\r\n\t\t\r\n\t\t$data ['status'] = $status;\r\n\t\t$CI = & get_instance ();\r\n\t\t\r\n\t\t$CI->custom_db->update_record ( 'flight_booking_passenger_details', $data, $cond );\r\n\t}",
"public function update(Request $request, Book $book)\n {\n // Book::where('id', $book)->update($request->all());\n\n $input = $request->all();\n $book->find('id');\n $book->update($input);\n\n return redirect()->route(\"books.index\")\n ->with('success',$book->book_name.' Update Successfully');\n }",
"public function updated(ReservationPayment $ReservationPayment)\n {\n //\n }",
"public function update(Request $request, Reservation $reservation)\n {\n //\n }",
"public function update(Request $request, Reservation $reservation)\n {\n //\n }",
"public function update(Request $request, Reservation $reservation)\n {\n //\n }",
"public function update(Request $request, Reservation $reservation)\n {\n //\n }",
"public function update(Request $request, Book $book)\n {\n \n $this->validate(request(),[\n 'kode_buku' => 'required',\n 'judul_buku' => 'required',\n 'tahun_terbit' => 'required',\n 'penulis' => 'required',\n 'stok' => 'required',\n ]);\n\n\n $book->kode_buku = $request->kode_buku;\n $book->judul_buku = $request->judul_buku;\n $book->tahun_terbit = $request->tahun_terbit;\n $book->penulis = $request->penulis;\n $book->stok = $request->stok;\n\n $book->save();\n\n return redirect()->route('books.index');\n }",
"public function update(Request $request, $book)\n {\n $rules = [\n 'partid' => 'required',\n 'title' => 'required',\n 'description' => 'required',\n 'author' => 'required',\n 'year' => 'required',\n ];\n\n $valideted = $this->validate($request, $rules);\n\n $partid = $valideted['partid'];\n $title = $valideted['title'];\n $description = $valideted['description'];\n $author = $valideted['author'];\n $year = $valideted['year'];\n\n DB::update(\"update books\n set title='$title', cat_id='$partid', description='$description', author='$author', year='$year'\n where slug='$book'\");\n\n return redirect('/admin/parts');\n }",
"public function update() {\n\t\tTournamentDBClient::update($this);\n\t}",
"public function update()\n\t{\n\t\ttry\n\t\t{\n\t\t\t$sql = 'UPDATE class SET ';\n\n\t\t\tif(isset($this->_year))\n\t\t\t\t$sql.=' year = :year,';\n\n\t\t\tif(isset($this->_section))\n\t\t\t\t$sql.=' section = :section';\n\t\t\telse\n\t\t\t\t$sql = substr_replace($sql, '', -1);\n\t\t\t\n\t\t\t$sql.=' WHERE id = :id';\n\n \t\t$data = [\n\t\t\t 'id' => $this->_id,\n\t\t\t 'year' => $this->_year,\n\t\t\t 'section' => $this->_section,\n\t\t\t];\n\n\t \t$stmt = $this->db->prepare($sql);\n\t \t$stmt->execute($data);\n\t\t\t$status = $stmt->rowCount();\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\theader(\"HTTP/1.0 400 Bad request\");\n\t\t\techo $e;\n\t\t}\n\t}",
"public function updateBooking($param) { \n if (!$this->aaa->has_right('openruth', 500))\n $res->bookingError->_value = 'authentication_error';\n else {\n $agencyId = self::strip_agency($param->agencyId->_value);\n $targets = $this->config->get_value('ruth', 'ztargets');\n if ($tgt = $targets[$agencyId]) {\n $book = &$booking->BookingUpdate->_value;\n $book->LibraryNo->_value = $agencyId;\n $book->DisposalID->_value = $param->bookingId->_value;\n $book->BookingNote->_value = $param->bookingNote->_value;\n $book->StartDate->_value = self::to_zruth_date($param->bookingStartDate->_value);\n $book->EndDate->_value = self::to_zruth_date($param->bookingEndDate->_value);\n $book->NumberOrdered->_value = $param->bookingTotalCount->_value;\n $book->ServiceCounter->_value = $param->agencyCounter->_value;\n $xml = '<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?'.'>' . utf8_decode($this->objconvert->obj2xml($booking));\n $z = new z3950();\n $z->set_target($tgt['host']);\n $z->set_database($tgt['database'].'-ophelia');\n $z->set_authentication($tgt['authentication']);\n if ($tgt['proxy']) {\n $z->set_proxy($tgt['proxy']);\n }\n $xml_ret = $z->z3950_xml_update($xml, $tgt['timeout']);\n//echo 'error: ' . $z->get_errno();\n//print_r($xml);\n//print_r($xml_ret);\n if ($z->get_errno() == 0 && $xml_ret['xmlUpdateDoc']) {\n $dom = new DomDocument();\n $dom->preserveWhiteSpace = false;\n if ($dom->loadXML($xml_ret['xmlUpdateDoc'])) {\n if ($err = $dom->getElementsByTagName('ErrorResponse')->item(0)) {\n verbose::log(ERROR, __FUNCTION__ . ' (' . __LINE__ . ') errno: ' . $err->getAttribute('Err'));\n if (!($res->updateOrderError->_value = $this->errs[$err->getAttribute('Err')])) \n $res->updateOrderError->_value = 'unspecified error (' . $err->getAttribute('Err') . '), order not possible';\n } elseif ($err = $dom->getElementsByTagName('Error')->item(0)->nodeValue) {\n verbose::log(ERROR, __FUNCTION__ . ' (' . __LINE__ . ') errno: ' . $err);\n if (!($res->bookingError->_value = $this->errs[$err])) \n $res->bookingError->_value = 'unspecified error (' . $err . '), order not possible';\n } else {\n $res->bookingOk->_value->bookingId->_value = $param->bookingId->_value;\n if ($sd = self::from_zruth_date($dom->getElementsByTagName('StartDate')->item(0)->nodeValue))\n $res->bookingOk->_value->bookingStartDate->_value = $sd;\n elseif ($sd = $param->bookingStartDate->_value)\n $res->bookingOk->_value->bookingStartDate->_value = $sd;\n if ($ed = self::from_zruth_date($dom->getElementsByTagName('EndDate')->item(0)->nodeValue))\n $res->bookingOk->_value->bookingEndDate->_value = $ed;\n elseif ($ed = $param->bookingEndDate->_value)\n $res->bookingOk->_value->bookingEndDate->_value = $ed;\n }\n } else {\n verbose::log(ERROR, __FUNCTION__ . ' (' . __LINE__ . ') loadXML error of: ' . $xml_ret['xmlUpdateDoc']);\n $res->bookingError->_value = 'system error';\n }\n } else {\n self::log_z_error(__FUNCTION__, __LINE__, $agencyId, $z->get_errno(), $z->get_error_string());\n $res->bookingError->_value = 'system error';\n }\n } else\n $res->bookingError->_value = 'unknown agencyId';\n }\n\n $ret->updateBookingResponse->_value = $res;\n //var_dump($param); print_r($res); die();\n return $ret;\n }",
"public function update(StoreBookingRequest $request, $id)\n {\n $booking = $this->bookingRepo->updateBooking($request, $id);\n return new BookingResource($booking);\n }",
"public function updatebus(Request $request) //update route\n {\n $bus_id=(int)$request->busid;\n $routeid=(int)$request->routeid;\n $fare=(int)$request->fare;\n $seats=(int)$request->tseats;\n if ($request->update==\"Update\"){\n $sql=\"UPDATE bus set route_id='$routeid',fare='$fare', total_seats='$seats' where bus_id='$bus_id'\";\n DB::connection()->getPdo()->exec($sql);\n echo \"<script type='text/javascript'>alert('successfully updated! ')</script>\";\n }\n $buses= DB::select(\"SELECT * FROM bus where status='a'\");\n return view('Operator',compact('buses'));\n }",
"public function update(UpdateDoctorScheduleRequest $request, $id)\n {\n try {\n\n DB::beginTransaction();\n $DoctorSchedule = DoctorSchedule::find($id);\n if (isset($request->bookAvailable) && $request->bookAvailable == 1)\n $request->request->add(['bookAvailable' => 1]);\n else\n $request->request->add(['bookAvailable' => 0]);\n // return $request->all();\n\n $DoctorSchedule->update($request->all());\n\n DB::commit();\n return redirect()->route('DoctorSchedule.index')->with(['success' => 'تم التعديل بنجاح']);\n } catch (\\Exception $ex) {\n DB::rollback();\n return redirect()->route('DoctorSchedule.index')->with(['error' => 'حدث خطا ما برجاء المحاوله لاحقا']);\n }\n }",
"public function UpdateOne(){\n\t\theader('Access-Control-Allow-Origin:*');\n\t\t$booking_id=$this->input->post('booking_id');\n\t\t$vendor_id=$this->input->post('vendor_ids');\n\n\t\t\n\t\t$dataone=array(\n\t\t\t 'extra_kilometer'=>$this->input->post('extra_kilometer'),\n\t\t\t\t'other_charges'=>$this->input->post('other_charges'),\n\t\t\t\t'da'=>$this->input->post('da'),\n\t\t\t\t'totat_kilometer'=>$this->input->post('total_km'));\n\t\t\t\n\t\t\t$datatwo=array(\n\t\t\t\t'opening_km'=>$this->input->post('opening_km'),\n\t\t\t\t'closing_km'=>$this->input->post('closing_km'));\n\n\n\t\t\t$datathree=array(\n\t\t\t\t'debit'=>$this->input->post('debit'),\n\t\t\t\t'booking_id'=>$booking_id,\n\t\t\t\t'vendor_id'=>$vendor_id,\n\t\t\t\t'credit'=>0,\n\t\t\t\t'date'=>date('d-m-y'));\n\t\t\n\t\t$this->load->model('BookingModel');\n\t\t\n\t\t$this->BookingModel->UpdateOne($dataone,$booking_id);\n\t\t$this->BookingModel->UpdateTwo($datatwo,$booking_id);\n\t\t$final = $this->BookingModel->UpdateThree($datathree);\n\t\tif ($final==true) {\n\t\t\techo \"Updated\";\n\t\t}else{echo \"Not\";}\n\n\t\t\n\t}",
"public function edit(Transaction $transaction, Booking $booking)\n {\n //DB::enableQueryLog();\n $booking_details = DB::table('bookings')->where('transaction_id', $transaction->transaction_id)->get();\n //dd(DB::getQueryLog());\n\n //echo \"<pre>\";print_r($booking);exit();\n\n /*$booking_details=DB::select(\"select booking_id,from_date,to_date,room_type_id,no_of_rooms,adult,child from bookings where transaction_id =\".$transaction->transaction_id);*/\n //echo \"<pre>\";print_r($booking_details);exit();\n\n\n /*foreach ($booking_details as $key => $value) {\n $booking->from_date = $value->from_date;\n $booking->to_date = $value->to_date;\n $booking->no_of_rooms = $value->no_of_rooms;\n $booking->room_type_id = $value->room_type_id;\n $booking->adult = $value->adult;\n $booking->child = $value->child;\n }*/\n\n //echo \"<pre>\";print_r($booking);exit();\n\n $room_types = Room_Type::all();\n\n return view('edit_booking')->with([\n\n 'transaction' => $transaction, 'bookings' => $booking_details, 'room_types' => $room_types\n\n ]);\n }",
"function Update(){\r\n $query = \"UPDATE userschedules\r\n SET branchId = $this->branchId, \r\n locationCode = '$this->locationCode',\r\n date = '$this->date',\r\n startingTime = '$this->startingTime',\r\n finishingTime = '$this->finishingTime',\r\n status = '$this->status'\r\n WHERE referenceId = $this->referenceId\r\n AND organizationId = $this->organizationId\";\r\n include(\"includes/dbConnection.php\");\t\t\t\r\n $executeQuery = $db->prepare($query);\r\n $executeQuery->execute() or exit(\"Error: UPDATE query failed.\");\r\n }",
"public function update(Request $request, ApartmentReservations $apartmentReservations)\n {\n //\n }",
"public function update(Request $request, Book $book)\n {\n\n\n Book::where('id', $book->id)\n ->update([\n \n 'judul' => $request->judul,\n 'penulis' => $request->penulis,\n 'penerbit' => $request->penerbit,\n 'tahun' => $request->tahun,\n 'sinopsis' => $request->sinopsis,\n\n ]);\n return redirect('/books')->with('status', 'Data Buku Berhasil Diubah!');\n }",
"protected function update()\n\t{\n\t\t//append ID to fields\n\t\t$query = $this->connection->prepare\n\t\t(\"\n\t\t\tupdate Booth\n\t\t\tset BoothNum = ?\n\t\t\twhere BoothID = ?\n\t\t\");\n\n\t\t$query->execute(array_values($this->fields));\n\n\t}",
"public function update_book($title,$author,$publisher,$id){\n $sql = \"UPDATE book SET title=:title, author=:author, publisher=:publisher WHERE id=:id\";\n $stmt = $this->con->prepare($sql); \n $stmt->bindParam(':title', $title, PDO::PARAM_STR); \n $stmt->bindParam(':author', $author, PDO::PARAM_STR); \n $stmt->bindParam(':publisher', $publisher, PDO::PARAM_STR); \n $stmt->bindParam(':id', $id, PDO::PARAM_INT); \n $stmt->execute();\n\n \n if($stmt){\n $location=\"../welcome.php\";\n $message=\"Book has been successfully updated\";\n header(\"Location: $location?message=$message\");\n }\n else{\n $location=\"../welcome.php\";\n $message=\"something went wrong!\";\n header(\"Location: $location?error_msg=$message\");\n\n }\n \n\n }",
"public function edit(Booking $booking)\n {\n $tax = TaxSetting::active()->first();\n $employees = User::where('is_employee', '1')->get();\n $businessServices = BusinessService::active()->get();\n $view = view('admin.booking.edit', compact('booking', 'tax', 'businessServices', 'employees'))->render();\n return Reply::dataOnly(['status' => 'success', 'view' => $view]);\n }",
"public function updateBus($b) {\n $sqlQuery = \"UPDATE Bus SET \" . //set the values to the placehodlers\n \"regNum = :reg, \" .\n \"busMake = :make, \" .\n \"busModel = :model, \" .\n \"engineSize = :engine, \" .\n \"dateBought = :bought, \" .\n \"dateNextService = :nextservice,\" .\n \"garageID = :garageid, \" .\n \" WHERE busID = :id\";\n $statement = $this->connection->prepare($sqlQuery); //prepare the statement \n $parameters = array(//gets the new values from the formdata\n \"reg\" => $b->getReg(),\n \"make\" => $b->getMake(),\n \"model\" => $b->getModel(),\n \"engine\" => $b->getSize(),\n \"bought\" => $b->getBought(),\n \"nextservice\" => $b->getService(),\n \"garageid\" => $b->getGarageId(),\n \"id\" => $b->getId()\n );\n\n// echo \"<pre>\";\n// print_r($parameters);\n// print_r($g);\n// echo \"</pre>\";\n\n $status = $statement->execute($parameters); //execute the sql query\n\n if (!$status) { //if any of the params are incorrect\n die(\"Could not update bus\"); //die\n }\n\n $id = $this->connection->lastInsertId(); //\n\n return $id;\n }",
"public function update(Request $request, $id)\n {\n $model = null;\n try {\n $model = Booking::findOrFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([], 404, []);\n }\n try {\n $result = $model->update($request->all());\n \n } catch (QueryException $e) {\n $errorCode = $e->errorInfo[1];\n return response()->json(['Database error' => $e], 400, []);\n }\n if ($result) {\n return response()->json($model, 200);\n } else {\n return response()->json(['error' => 'Error al actualizar'], 400, []);\n }\n }",
"public function update(Request $request, appointment $appointment)\n {\n //\n }",
"public function update(Request $request, Appointments $appointments)\n {\n //\n }",
"public function booking_save()\n\t{\n\n\t\t$validator = Validator::make(\n\t\t\tInput::all(),\n\t\t\tarray(\n\t\t\t\t'book_id' => 'bail|required',\n\n\t\t\t\t'name' => 'bail|string',\n\t\t\t\t'mail' => 'bail|required|email',\n\n\t\t\t\t'hours' => 'bail|numeric',\n\t\t\t\t'supplies' => 'bail|boolean',\n\t\t\t\t'instruction' => 'bail|string'\n\t\t\t)\n\t\t);\n\n\t\tif ($validator->passes()) {\n\n\t\t\t$client_id = 0;\n\t\t\t$book_id = typecast(Input::get('book_id'), 'string');\n\t\t\t\n\t\t\t// Timetable data\n\t\t\t$id_data = explode('_', $book_id);\n\t\t\t$timetable_id = typecast(substr($id_data[0], 1), 'int');\n\n\t\t\t// Validate slots\n\t\t\t$interval = self::valid_hour(Input::get('hours'));\n\t\t\t$timetable = GeneratorModel::get_active_timetable();\n\t\t\t$slotlist = GeneratorModel::generate_schedule($timetable, $interval);\n\t\t\t$summary = self::get_slot($book_id);\n\n\n\t\t\t$slotdata = array();\n\t\t\tforeach ($slotlist as $slot) {\n\n\t\t\t\tif ($slot['group_id'] == $book_id) {\n\n\t\t\t\t\t$slotdata = $slot;\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t\tif ($slotdata and $summary) {\n\n\t\t\t\t// Get client_id based from given email\n\t\t\t\t$email = typecast(Input::get('mail'), 'string');\n\t\t\t\t$is_valid_email = ValidatorModel::email($email, true);\n\n\t\t\t\tif (count($is_valid_email) > 1) {\n\n\t\t\t\t\t$client_id = $is_valid_email['client_id'];\n\n\t\t\t\t} else {\n\n\t\t\t\t\treturn Msg::error('Email is not available.');\n\t\t\t\t}\n\n\n\t\t\t\t// Generate encrypted payload\n\t\t\t\t$payload = Aes::payload(array(\n\t\t\t\t\t'c_id' => $client_id,\n\t\t\t\t\t's_id' => $book_id,\n\t\t\t\t\t'prc' => $slotdata['price']\n\t\t\t\t));\n\n\n\t\t\t\t// Save booking information\n\t\t\t\t$save = BookingModel::save_booking(array(\n\n\t\t\t\t\t'timetable_id' => $timetable_id,\n\n\t\t\t\t\t'client_id' => $client_id,\n\n\n\t\t\t\t\t'need_supplies' => typecast(Input::get('supplies'), 'integer'),\n\n\t\t\t\t\t'instructions' => typecast(Input::get('instruction'), 'string'),\n\n\t\t\t\t\t'schedule_start' => $slotdata['schedule_start'],\n\n\t\t\t\t\t'schedule_end' => $slotdata['schedule_end'],\n\n\t\t\t\t\t'price' => $slotdata['price'],\n\n\t\t\t\t\t'payload' => $payload,\n\n\n\t\t\t\t\t'tmp_book_id' => typecast(Input::get('book_id'), 'string'),\n\t\t\t\t\t'tmp_interval' => self::valid_hour(Input::get('hours'))\n\t\t\t\t));\n\n\t\t\t\tif (is_array($save) and isset($save['booking_id'])) {\n\t\t\t\t\t\n\t\t\t\t\t// Add booking_id on the payload\n\t\t\t\t\t$booking_id = $save['booking_id'];\n\t\t\t\t\t$decrypt = json_decode(Aes::decrypt(urldecode($payload)), true);\n\t\t\t\t\t$decrypt['b_id'] = $booking_id;\n\t\t\t\t\t$new_data = json_encode($decrypt);\n\t\t\t\t\t$new_payload = urlencode(Aes::encrypt($new_data));\n\n\n\t\t\t\t\t$base_url = MODULE_BASE_URL;\n\t\t\t\t\t$payload_url = \"{$base_url}/confirm?pl={$new_payload}\";\n\t\t\t\t\t$payload_name = typecast(Input::get('name'), 'string');\n\n\n\t\t\t\t\t$template = Template::generate('confirmation', array(\n\t\t\t\t\t\t'logo' => ASSET_LOGO,\n\t\t\t\t\t\t'name' => ucwords($payload_name),\n\t\t\t\t\t\t'link' => $payload_url,\n\n\t\t\t\t\t\t'date' => $summary['date_available'],\n\t\t\t\t\t\t'time' => \"{$summary['schedule_start']} to {$summary['schedule_end']}\",\n\t\t\t\t\t\t'hourly' => $summary['hours_text'],\n\t\t\t\t\t\t'total' => $summary['price'],\n\n\t\t\t\t\t\t'avatar' => $summary['avatar'],\n\t\t\t\t\t\t'cleaner' => \"{$summary['firstname']} {$summary['lastname']}\",\n\t\t\t\t\t\t'rating' => $summary['rate']\n\t\t\t\t\t));\n\n\n\t\t\t\t\t// Send email confirmation\n\t\t\t\t\tif (ENVIRONMENT === 'production') {\n\n\t\t\t\t\t\t$bcc = defined('EMAIL_CONFIRM_BCC') ? EMAIL_CONFIRM_BCC : null;\n\n\t\t\t\t\t\temailer($email, 'Rosie Services Confirm Booking', $template, $bcc);\n\t\t\t\t\t\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tlog_write('email_conf', $template);\n\n\t\t\t\t\t\treturn self::success($payload_url);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn self::success(\"Thank your for booking. An email confirmation has been sent to <b>{$email}</b>. The slot confirmation will be <b>valid within 24 hours</b>.\");\n\t\t\t\t\n\t\t\t\t} else if ($save === false) {\n\n\t\t\t\t\treturn Msg::error('Booking was not saved. Please review your booking information.');\n\n\t\t\t\t} else {\n\n\t\t\t\t\treturn Msg::error('This slot has already been booked. Please try other time slot.');\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\treturn Msg::error('Invalid booking request. Slot is not available.');\n\n\t\t\t}\n\n\t\t} else {\n\n\t\t\treturn Msg::error('Invalid booking request. Please verify the booking information before saving.');\n\t\t}\n\t}",
"public function update(Request $request, Appointment $appointment)\n {\n //\n }",
"public function update(Request $request, Appointment $appointment)\n {\n //\n }",
"public function update(Request $request, Hotel $hotel)\n {\n //\n }",
"public function update(Request $request, Hotel $hotel)\n {\n //\n }",
"public function update(Request $request, $id)\n {\n \n $post = reserve::find($id);\n $post->name_reserve = $request->name_reserve;\n $post->id_user= $request->id_user;\n $post->id_room = $request->id_room;\n $post->checkin = $request->checkin;\n $post->checkout = $request->checkout;\n $post->price = $request->price;\n $post->total = $request->total;\n $post->person = $request->person;\n $post->cancel = $request->cancel;\n $post->info = $request->info;\n \n $post->save();\n\n return redirect(route('reserve.index'));\n }",
"public function update(Request $request,$doctor_timeslot)\n {\n Doctor_timeslot::find($doctor_timeslot)->update($request->all());\n return response(array(\n 'error' => false,\n 'message' =>'Doctor time slot Record updated successfully',\n ),200);\n }",
"protected function update()\n\t{\n\t\t$this->autofill();\n\n\t\t$query = $this->connection->prepare (\"call UpdateProjectBooth (?, ?)\");\n\t\t$query->execute ([$this->fields['ID'], $this->fields['BoothID']]);\n\n\t\t$booth = $this->fields['BoothID'];\n\t\tunset ($this->fields['BoothID']);\n\n\t\tparent::update();\n\n\t\t$this->fields['BoothID'] = $booth;\n\n\t}",
"public function update(Request $request, Rezervation $rezervation, $id)\n {\n $data = Rezervation::find($id);\n $data->status = $request->input('status');\n $data->note = $request->input('note');\n $data ->save();\n return redirect()->back()->with('success','Reservation updated!');\n }",
"public function update()\n {\n if ( ! $this->bean->getId()) {\n $this->bean->user = R::dispense('user')->current();\n }\n $this->bean->year = date('Y', strtotime($this->bean->invoicedate));\n $this->bean->m = date('m', strtotime($this->bean->invoicedate));\n $this->bean->d = date('d', strtotime($this->bean->invoicedate));\n $this->bean->yearname = $this->bean->year.$this->bean->name;\n parent::update();\n }"
] | [
"0.75703937",
"0.7483067",
"0.7483067",
"0.7483067",
"0.7483067",
"0.7483067",
"0.73871624",
"0.71963525",
"0.70911264",
"0.7053978",
"0.70034367",
"0.70034367",
"0.70034367",
"0.70034367",
"0.70034367",
"0.70034367",
"0.69936186",
"0.6969666",
"0.69580436",
"0.69411355",
"0.68398654",
"0.6815901",
"0.67705834",
"0.67600423",
"0.674417",
"0.6729303",
"0.6698037",
"0.66653085",
"0.6650769",
"0.6638869",
"0.6621051",
"0.65924466",
"0.6572049",
"0.6570127",
"0.6560167",
"0.6555729",
"0.65314925",
"0.65226096",
"0.6507875",
"0.6496506",
"0.64658153",
"0.6460851",
"0.64418066",
"0.6429662",
"0.64273083",
"0.6415415",
"0.64121413",
"0.64121413",
"0.64121413",
"0.64121413",
"0.64121413",
"0.64121413",
"0.64121413",
"0.64121413",
"0.6407848",
"0.6403104",
"0.63942826",
"0.63585794",
"0.6337027",
"0.63320535",
"0.63100296",
"0.6305868",
"0.6289098",
"0.6287008",
"0.6235131",
"0.62313044",
"0.6226545",
"0.6226545",
"0.6226545",
"0.6226545",
"0.62246937",
"0.6218629",
"0.6215272",
"0.62143755",
"0.62139535",
"0.62068355",
"0.6206113",
"0.6205092",
"0.61954916",
"0.6181277",
"0.6177613",
"0.617695",
"0.6156107",
"0.6150961",
"0.61291194",
"0.612238",
"0.61180866",
"0.61042356",
"0.6094169",
"0.609137",
"0.6086786",
"0.6068774",
"0.6068774",
"0.60567945",
"0.60567945",
"0.6048132",
"0.6029519",
"0.60282284",
"0.6022244",
"0.60164887"
] | 0.7757144 | 0 |
Deletes a booking from the database | function wpbs_delete_booking($booking_id)
{
return wp_booking_system()->db['bookings']->delete($booking_id);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function actionDelete($id)\n\t{\n\t\t$id = (int) $id;\n\t\tYii::app()->db->createCommand(\"DELETE FROM booking WHERE id='{$id}'\")->execute();\n\t}",
"public function destroy(Booking $booking)\n {\n //\n }",
"public function destroy(Booking $booking)\n {\n //\n }",
"public function destroy(Booking $booking)\n {\n //\n }",
"function delete(){\r\n\t\tglobal $wpdb;\r\n\t\t$sql = $wpdb->prepare(\"DELETE FROM \". $wpdb->prefix.EM_BOOKINGS_TABLE . \" WHERE booking_id=%d\", $this->id);\r\n\t\treturn ( $wpdb->query( $sql ) !== false );\r\n\t}",
"public function deleteBook()\n {\n $id = $_POST['id'];\n $time = DELETE_AFTER;\n if (USE_ONE_TABLE) {\n $sql = \"UPDATE `books_authors` SET `deleted` = DATE_ADD(NOW(), interval $time HOUR) WHERE `id` = ?\";\n } else {\n $sql = \"UPDATE `books` SET `deleted` = DATE_ADD(NOW(), interval $time HOUR) WHERE `id` = ?\";\n }\n $this->findBySql($sql, [$id]);\n\n }",
"function delete(){\r\n\t\tglobal $wpdb;\r\n\t\t$sql = $wpdb->prepare(\"DELETE FROM \". EM_TICKETS_BOOKINGS_TABLE . \" WHERE ticket_booking_id=%d\", $this->id);\r\n\t\t$result = $wpdb->query( $sql );\r\n\t\treturn apply_filters('em_ticket_booking_delete', ($result !== false ), $this);\r\n\t}",
"public function deleteFromBook(Book $book);",
"public function destroy(Booking $booking)\n {\n $booking->delete();\n return redirect()->action('BookingController@index');\n }",
"public function destroy($id)\n {\n //\n // dd($id);\n $booking = Booking::findOrFail($id)->delete();\n // dd($booking);\n return back();\n }",
"public function delete ()\n {\n $query = \"DELETE FROM \" . $this->table_name . \" WHERE book_id = ?\";\n\n $stmt = $this->conn->prepare($query);\n $stmt->bindParam(1, $this->book_id);\n\n if($result = $stmt->execute()){\n return true;\n }\n else\n {\n return false;\n }\n }",
"public function delete_booking_event( $booking ) {\n $sync_result = false;\n if ( $this->is_calendar_sync_enabled() ) {\n $booking = yith_get_booking( $booking );\n if ( $booking && $booking->is_valid() ) {\n $booking_id = $booking->get_id();\n $calendar_id = $this->get_calendar_id();\n $event_id = $this->create_booking_event_id( $booking_id );\n\n $uri = 'https://www.googleapis.com/calendar/v3/calendars/' . $calendar_id . '/events';\n $event_uri = $uri . '/' . $event_id;\n\n $params = array(\n 'method' => 'DELETE',\n 'sslverify' => false,\n 'timeout' => 60,\n 'headers' => array(\n 'Content-Type' => 'application/json',\n 'Authorization' => 'Bearer ' . $this->get_access_token(),\n ),\n );\n\n $response = wp_remote_post( $event_uri, $params );\n if ( !is_wp_error( $response ) && empty( $response[ 'body' ] ) ) {\n $sync_result = 'deleted';\n $this->debug( 'Booking event deleted success', compact( 'booking_id', 'sync_result' ) );\n } else {\n $sync_result = false;\n $this->error( \"Error while deleting Booking #{$booking_id}: \", $response );\n }\n }\n }\n return $sync_result;\n }",
"public function destroy(BookingRoom $bookingRoom)\n {\n //\n }",
"public function destroy(Request $request, $id)\n {\n $saloon = Booking::find($id);\n $saloon->delete();\n $request->session()->flash('delete','Booking Deleted Successfully');\n return redirect('booking_admin');\n }",
"public function delete() {\n global $DB;\n $DB->delete_records($this->get_table_name(), array('id' => $this->id));\n }",
"function delete(){\n\t\tglobal $wpdb;\n\t\t$booking_ids = array();\n\t\tif( !empty($this->bookings) ){\n\t\t\t//get the booking ids tied to this event or preloaded into this object\n\t\t\tforeach( $this->bookings as $EM_Booking ){\n\t\t\t\t$booking_ids[] = $EM_Booking->booking_id;\n\t\t\t}\n\t\t\t$result_tickets = true;\n\t\t\t$result = true;\n\t\t\tif( count($booking_ids) > 0 ){\n\t\t\t\t//Delete bookings and ticket bookings\n\t\t\t\t$result_tickets = $wpdb->query(\"DELETE FROM \". EM_TICKETS_BOOKINGS_TABLE .\" WHERE booking_id IN (\".implode(',',$booking_ids).\");\");\n\t\t\t\t$result = $wpdb->query(\"DELETE FROM \".EM_BOOKINGS_TABLE.\" WHERE booking_id IN (\".implode(',',$booking_ids).\")\");\n\t\t\t}\n\t\t}elseif( !empty($this->event_id) ){\n\t\t\t//faster way of deleting bookings for an event circumventing the need to load all bookings if it hasn't been loaded already\n\t\t\t$event_id = absint($this->event_id);\n\t\t\t$booking_ids = $wpdb->get_col(\"SELECT booking_id FROM \".EM_BOOKINGS_TABLE.\" WHERE event_id = '$event_id'\");\n\t\t\t$result_tickets = $wpdb->query(\"DELETE FROM \". EM_TICKETS_BOOKINGS_TABLE .\" WHERE booking_id IN (SELECT booking_id FROM \".EM_BOOKINGS_TABLE.\" WHERE event_id = '$event_id')\");\n\t\t\t$result = $wpdb->query(\"DELETE FROM \".EM_BOOKINGS_TABLE.\" WHERE event_id = '$event_id'\");\n\t\t}else{\n\t\t\t//we have not bookings loaded to delete, nor an event to delete bookings from, so bookings are considered 'deleted' since there's nothing ot delete\n\t\t\t$result = $result_tickets = true;\n\t\t}\n\t\tdo_action('em_bookings_deleted', $result, $booking_ids);\n\t\treturn apply_filters('em_bookings_delete', $result !== false && $result_tickets !== false, $booking_ids, $this);\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 destroy($id)\n { \n\n $booking = Booking::find($id);\n \n if(auth()->user()->id !==$booking->user_id){\n return redirect('/bookings')->with('error', 'Unauthorized Page');\n }\n\n $booking->delete();\n return redirect('/bookings')->with('success', 'Booking Deleted');\n }",
"public function destroy($id)\n {\n $booking = Booking::find($id);\n $booking->delete();\n return redirect()->route('bookings.index');\n }",
"public function deleteAction(Request $request, Reservationbook $reservationbook)\n {\n $form = $this->createDeleteForm($reservationbook);\n $form->handleRequest($request);\n\n if ($form->isSubmitted() && $form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->remove($reservationbook);\n $em->flush();\n }\n\n return $this->redirectToRoute('reservationbook_index');\n }",
"public function delete()\n {\n $this->db->delete($this->table, $this->data['id'], $this->key);\n }",
"public function destroy($id)\n {\n $booking->delete();\n return redirect()->route('pages.booking.index');\n }",
"public function destroy($id)\n {\n $booking = bookings::find($id);\n $booking->delete();\n return redirect()->back();\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 delete()\n {\n Db::getInstance()->delete($this->getTableName(), ['id' => $this->getId()]);\n }",
"public function destroy($id)\n {\n return $this->bookingRepository->delete($id);\n }",
"public function destroy( Booking $booking ) {\n /* Remove also the connection with the user */\n $booking->users()->detach();\n\n $booking->delete();\n\n return redirect()->route( 'bookings.index' );\n }",
"function delete_reservation($id) {\n global $DB;\n\n $reservation = $DB->get_record('roomscheduler_reservations', array('id' => $id));\n\n //print_object($reservation);\n\n $reservation->active = 0;\n\n return $DB->update_record('roomscheduler_reservations', $reservation);\n}",
"public function delete() {\n $conexion = StorianDB::connectDB();\n $borrado = \"DELETE FROM cuento WHERE id=\\\"\".$this->id.\"\\\"\";\n $conexion->exec($borrado);\n }",
"public function delete(){\r\n\t\t$this->db->delete();\r\n\t}",
"public function deleteBook($id) {\n\n $stmt = $this->db-> prepare(\"DELETE FROM book WHERE id = :id\");\n $stmt-> bindValue(':id', $id);\n\n $stmt-> execute();\n }",
"public function destroy(Booking $booking)\n {\t\n \t$data = array();\n $status = $booking->delete();\n\n if ($status) {\n \t$data['status'] = 1;\n \t$data['message'] = __('Successfully deleted meeting');\n }\n\n return response()->json($data, 200);\n }",
"public function destroy($id)\n {\n //\n $booking = Booking::query()->find($id);\n $booking->delete();\n return redirect('user/bookings')->with('danger', 'Your booking has been cancelled!');\n }",
"function delete() {\n $this->db->delete(self::table_name, array('id' => $this->id));\n }",
"public function destroy($id)\n {\n $book = Reserva::findOrFail($id);\n DB::table('reservas_mesas')->where('date', $book->date)->where('idTable', $book->idTable)->update([$book->time => false]);\n $book->delete();\n return redirect()->route('books.index');\n }",
"public function delete()\r\n {\r\n $db = Database::getDatabase();\r\n $db->consulta(\"DELETE FROM puesto WHERE idPue = {$this->idPue};\");\r\n }",
"public function delete(){\n //Préparation de la requête\n $sql = \"DELETE FROM atelier WHERE idAtelier = ?\";\n $requete = $this->connectBdd->prepare($sql);\n\n //Execution de la requete\n $requete->execute([$this->getIdAtelier()]);\n\n //Fermeture de la requete\n $requete->closeCursor();// requête delete \n }",
"public function destroy(Request $request)\n {\n $req =$request['0'];\n // print_r($req);exit();\n\n // $data =Rent::find($req['id'])->where('book_id',$req['book_id'])->delete();\n $data =DB::table('rents')->where('book_id', $req['id'])->delete();\n\n $booked = DB::table('books')\n ->where('id', $req['id'])\n ->update(['booked_status' => '0']);\n \n }",
"public function deletebook($book_id)\r\n {\r\n $sql = \"DELETE FROM book WHERE book_id = :book_id\";\r\n $query = $this->db->prepare($sql);\r\n $parameters = array(':book_id' => $book_id);\r\n // useful for debugging: you can see the SQL behind above construction by using:\r\n // echo '[ PDO DEBUG ]: ' . Helper::debugPDO($sql, $parameters); exit();\r\n $query->execute($parameters);\r\n }",
"public function destroy(Booking $booking)\n {\n $this->service->delete($booking);\n return back();\n }",
"final public function delete() {\n global $config; \n # Borrar el elemento de la base de datos\n $this->db->query(\"DELETE FROM guarderia_2 WHERE id_guarderia = $this->id\");\n # Redireccionar a la página principal del controlador\n $this->functions->redir($config['site']['url'] . 'sedes/&success=true');\n }",
"public function delete()\n {\n self::deleteById( $this->db, $this->id, $this->prefix );\n\n if( $this->inTransaction )\n {\n //$this->db->commit();\n $this->inTransaction = false;\n }\n }",
"public function deleted(ReservationPayment $ReservationPayment)\n {\n //\n }",
"public function deleteRecord()\n { \n $sql = \"DELETE FROM Cubans WHERE Id = :Id\";\n $statement = $this->connect->prepare($sql);\n $statement->bindValue(':Id', $this->id);\n $statement->execute();\n }",
"public function delete(Request $request) {\n\n # Get the book to be deleted\n $book = Book::find($request->id);\n\n if(!$book) {\n Session::flash('message', 'Deletion failed; book not found.');\n return redirect('/books');\n }\n\n $book->tags()->detach();\n\n $book->delete();\n\n # Finish\n Session::flash('message', $book->title.' was deleted.');\n return redirect('/books');\n }",
"public function deleteHotelRoom(Request $request){\n\n TravellersPerRoom::where('rooms_hotel_trip_id',$request->post('rooms_hotel_trip_id'))->delete();\n RoomsPerHotelPerTrip::where('rooms_hotel_trip_id',$request->post('rooms_hotel_trip_id'))->delete();\n return redirect()->back()->with('message', 'De hotelkamer is verwijderd');\n }",
"public function destroy($id)\n {\n //\n $direct_booking = DirectBooking::find($id);\n if($direct_booking) {\n $direct_booking->delete();\n $response = [\n 'success' => true,\n 'message' => 'Booking successfully deleted!!',\n ];\n return response()->json($response, 200);\n } else {\n return response()->json(\n [\n 'success'=> false,\n 'message' => 'Booking not found',\n ],\n 500);\n }\n}",
"function delete() {\n $this->db->delete(self::table_name, array('id' => $this->id));\n // need to delete from tag maps too\n // tbd\n }",
"public function eliminar() {\n //$this->delete();\n $campo_fecha_eliminacion = self::DELETED_AT;\n $this->$campo_fecha_eliminacion = date('Y-m-d H:i:s');\n $this->status = 0;\n $this->save();\n }",
"public function destroy($id)\n\t{\n\t\tBooking::destroy($id);\n\n\t\treturn Redirect::route('bookings.index');\n\t}",
"public function destroy($id)\n {\n $user =User::findOrFail($id);\n if (count($user->booking) > 0) {\n for ($i=0; $i <$user->booking ; $i++) { \n Room::findOrFail($user->booking[$i]['room_id'])->update(['desponible'=>0]);\n }\n }\n $user->booking()->delete();\n $user->delete();\n return redirect('/listClient')->with(['success'=>\"Client is deleted\"]);\n }",
"public function deleteHotel(Request $request){\n\n $hotels_per_trip_id=$request->input('hotels_per_trip_id');\n\n $aRoomsId=RoomsPerHotelPerTrip::where('hotels_per_trip_id',$hotels_per_trip_id)->select('rooms_hotel_trip_id')->get();\n TravellersPerRoom::whereIn('rooms_hotel_trip_id',$aRoomsId)->delete();\n RoomsPerHotelPerTrip::where('hotels_per_trip_id',$hotels_per_trip_id)->delete();\n HotelsPerTrip::where('hotels_per_trip_id',$hotels_per_trip_id)->delete();\n return redirect()->back()->with('message', 'Het hotel is verwijderd');\n }",
"public function delete()\n {\n // If deposit is existing, will get database ID removed.\n $this->dbID = $this->db->deleteDeposit($this);\n }",
"public function destroy($id)\n {\n $space = Booking::find($id);\n Booking::destroy($id);\n return redirect()->back()->with(['success'=>\"Booking $space->room_number unbooked successfully\"]);\n }",
"public function delete()\n\t{\n\t\tDatabase::query(\"\n\t\t\tDELETE FROM\n\t\t\t\t\". $this->tableName .\"\n\t\t\tWHERE\n\t\t\t\tid = '\". $this->id .\"'\n\t\t\");\n\t}",
"public function delete(&$pks)\n\t{\n $bookingTable = $this->getTable('booking');\n\t\tforeach ($pks as $pk)\n\t\t{\n\t\t\t$bookingTable->load($pk);\n\t\t\t\n\t\t\tif ($bookingTable->id)\n\t\t\t{\n\t\t\t\tTicketReserverHelper::unreserveTickets($bookingTable->event_id, $bookingTable->num_tickets);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tLog::add('Admin delete: booking table load failed', Log::ERROR, 'u3a-error');\n\t\t\t}\n\t\t\t$deletePks = array($pk);\n\t\t\tparent::delete($deletePks);\n\t\t}\n\t\treturn true;\n\t}",
"public function delete() {\n\t\tif ($this->checkDependencies() == true ) {\n\t\t\t$sql = \"DELETE FROM \".$this->tablename.\" where \".$this->idcol.\" = \".$this->page->ctrl['record'];\n\t\t\t$this->dbc->exec($sql);\n\t\t}\n\t}",
"public function delete()\n {\n $this->repository->delete($this->id);\n }",
"public function destroy($id)\n {\n $booking=Booking::findOrFail($id);\n $booking->delete();\n return redirect()->route('booking.index')\n ->with(['succes'=>'Data Berhasil Di Hapus']);\n }",
"public function bookDelete(Request $request){\n try{\n $id = Crypt::decryptString($request->book_id);\n } catch (DecryptException $e) {\n return 'DD-E0002';\n }\n\n $logs = New LogsBookUpdate;\n $logs->action = 1;\n $logs->user_id = auth()->user()->id;\n $logs->book_id = $id;\n $logs->save();\n\n $book = Book::find($id);\n $book->status = Carbon::now();\n $book->update();\n\n return redirect()->route('welcome');\n }",
"function delete() {\n $this->that->delete($this->id, $this->name);\n $this->put_id();\n }",
"function delete() {\n \tglobal $mysql;\n \tif(empty($this->id)) return;\n \t$tablename = $this->class_name();\n \t$id = $this->id;\n \t$query = \"DELETE FROM $tablename WHERE id=$id\";\n \t$mysql->update($query);\n }",
"public function destroy($id)\n {\n $this->authorize('destroy', Booking::class);\n\n Booking::find($id)->delete();\n\n return $this->respond('Booking Deleted Successfully');\n }",
"public function delete() {\n\n // Does the course object have an ID?\n if ( is_null( $this->courseId ) ) trigger_error ( \"Course::delete(): Attempt to delete course object that does not have its ID property set.\", E_USER_ERROR );\n\n // Delete the Student\n $conn = new PDO( DB_DSN, DB_USERNAME, DB_PASSWORD );\n $st = $conn->prepare ( \"DELETE FROM course WHERE courseId = :courseId LIMIT 1\" );\n $st->bindValue( \":courseId\", $this->courseId, PDO::PARAM_INT );\n $st->execute();\n $conn = null;\n }",
"public function delete($bid);",
"public function delete () {\n $this->db->delete('emprestimos', array('id_emprestimo' => $this->id_emprestimo));\n }",
"public function cleanup(){\n\t\t$accountBookings = Billing_Controller_AccountBooking::getInstance()->getByBookingId($this->getId());\n\t\t\n\t\tforeach($accountBookings as $accountBooking){\n\t\t\tBilling_Controller_AccountBooking::getInstance()->delete(array($accountBooking->getId()));\n\t\t}\n\t}",
"public function delete($id){\n\t\t$this->book_model->delBook($id);\n\t\t// arahkan ke method 'books' di kontroller 'dashboard'\n\t\tredirect('dashboard/books');\n\t}",
"public function destroy($bookID)\n {\n $reserve = Reservation::find($bookID);\n\n $reserve->delete();\n return redirect('admin/reserve')->with('success', 'The reservation has been deleted.');\n }",
"public function delete() {\n $mysqli = Database::getMYSQLI();\n \n $stmt = $mysqli->prepare(\"DELETE reviews FROM reviews WHERE id = ?\");\n \n $stmt->bind_param('i', $this->id);\n \n $stmt->execute();\n $stmt->close();\n $mysqli->close();\n }",
"public function delete($cargo){\n $id=$cargo->getId();\n\n try {\n $sql =\"DELETE FROM `cargo` WHERE `id`='$id'\";\n return $this->insertarConsulta($sql);\n } catch (SQLException $e) {\n throw new Exception('Primary key is null');\n }\n }",
"public function destroy(appointment $appointment)\n {\n //\n }",
"public function destroy(Booking $booking)\n {\n $booking->abort();\n\n return redirect()->back();\n }",
"function delete()\r\n\t{\r\n\t\tglobal $debug;\r\n\t\t$dbh = getOpenedConnection();\r\n\r\n\t\t// Delete current item\r\n\t\t$sql = \"delete from tbl_Pistol_CompetitionDay\r\n\t\t\twhere Id = $pid;\r\n\t\t\";\r\n\r\n\t\t\r\n\t\tif ($debug)\r\n\t\t\tprint_r(\"SQL: \" . $sql);\r\n\t\t\t\r\n\t\tmysqli_query($dbh,$sql);\r\n\t\tif (mysqli_errno($dbh)!=0) {\r\n\t\t\tprint_r(mysqli_error($dbh));\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t$this->clear(); // Clear current object\r\n\r\n\t}",
"public function destroy(Appointment $appointment)\n {\n //\n }",
"public function destroy(Booking $booking)\n {\n if($booking->delete()) {\n return response()->json($booking);\n };\n }",
"public static function delete() {\n\t\tself::$_db->delete()->from('baskets')->where(array('slug' => self::$_slug))->go();\n\t\tSession::destroy('dime_basket');\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 global $db;\n $delete = $db->prepare('DELETE FROM posts WHERE id = :id');\n $delete->bindValue(':id', $this->_id, PDO::PARAM_INT);\n $delete->execute();\n }",
"function delete_booksinn($id)\n {\n return $this->db->delete('booksinn',array('id'=>$id));\n }",
"public function destroy(book $book)\n {\n //\n }",
"public function delete(){\n $id = $_POST['id'];\n Cita::destroy($id);\n }",
"public function delete()\n\t{\n\t\t$this->hard_delete();\n\t}",
"public function destroy($param)\n {\n $row = Budget::find($param);\n if (!$row) return abort(404);\n $row->delete();\n # Tampilin flash message\n flash('Data telah berhasil di delete')->error();\n # Kalo udah insert data, redirect ke halaman anggaran\n return redirect()->route('budget.index');\n }",
"public function deleteStudentFromBranchTable(){\n\n $deleteId = $_POST[\"bdeleteId\"];\n \n if ($this->databaseConnection()){\n $queryDelete = $this->db_connection->prepare('DELETE FROM branch WHERE bid = :deleteId');\n $queryDelete->bindValue(':deleteId', $deleteId ,PDO::PARAM_INT);\n $queryDelete->execute();\n // Return something to display the we have delete the entry \n }\n }",
"public function destroy($id)\n {\n Booking::destroy($id);\n return redirect()->route('bookings.index');\n }",
"public function delete()\n{//delete\n $sql = \"DELETE FROM pefs_database.pef_assessor WHERE ase_id = ?\";\n $this->db->query($sql,array($this->ase_id)); \n}",
"public function delete() {\n $flg = $this->Seatmodel->delete();\n\n if (!empty($flg)) {\n $this->session->set_flashdata('successmessage', 'Data deleted successfully');\n } else {\n $this->session->set_flashdata('errormessage', 'Oops! Something went wrong');\n }\n\n redirect(base_url('admin-seat-list'));\n }",
"public function delete() {\r\n\t\t$this->getMapper()->delete($this);\r\n\t}",
"public function destroy(Book $book)\n {\n //\n }",
"public function destroy(Book $book)\n {\n //\n }",
"public function destroy(Book $book)\n {\n //\n }",
"public function destroy(Book $book)\n {\n //\n }",
"public function destroy(Book $book)\n {\n //\n }",
"public function destroy(Book $book)\n {\n //\n }",
"public function destroy(Book $book)\n {\n //\n }",
"public function destroy(Book $book)\n {\n //\n }",
"public function destroy(Book $book)\n {\n //\n }",
"public function destroy(Book $book)\n {\n //\n }",
"public function destroy($id)\n {\n $gambarhotel = GambarHotel::find($id);\n $hotel_id=$gambarhotel->hotel_id;\n \n if(file_exists(public_path().$gambarhotel->path)){\n //lokasi public/event\n //skrip untuk menghapus gambar ketika di update\n unlink($gambarhotel->path);\n }\n $gambarhotel->delete();\n return redirect(\"hotel/\".$hotel_id);\n}"
] | [
"0.7600376",
"0.7498229",
"0.7498229",
"0.7498229",
"0.7390713",
"0.7155909",
"0.7040999",
"0.70099884",
"0.68403435",
"0.6787544",
"0.67712027",
"0.67559654",
"0.673261",
"0.67140347",
"0.6641528",
"0.65998256",
"0.65989393",
"0.65809923",
"0.6577738",
"0.65526277",
"0.65205896",
"0.65173143",
"0.6515339",
"0.65064085",
"0.64993656",
"0.64989156",
"0.6481313",
"0.6444693",
"0.64334464",
"0.6431653",
"0.6430365",
"0.64203",
"0.64165515",
"0.64143395",
"0.6400183",
"0.6396691",
"0.6380793",
"0.637846",
"0.63704276",
"0.63688976",
"0.6344361",
"0.6336357",
"0.63340014",
"0.6326095",
"0.62978613",
"0.6296034",
"0.625502",
"0.6239178",
"0.6236203",
"0.6233467",
"0.62283844",
"0.6226472",
"0.62255615",
"0.62014973",
"0.6195673",
"0.6195354",
"0.6189543",
"0.61835635",
"0.618068",
"0.61769426",
"0.6169659",
"0.6161089",
"0.61593074",
"0.61550033",
"0.6142744",
"0.61400485",
"0.6134823",
"0.61335516",
"0.6129021",
"0.6123773",
"0.61177826",
"0.61134845",
"0.61088455",
"0.61086285",
"0.6107632",
"0.61042285",
"0.61018425",
"0.61001617",
"0.6098912",
"0.6092728",
"0.6089014",
"0.60888606",
"0.60870236",
"0.60780936",
"0.6075641",
"0.6063101",
"0.60615575",
"0.6060386",
"0.6058803",
"0.60584974",
"0.60584974",
"0.60584974",
"0.60584974",
"0.60584974",
"0.60584974",
"0.60584974",
"0.60584974",
"0.60584974",
"0.60584974",
"0.6055478"
] | 0.7692047 | 0 |
Inserts a new meta entry for the booking | function wpbs_add_booking_meta($booking_id, $meta_key, $meta_value, $unique = false)
{
return wp_booking_system()->db['bookingmeta']->add($booking_id, $meta_key, $meta_value, $unique);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function insert()\n {\n $this->_checkItem();\n $service = $this->getService();\n $entry = $service->newItemEntry();\n $this->setEntry($entry);\n $this->_prepareEnrtyForSave();\n $this->getEntry()->setItemType($this->_getItemType());\n $entry = $service->insertGbaseItem($this->getEntry());\n $this->setEntry($entry);\n $entryId = $this->getEntry()->getId();\n $published = $this->gBaseDate2DateTime($this->getEntry()->getPublished()->getText());\n $this->getItem()\n ->setGbaseItemId($entryId)\n ->setPublished($published);\n\n if ($expires = $this->_getAttributeValue('expiration_date')) {\n $expires = $this->gBaseDate2DateTime($expires);\n $this->getItem()->setExpires($expires);\n }\n }",
"public function add($info, $meta)\r\n {\r\n\r\n }",
"function wpbs_insert_booking($data)\n{\n\n return wp_booking_system()->db['bookings']->insert($data);\n\n}",
"public function add_meta( &$object, $meta );",
"protected function save_meta() {}",
"function postmeta_insert_handler( $meta_id, $post_id, $meta_key, $meta_value='' ) {\n\t\tif ( in_array( $meta_key, $this->get_post_meta_name_ignore() ) )\n\t\t\treturn;\t\n\n\t\t$this->add_ping( 'db', array( 'postmeta' => $meta_id ) );\n\t}",
"function add_metadata($meta_type, $object_id, $meta_key, $meta_value, $unique = \\false)\n {\n }",
"protected function _insert()\n {\n \t$metadata = $this->_table->info(Zend_Db_Table_Abstract::METADATA);\n \t\n \tif(isset($metadata['created_at']))\n\t\t\t$this->_data['created_at'] = new Zend_Date ();\n \tif(isset($metadata['updated_at']))\n\t\t\t$this->_data['updated_at'] = new Zend_Date ();\n }",
"public function add_meta( &$object, $meta ) {\n\t\t}",
"public function add_meta( $key, $value, $unique = false );",
"function add_post_meta($post_id, $meta_key, $meta_value, $unique = \\false)\n {\n }",
"function add_meta($post_id)\n {\n }",
"public function addMeta(Meta $meta) {\n $this->meta[$meta->getName()] = $meta;\n }",
"public function create($newmeta) {\n\t\tif ($this->req ['auth_type'] == 'oauth') {\n\t\t\tif (is_string ( $newmeta ) && isset ( $_POST ['properties'] ) && is_object ( json_decode ( $_POST ['properties'] ) )) {\n\t\t\t\tif ($this->isCreateable ()) {\n\t\t\t\t\t// @TODO\n\t\t\t\t\t// Need to convert because there is an old structure\n\t\t\t\t\t$aMetavalues = array ();\n\t\t\t\t\tforeach ( json_decode ( $_POST ['properties'] ) as $sName => $sValue ) {\n\t\t\t\t\t\tarray_push ( $aMetavalues, array ('name' => $sName, 'value' => $sValue ) );\n\t\t\t\t\t}\n\t\t\t\t\tif (count ( $aMetavalues ) <= 150) {\n\t\t\t\t\t\t$iPrimaryMeta = ( int ) $this->oMetas->insertMeta ( array ('name' => $newmeta, 'accounts_idaccount' => $this->usr, 'namespaces_idnamespace' => $this->req ['request'] ['ns'] ) );\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (( int ) $iPrimaryMeta > 0 && count ( $aMetavalues ) > 0) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif ($this->setUsage ( $this->usr, array ('maxmetas' => 1 ) )) {\n\t\t\t\t\t\t\t\tif ($this->oMetavalue->insertValue ( $aMetavalues, $iPrimaryMeta )) {\n\t\t\t\t\t\t\t\t\t$this->addEntry ( 'response', array ('message' => 'Metaitem was created', 'meta' => $iPrimaryMeta ) );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$this->addEntry ( 'response', $this->oError->throwError ( 'META_BUDGET_LIMIT_REACHED' ) );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$this->addEntry ( 'response', $this->oError->throwError ( 'META_EXISTS' ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->addEntry ( 'response', $this->oError->throwError ( 'TO_MUCH_PROPERTYS' ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$this->addEntry ( 'response', $this->oError->throwError ( 'OAUTH_ONLY' ) );\n\t\t}\n\t\treturn $this->getResponse ();\n\t}",
"function insert_wp_postmeta($wpdb, $id, $postmeta){\n $table = $wpdb->prefix.\"postmeta\";\n $class = get_id_post_type($wpdb, 'class', $postmeta['class']);\n $rul = get_id_post_type($wpdb, 'restricteduselicence', $postmeta['rul']);\n $pvp = get_id_post_type($wpdb, 'plantvariety', $postmeta['pvp']);\n $patent = get_id_post_type($wpdb, 'patent', $postmeta['patent']);\n $patent_number = get_id_post_type($wpdb, 'patentnumber', $postmeta['patent_number']);\n $patent_number_link = get_id_post_type($wpdb, 'patentnumberlink', $postmeta['patent_number_link']);\n \n add_post_meta($id, 'class', $class[0]->id);\n add_post_meta($id, 'restricted_use_licence', $rul[0]->id);\n add_post_meta($id, 'plant_variety_protection', $pvp[0]->id);\n add_post_meta($id, 'pvp_number', $postmeta['pvp_number']);\n add_post_meta($id, 'pdf_link', $postmeta['pdf_link']);\n add_post_meta($id, 'patent', $postmeta['patent']);\n add_post_meta($id, 'patent_number', $postmeta['patent_number']);\n add_post_meta($id, 'patent_number_link', $postmeta['patent_number_link']); \n}",
"public function insert() {\n $this->data['creation_datetime']=date('Y-m-d H:i:s');\n $this->data['last_login_datetime']=date('Y-m-d H:i:s');\n if (array_key_exists('expiresIn', $this->rawData) && $this->rawData['expiresIn'] != '') {\n $this->data['expires_datetime']=date('Y-m-d H:i:s', time()+$this->rawData['expiresIn']); \n }\n parent::insert();\n }",
"function add_mappoint() {\n\tif(isset($_POST['addpoint'])){\n\t\tglobal $wpdb;\n\t\t$data_top = $_POST['data-top'];\n\t\t$data_left = $_POST['data-left'];\n\t\t$point_tile = $_POST['map_point_title'];\n\t\t$point_content = $_POST['mappoint_content'];\n\n\n\t\t$post_id = wp_insert_post(array (\n\t\t\t'post_type' => 'map-point',\n\t\t\t'post_title' => $point_tile,\n\t\t\t'post_content' => $point_content,\n\t\t\t'post_status' => 'publish',\n\t\t\t'comment_status' => 'closed', // if you prefer\n\t\t\t'ping_status' => 'closed', // if you prefer\n\t\t));\n\n\t\tif ($post_id) {\n\t\t\t// insert post meta\n\t\t\tadd_post_meta($post_id, '_data-top', $data_top);\n\t\t\tadd_post_meta($post_id, '_data-left', $data_left);\n\n\t\t}\n\n\t}\n}",
"function add($meta = array(), $post_id = 0, $is_main = \\false)\n {\n }",
"function tf_add_post_meta($post_id, $meta_key, $meta_value, $unique = false) {\r\n // make sure meta is added to the post, not a revision\r\n if ( $the_post = wp_is_post_revision($post_id) )\r\n $post_id = $the_post;\r\n\r\n $meta_type = 'post';\r\n $object_id = $post_id;\r\n\r\n if ( !$meta_type || !$meta_key )\r\n return false;\r\n\r\n if ( !$object_id = absint($object_id) )\r\n return false;\r\n\r\n if ( ! $table = _get_meta_table($meta_type) )\r\n return false;\r\n\r\n global $wpdb;\r\n\r\n $column = esc_sql($meta_type . '_id');\r\n\r\n // expected_slashed ($meta_key)\r\n // $meta_key = stripslashes($meta_key); // this was the trouble !\r\n // $meta_value = stripslashes_deep($meta_value); // this was the trouble !\r\n $meta_value = sanitize_meta( $meta_key, $meta_value, $meta_type );\r\n\r\n $check = apply_filters( \"add_{$meta_type}_metadata\", null, $object_id, $meta_key, $meta_value, $unique );\r\n if ( null !== $check )\r\n return $check;\r\n\r\n if ( $unique && $wpdb->get_var( $wpdb->prepare(\r\n \"SELECT COUNT(*) FROM $table WHERE meta_key = %s AND $column = %d\",\r\n $meta_key, $object_id ) ) )\r\n return false;\r\n\r\n $_meta_value = $meta_value;\r\n $meta_value = maybe_serialize( $meta_value );\r\n\r\n do_action( \"add_{$meta_type}_meta\", $object_id, $meta_key, $_meta_value );\r\n\r\n $result = $wpdb->insert( $table, array(\r\n $column => $object_id,\r\n 'meta_key' => $meta_key,\r\n 'meta_value' => $meta_value\r\n ) );\r\n\r\n if ( ! $result )\r\n return false;\r\n\r\n $mid = (int) $wpdb->insert_id;\r\n\r\n wp_cache_delete($object_id, $meta_type . '_meta');\r\n\r\n do_action( \"added_{$meta_type}_meta\", $mid, $object_id, $meta_key, $_meta_value );\r\n\r\n return $mid;\r\n }",
"function add_site_meta($site_id, $meta_key, $meta_value, $unique = \\false)\n {\n }",
"public function insert($techHit);",
"public function add_meta( &$object, $meta ) {\n\t\t// TODO: Implement add_meta() method.\n\t}",
"function submitted_events_insert_post($submission, $title, $content) {\n\t// post meta data needed\n\t$meta_data = array (\n\t\t\t'event-date' => $submission->date,\n\t\t\t'event-time' => $submission->starttime,\n\t\t\t'event-days' => 1,\n\t\t\t'event-repeat' => 0,\n\t\t\t'event-end' => 0 \n\t);\n\t\n\t$postarr = array (\n\t\t\t'post_title' => $title,\n\t\t\t'post_type' => 'event-list-cal',\n\t\t\t'post_content' => $content,\n\t\t\t'post_category' => submitted_events_calendar ( $submission ),\n\t\t\t'meta_input' => $meta_data \n\t);\n\t\n\t$post_id = wp_insert_post ( $postarr );\n\t\n\t// echo ID of created event?\n\techo '<p>Created event ID ' . $post_id . '</p>';\n}",
"public function insert()\n {\n $postDateGMT = $this->_pubDate;\n $postDateGMT->setTimezone( new Datetimezone( 'GMT' ) );\n\n $post = array\n (\n 'post_content' => $this->_excerpt,\n 'post_date' => $this->_pubDate->format( 'Y-m-d H:i:s' ),\n 'post_date_gmt' => $postDateGMT->format( 'Y-m-d H:i:s' ),\n 'post_parent' => $this->_feedID,\n 'post_status' => 'publish',\n 'post_title' => $this->_title,\n 'post_type' => 'fs_feed_entry'\n );\n\n remove_action( 'save_post', array( 'FS', 'onWPSavePost' ) );\n $postID = wp_insert_post( $post );\n add_action( 'save_post', array( 'FS', 'onWPSavePost' ) );\n\n if( $postID === 0 )\n {\n return false;\n }\n\n add_post_meta( $postID, 'fs_feed_entry_url', $this->_url, true );\n\n return true;\n }",
"protected function insert()\n\t{\n\t\t$this->autofill();\n\n\t\tparent::insert();\n\n\t}",
"public function add_meta() {\n\n\t\tglobal $woocommerce, $post;\n\t\t// Text Field\n\t\twoocommerce_wp_text_input(\n\t\t\tarray(\n\t\t\t\t'id' => 'author',\n\t\t\t\t'label' => __( 'Author(s)', 'woocommerce' ),\n\t\t\t\t'placeholder' => 'author(s)',\n\t\t\t\t'desc_tip' => 'true',\n\t\t\t\t'description' => __( 'Author Name(s)', 'woocommerce' )\n\t\t\t)\n\t\t);\n\t\twoocommerce_wp_text_input(\n\t\t\tarray(\n\t\t\t\t'id' => 'release_date',\n\t\t\t\t'label' => __( 'Release Date', 'woocommerce' ),\n\t\t\t\t'placeholder' => date( \"n/j/Y\" ),\n\t\t\t\t'desc_tip' => 'true',\n\t\t\t\t'description' => __( 'Release Date', 'woocommerce' )\n\t\t\t)\n\t\t);\n\t\twoocommerce_wp_text_input(\n\t\t\tarray(\n\t\t\t\t'id' => 'preview_file',\n\t\t\t\t'label' => __( 'Preview File (look inside)', 'woocommerce' ),\n\t\t\t\t'desc_tip' => 'true',\n\t\t\t\t'description' => __( 'Upload a PDF file sample', 'woocommerce' )\n\t\t\t)\n\t\t);\n\t\techo( '<input type=\"button\" class=\"button custom_media\" name=\"preview_file_button\" id=\"preview_file_button\" value=\"Upload/Browse\"/>' );\n\t\twoocommerce_wp_checkbox(\n\t\t\tarray(\n\t\t\t\t'id' => 'local_product',\n\t\t\t\t'label' => __( 'Local Product', 'woocommerce' ),\n\t\t\t\t'desc_tip' => 'true',\n\t\t\t\t'description' => __( '(not Longleaf)', 'woocommerce' ),\n\t\t\t\t'cbvalue' => '1'\n\t\t\t)\n\t\t);\n\t}",
"function cicleinscription_add_instance(stdClass $cicleinscription, mod_cicleinscription_mod_form $mform = null) {\n global $DB;\n $cicleinscription->timecreated = time();\n \n # You may have to add extra stuff in here #\n\n return $DB->insert_record('cicleinscription', $cicleinscription);\n}",
"protected function saveMeta($meta){\r\n\t//System::dump($meta);\r\n\t\r\n\tforeach($meta as $item){\r\n\t\t\r\n\t\tif((string)$item->row->attributes()->system_type=='bool'){\r\n\t\t\t$postvalue = !isset($this->sourceData['meta_value_'.(string)$item->row->name]) ? 0: 1;\r\n\t\t}elseif((string)$item->row->attributes()->system_type=='text' || ( (string)$item->row->attributes()->system_type=='blob' && (string)$item->row->attributes()->cleanup==1 ) ){\r\n\t\t\t$postvalue = Filter::makeSafeString($this->sourceData['meta_value_'.(string)$item->row->name]);\r\n\t\t}else{\r\n\t\t\t$postvalue = $this->sourceData['meta_value_'.(string)$item->row->name];\r\n\t\t}\r\n\t\t\r\n\t\t$value = DataValidator::saveData($postvalue, (string)$item->row->attributes()->system_type);\r\n\t\t\r\n\t\t$metaEx = $this->metaRowExists((int)$item->row->name);\r\n\r\n\t\tif($this->id==0 || $metaEx==0){\r\n\t\t\t$id_connect = $this->id==0 ? (int)$this->lastInsert: (int)$this->id;\r\n\t\t\t$q = \"INSERT INTO \"._SQLPREFIX_.$this->metaDataTableName.\" (\".$this->metaConnectId.\", id_meta, \".(string)$item->row->attributes()->system_type.\"_value ) VALUES (\";\r\n\t\t\t$q .= \"'\".Db::escapeField($id_connect).\"', '\".(int)$item->row->name.\"'\".\", '\".Db::escapeField($value).\"')\";\r\n\t\t\r\n\t\t}else{\r\n\t\t\t$id_connect = (int)$this->id;\r\n\t\t\t$q = \"UPDATE \"._SQLPREFIX_.$this->metaDataTableName.\" SET \";\r\n\t\t\t$q .= (string)$item->row->attributes()->system_type.\"_value = '\".Db::escapeField($value).\"' WHERE \".$this->metaConnectId.\" = '\".$id_connect.\"' AND id_meta = '\".(string)$item->row->name.\"'\";\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t//echo $q.'<br />'; \r\n\t\tDb::query($q);\r\n\t}\r\n}",
"public function insert($object, $meta=null)\n {\n $query = new Query\\Insert;\n\n if (is_array($meta)) {\n throw new \\BadMethodCallException(\"Please use insertTable()\");\n }\n\n if ($meta) {\n $meta = !$meta instanceof Meta ? $this->mapper->getMeta($meta) : $meta;\n } else {\n $meta = $this->mapper->getMeta(get_class($object));\n }\n\n if (!$meta->canInsert) {\n throw new Exception(\"Meta {$meta->id} prohibits insert\");\n }\n\n event_before: {\n if (isset($meta->on['beforeInsert'])) {\n foreach ($meta->on['beforeInsert'] as $cb) { $cb = [$object, $cb]; $cb(); }\n }\n if (isset($this->on['beforeInsert'])) {\n foreach ($this->on['beforeInsert'] as $cb) { $cb($object, $meta); }\n }\n }\n\n query: {\n $query->values = $this->mapper->mapObjectToRow($object, $meta, 'insert');\n if (!$query->table) {\n $query->table = $meta->table;\n }\n\n list ($sql, $params, $props) = $query->buildQuery($meta);\n $stmt = $this->getConnector()->prepare($sql);\n $stmt->execute($params);\n }\n \n $lastInsertId = null;\n\n // we need to be careful with \"lastInsertId\": SQLite generates one even without a PRIMARY\n if ($object && $meta->primary) {\n $lastInsertId = $this->getConnector()->lastInsertId();\n if ($lastInsertId && $meta->autoinc) {\n $field = $meta->fields[$meta->autoinc];\n $handler = $this->mapper->determineTypeHandler(Mapper::AUTOINC_TYPE);\n if (!$handler) {\n throw new \\UnexpectedValueException();\n }\n $meta->setValue($object, $meta->autoinc, $lastInsertId);\n }\n }\n \n event_after: {\n if (isset($meta->on['afterInsert'])) {\n foreach ($meta->on['afterInsert'] as $cb) { $cb = [$object, $cb]; $cb(); }\n }\n if (isset($this->on['afterInsert'])) {\n foreach ($this->on['afterInsert'] as $cb) { $cb($object, $meta); }\n }\n }\n\n return $lastInsertId;\n }",
"public function addBooking($booking){\n \n }",
"public function insert() {\n\t\tif ( !$this->content || !$this->resource ) {\n\t\t\tthrow new UnexpectedValueException( \"Provide at least a comment, rating or tag and a resource.\" );\n\t\t}\n\t\tif ( empty( $this->smoValues[\"simple\"][\"dtreviewed\"] ) ) {\n\t\t\t$this->setParameter( \"dtreviewed\", date('c') );\n\t\t}\n\n\t\t$this->action = \"insert\";\n\t\t$this->createSmoRequest();\n\t\t$xmlVar = new SoapVar( \"<ns1:insertSMO>\".$this->smo.\"</ns1:insertSMO>\", XSD_ANYXML );\n\t\t$this->insertSMO( $xmlVar );\n\t\t$this->processResponse( $this->__getLastResponse() );\n\t}",
"protected function _insert()\n\t{\n\t\t$this->date_added = \\Core\\Date::getInstance(null,\\Core\\Date::SQL_FULL, true)->toString();\n\t\t$this->date_modified = $this->date_added;\n\t\t$this->last_online = $this->date_modified;\n\t\t$this->activity_open = $this->date_modified;\n\t\t$this->language_id = \\Core\\Base\\Action::getModule('Language')->getLanguageId();\n\t}",
"function wck_add_meta(){\n\t\tparent::wck_add_meta();\n\t}",
"function add_or_update_publication_entry(&$entry, $bibtex_file, $ID=NULL) {\n $post = array(\n 'ID' => $ID, //Are you updating an existing post?\n 'post_content' => $this->createContent($entry), //The full text of the post.\n 'post_name' => $entry->getKey(), // The name (slug) for your post\n 'post_status' => 'publish',\n 'post_title' => $entry->getTitle(), //The title of your post.\n 'post_type' => __WP_PLUGIN__, //You may want to insert a regular post, page, link, a menu item or some custom post type\n ); \n $post_id = wp_insert_post( $post ); \n update_post_meta($post_id, 'bibtex', $bibtex_file);\n }",
"public function addMeta($key, $value)\n {\n $this->meta[$key] = $value;\n }",
"function update_booking_meta( $meta ) {\n foreach ( $meta as $key => $value ) {\n if ( $key !== 'services' ) {\n update_post_meta( $this->id, '_' . $key, $value );\n } else {\n wp_set_post_terms( $this->id, $value, YITH_WCBK_Post_Types::$service_tax );\n }\n }\n }",
"public function save_new_record() {\r\n\t\tglobal $wpdb;\r\n\r\n\t\t$db_data = $this->get_db_data();\r\n\r\n\t\t$table_name = $wpdb->prefix . CTF_POSTS_TABLE;\r\n\t\t$data = array(\r\n\t\t\t'twitter_id' => $db_data['twitter_id'],\r\n\t\t\t'created_on' => $db_data['created_on'],\r\n\t\t\t'last_requested' => $db_data['last_requested'],\r\n\t\t\t'time_stamp' => $db_data['time_stamp'],\r\n\t\t\t'json_data' => $db_data['json_data'],\r\n\t\t\t'media_id' => $db_data['media_id'],\r\n\t\t\t'sizes' => $db_data['sizes'],\r\n\t\t\t'aspect_ratio' => $db_data['aspect_ratio'],\r\n\t\t\t'images_done' => $db_data['images_done']\r\n\t\t);\r\n\t\t$format = array(\r\n\t\t\t'%s',\r\n\t\t\t'%s',\r\n\t\t\t'%s',\r\n\t\t\t'%s',\r\n\t\t\t'%s',\r\n\t\t\t'%s',\r\n\t\t\t'%s',\r\n\t\t\t'%d',\r\n\t\t\t'%d'\r\n\t\t);\r\n\t\t$error = $wpdb->insert( $table_name, $data, $format );\r\n\r\n\t\tif ( $error !== false ) {\r\n\t\t\t$insert_id = $wpdb->insert_id;\r\n\r\n\t\t\t$this->db_id = $insert_id;\r\n\t\t\t$this->insert_ctf_feeds_posts();\r\n\t\t} else {\r\n\t\t\t// log error\r\n\t\t}\r\n\t}",
"function vacancies_add($vacancyXML){\n\t$basics = array(\n\t'post_title' => (string)$vacancyXML->position,\n\t'post_content' => (string)$vacancyXML->long_description,\n\t'post_date' => (string)$vacancyXML->date_published['date'],\n\t'post_type' => 'vacancy',\n\t'post_status' => 'publish'\n\t);\t\n\t$new_post = wp_insert_post($basics, true);\t\t\t\t\t\t\t\t\t\t\n\t\n\t//Update the post meta\n\t$meta = array(\n\t'job_id' => (string)$vacancyXML->attributes()->id,\n\t'ref_no' => (string)$vacancyXML->ref_no,\n\t'division' => (string)$vacancyXML->division,\n\t'start_date' => (string)$vacancyXML->start_date,\n\t'location' => (string)$vacancyXML->location,\n\t'salary' => (string)$vacancyXML->salary,\n\t'consultant_email' => (string)utf8_encode($vacancyXML->consultant_email),\n\t'consultant_phone' => (string)$vacancyXML->consultant_phone,\n\t'consultant_fax' => (string)$vacancyXML->consultant_fax,\n\t'consultant_name' => (string)$vacancyXML->consultant_name,\n\t'consultant_code' => (string)$vacancyXML->consultant_code,\n\t'job_type' => (string)$vacancyXML->job_type,\t\t\t\t\t\n\t);\n\tforeach ($meta as $key => $value) {\n\t\t$update = update_post_meta($new_post, $key, $value);\t\t\t\t\t\t\n\t}\n\n\t//String for job_type taxonomy\t\t\t\t\n\t$job_type_code = $vacancyXML->category[0]->job_category['group'] . $vacancyXML->category[0]->job_category['code'];\n\twp_set_object_terms($new_post, str_replace(' ', '', $job_type_code), 'job_type');\n\t\t\t\t\t\n\t//String for no_of_hours taxonomy\t\t\t\t\n\t$job_type_code = $vacancyXML->category[1]->job_category['group'] . $vacancyXML->category[1]->job_category['code'];\n\twp_set_object_terms($new_post, str_replace(' ', '', $job_type_code), 'no_of_hours');\n\t\t\t\t\t\t//String for sector taxonomy\t\t\t\t\n\t$job_type_code = $vacancyXML->category[2]->job_category['group'] . $vacancyXML->category[2]->job_category['code'];\n\twp_set_object_terms($new_post, str_replace(' ', '', $job_type_code), 'sector');\t\n\n\t//Once actions are complete, archive the file\n\tvacancies_archive($file);\t\n\t\n}",
"public function insertMeta($vhInfo, $id, $citationID, $subCitation, $sourceData,\n $ruleID, $note, $fkTable, $fkID)\n {\n if (! $id)\n {\n $id = $this->selectID();\n }\n $qq = 'insert_meta';\n $this->sdb->prepare($qq,\n 'insert into scm\n (version, ic_id, id, citation_id, sub_citation, source_data,\n rule_id, note, fk_id, fk_table)\n values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10)');\n $result = $this->sdb->execute($qq,\n array($vhInfo['version'],\n $vhInfo['ic_id'],\n $id,\n $citationID,\n $subCitation,\n $sourceData,\n $ruleID,\n $note,\n $fkID,\n $fkTable));\n $row = $this->sdb->fetchrow($result);\n $this->sdb->deallocate($qq);\n return $id;\n }",
"public function insert_() {\n\n\n\t\t\t$podcast = Model\\Podcast::get_instance();\n\n\t\t}",
"public function insertOfferMetaTagsAction()\n {\n\n //Get offers without meta title and insert new one\n $offersWithTitleEmptyString = $this->offersTable->getOffersWithoutMetaTags(array('meta_title' => ''))->toArray();\n $offersWithTitleNull = $this->offersTable->getOffersWithoutMetaTags(array('meta_title' => null))->toArray();\n $offersWithoutMetaTitle = array_merge($offersWithTitleEmptyString, $offersWithTitleNull);\n foreach ($offersWithoutMetaTitle as $key => $value) {\n $metaTitle = $value['offerTypeName'] . ' ' . $value['propertyTypeName'] . ' ' . $value['cityName'];\n $this->offersTable->updateMetaTitle($value['id'], $metaTitle);\n }\n\n //Get offers without meta description and insert new one\n $offersWithDescriptionEmptyString = $this->offersTable->getOffersWithoutMetaTags(array('meta_description' => ''))->toArray();\n $offersWithDescriptionNull = $this->offersTable->getOffersWithoutMetaTags(array('meta_description' => null))->toArray();\n $offersWithoutMetaDescription = array_merge($offersWithDescriptionEmptyString, $offersWithDescriptionNull);\n foreach ($offersWithoutMetaDescription as $key => $value) {\n $metaDescription = strip_tags(mb_substr($value['information'], 0, 100));\n if ($metaDescription == '') {\n $metaDescription = $value['offerTypeName'] . ' ' . $value['propertyTypeName'] . ' ' . $value['cityName'];\n }\n $this->offersTable->updateMetaDescription($value['id'], $metaDescription);\n }\n\n //Get offers without meta keywords and insert new ones\n $offersWithKeywordsEmptyString = $this->offersTable->getOffersWithoutMetaTags(array('meta_keywords' => ''))->toArray();\n $offersWithKeywordsNull = $this->offersTable->getOffersWithoutMetaTags(array('meta_keywords' => null))->toArray();\n $offersWithoutMetaKeywords = array_merge($offersWithKeywordsEmptyString, $offersWithKeywordsNull);\n\n foreach ($offersWithoutMetaKeywords as $key => $offerValue) {\n $features = '';\n $featureNames = array();\n $ids = array();\n $metaTitle = $offerValue['offerTypeName'] . ',' . $offerValue['propertyTypeName'] . ',' . $offerValue['cityName'];\n\n if (($offerValue['propertyTypeId']) != 20) {\n $ids = $this->offerPropertyFeatureTable->getPropertyFeaturesById($offerValue['id']);\n } else {\n $ids = $this->offerParcelFeatureTable->getParcelFeaturesById($offerValue['id']);\n }\n\n foreach ($ids as $key => $featureId) {\n if (($offerValue['propertyTypeId']) != 20) {\n $featureNames[] = $this->propertyFeatureTable->getTypesArrayForOffer($featureId);\n } else {\n $featureNames[] = $this->parcelFeatureTable->getTypesArrayForOffer($featureId);\n }\n }\n\n foreach ($featureNames as $key => $name) {\n $features .= ',' . $name[0];\n }\n\n $metaKeywords = $metaTitle . $features;\n $this->offersTable->updateMetaKeywords($offerValue['id'], mb_substr($metaKeywords, 0, 160));\n }\n }",
"function save_meta_info( $post_id, $post ) {\n if($post->post_type != 'events')\n return $post_id;\n\n /* Verify the nonce before proceeding. */\n if ( !isset( $_POST['mindevents_event_meta_nonce'] ) || !wp_verify_nonce( $_POST['mindevents_event_meta_nonce'], basename( __FILE__ ) ) )\n return $post_id;\n\n\n\n $field_key = 'event_meta';\n /* Get the posted data and sanitize it for use as an HTML class. */\n $new_meta_values = (isset( $_POST[$field_key]) ? $_POST[$field_key] : '' );\n if($new_meta_values) :\n foreach ($new_meta_values as $key => $value) :\n update_post_meta( $post_id, $key, $value);\n endforeach;\n endif;\n\n return $post_id;\n }",
"function insertNewBooking($bookingnum, $custid, $pkgId) {\n $query = \"INSERT INTO `bookings` (BookingDate, BookingNo, TravelerCount, CustomerId, PackageId) VALUES ('\".date(\"Y-m-d H:i:s\").\"', '$bookingnum', '1', '$custid', '$pkgId')\";\n $result = Database::insertQuery($query); \n if ($result) {\n return true;\n } else {\n return false;\n }\n }",
"function add_asso_event_fields($asso_event_id, $asso_event)\n{\n if ($asso_event->post_type == 'asso_event') {\n // Store data in post meta table if present in post data\n\n // Required field names\n $required = array('asso_event_date_begin', 'asso_event_date_end', 'beer_location', 'beer_type', 'beer_description');\n\n // Loop over field names, make sure each one exists and is not empty\n foreach ($required as $field) {\n if (isset($_POST[$field])) {\n update_post_meta($asso_event_id, $field, $_POST[$field]);\n }\n }\n }\n}",
"function addLocation($data) {\r\n\r\n\r\n\t\t$this->query('INSERT INTO locations (`id`, `created`, `modified`, `name`) \r\n\t\t\t\t\t\t\t VALUES (NULL, CURRENT_TIMESTAMP(), CURRENT_TIMESTAMP(), \"'. $data['name'] .'\");');\r\n\r\n\t}",
"function wpbs_update_booking_meta($booking_id, $meta_key, $meta_value, $prev_value = '')\n{\n\n return wp_booking_system()->db['bookingmeta']->update($booking_id, $meta_key, $meta_value, $prev_value);\n\n}",
"function add_from_post(){\n\t\t$EM_Booking = new EM_booking();\n\t\t$result = $EM_Booking->get_post();\n\t\tif($result){\n\t\t\t$result = $this->add($EM_Booking);\n\t\t\tif($result){\n\t\t\t\t$result = $EM_Booking;\n\t\t\t}\n\t\t\t$this->feedback_message = sprintf(__('%s created.','events-manager'),__('Booking','events-manager'));\n\t\t}else{\n\t\t\t$this->errors = array_merge($this->errors, $EM_Booking->errors);\n\t\t}\n\t\treturn apply_filters('em_bookings_add_from_post',$result,$EM_Booking,$this);\n\t}",
"public function p_newentry($trip_id) {\n if (empty($_POST['title'])) {\n Router::redirect(\"/trips/newentry/blank\");\n }\n \n $here = Geolocate::locate();\n $_POST['state'] = $here['state'];\n $_POST['city'] = $here['city'];\n $_POST['ip'] = $here['ip'];\n\n # Associate this trip with this user\n $_POST['user_id'] = $this->user->user_id;\n\n # Unix timestamp of when this trip was created / modified\n $_POST['created'] = Time::now();\n $_POST['modified'] = Time::now();\n\n $_POST['pic_id'] = \"\";\n $_POST['trip_id'] = $trip_id;\n $_POST['vid'] = \"\";\n $_POST['comment_id'] = \"\";\n\n DB::instance(DB_NAME)->insert(\"entries\", $_POST);\n\n Router::redirect(\"/trips/dashboard/\".$trip_id);\n }",
"function textbook_save_data() {\r\n global $post;\r\n update_post_meta($post->ID, 'textbook_pub',\r\n\t\t $_POST['textbook_pub']);\r\n update_post_meta($post->ID, 'textbook_author',\r\n\t\t $_POST['textbook_author']);\r\n update_post_meta($post->ID, 'textbook_date',\r\n\t\t $_POST['textbook_date']);\r\n}",
"function vw_hospital_cs_savecustom_meta() {\n add_meta_box( 'cs_meta', __( 'Settings', 'vw-hospital' ), 'w_hospital_cs_appoint_callback' , 'Appointment','normal', 'high' ); \n}",
"protected function saveMeta() {\n if (empty($this->_metaModified)) {\n // no dirty attributes, nothing to deal with\n return;\n }\n\n $owner = static::tableName();\n $owner_id = $this->{static::meta_id_field()};\n $metaBatchInsert = [];\n\n $mpLen = strlen(static::meta_prefix());\n\n foreach ($this->_metaModified as $key => $mode) {\n // get key without prefix\n $db_key = substr($key, $mpLen);\n\n switch ($mode) {\n case self::META_ADDED:\n $attrs = [\n 'owner' => $owner,\n 'owner_id' => $owner_id,\n 'meta_key' => $db_key,\n 'meta_value' => (string)$this->_meta->$key\n ];\n // the code below is very slow\n $um = new Meta($attrs);\n if ($um->validate()) {\n $metaBatchInsert[] = $attrs;\n } else {\n throw new Exception('Failed to save invalid meta key: ' . $db_key . ' ' . json_encode($um->getFirstErrors(),\n JSON_PRETTY_PRINT));\n }\n// $um->insert();\n break;\n case self::META_MODIFIED:\n Meta::updateAll(\n [\n 'meta_value' => (string)$this->_meta->$key\n ],\n [\n 'owner' => $owner,\n 'owner_id' => $owner_id,\n 'meta_key' => $db_key\n ]);\n break;\n case self::META_UNSET:\n Meta::deleteAll([\n 'owner' => $owner,\n 'owner_id' => $owner_id,\n 'meta_key' => $db_key\n ]);\n break;\n }\n }\n\n if (!empty($metaBatchInsert)) {\n Meta::getDb()->createCommand()->batchInsert(Meta::tableName(),\n ['owner', 'owner_id', 'meta_key', 'meta_value'], $metaBatchInsert)->execute();\n }\n\n $this->_metaModified = [];\n\n $this->trigger(self::EVENT_META_SAVE);\n }",
"public function store(AbstractMeta $meta)\n {\n }",
"public function store(Request $request)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'description' => 'required',\n 'content' => 'required',\n ]);\n \n \n DB::beginTransaction();\n try {\n //code...\n Meta::create([\n 'name' => $request->name,\n 'description' => $request->description,\n 'content' => $request->content,\n 'status' => '1'\n ]);\n \n } catch (\\Throwable $th) {\n DB::rollback();\n return redirect()->route('meta.index')\n ->with('danger', 'Meta created failed');\n }\n \n DB::commit();\n \n return redirect()->route('meta.index')\n ->with('success','Meta created successfully');\n }",
"function add_book( $query ) {\r\n\t$defaults = array(\r\n\t\t'asin' => '',\r\n\t\t'title' => '',\r\n\t\t'author' => '',\r\n\t\t'image' => '',\r\n\t\t'binding' => '',\r\n\t\t'edition' => '',\r\n\t\t'isbn' => '',\r\n\t\t'publicationdate' => '',\r\n\t\t'numberofpages' => '',\r\n\t\t'publisher' => ''\r\n\t);\r\n\t\r\n\t$r = wp_parse_args($query, $defaults);\r\n\t\r\n\t$post = array(\r\n\t\t'post_type' => 'book',\r\n\t\t'post_status' => 'publish',\r\n\t\t'post_title' => $r['title'],\r\n\t\t'comment_status' => 'closed',\r\n\t\t'ping_status' => 'closed',\r\n\t\t'post_mime_type' => 'now-reading/book'\r\n\t);\r\n\t\r\n\t$id = wp_insert_post($post);\r\n\t\r\n\tforeach ( (array) $r as $key => $val ) {\r\n\t\tupdate_book_meta($id, \"book_{$key}\", $val);\r\n\t}\r\n\t\r\n\treturn $id;\r\n}",
"public function insert() {\r\n\t\t$this->getMapper()->insert($this);\r\n\t}",
"function wf_insert_update_user_meta($user_id,$meta_key,$meta_value){\r\n \t$meta_key_not_exists = add_user_meta( $user_id,$meta_key,$meta_value,true);\r\n\r\n//if meta key already exists then just update the meta value for and return true\r\n \tif (!meta_key_not_exists){\r\nupddate_user_meta($user_id,$meta_key,$meta_value);\r\nreturn true ;\r\n\r\n \t}\r\n }",
"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}",
"protected function _insert()\n {\n \n }",
"protected function _insert()\n {\n \n }",
"function add_post_meta($term_id, $taxonomy, $meta_key, $meta_value, $unique = false) {\n\n return add_metadata('post', $post_id, $meta_key, $meta_value, $unique);\n}",
"function set_generated_meta( $insert_id = 0, $meta_type = '' ) {\n\n\t// Handle our before.\n\tdo_action( Core\\HOOK_PREFIX . 'before_sourced_meta_generated', $insert_id, $meta_type );\n\n\t// Handle the meta type switch.\n\tswitch ( $meta_type ) {\n\n\t\t// Handle post meta.\n\t\tcase 'post' :\n\t\tcase 'posts' :\n\t\tcase 'attachment' :\n\t\tcase 'attachments' :\n\t\tcase 'product' :\n\t\tcase 'products' :\n\n\t\t\t// Update the meta with our keys.\n\t\t\tupdate_post_meta( $insert_id, Core\\META_PREFIX . 'sourced', 1 );\n\t\t\tupdate_post_meta( $insert_id, Core\\META_PREFIX . 'created', time() );\n\n \t\t\t// And break.\n \t\t\tbreak;\n\n \t\t// Handle comment and review meta.\n\t\tcase 'comment' :\n\t\tcase 'comments' :\n\t\tcase 'review' :\n\t\tcase 'reviews' :\n\n\t\t\t// Update the meta with our keys.\n\t\t\tupdate_comment_meta( $insert_id, Core\\META_PREFIX . 'sourced', 1 );\n\t\t\tupdate_comment_meta( $insert_id, Core\\META_PREFIX . 'created', time() );\n\n \t\t\t// And break.\n \t\t\tbreak;\n\n \t\t// Handle user and customer meta.\n\t\tcase 'user' :\n\t\tcase 'users' :\n\t\tcase 'customer' :\n\t\tcase 'customers' :\n\n\t\t\t// Update the meta with our keys.\n\t\t\tupdate_user_meta( $insert_id, Core\\META_PREFIX . 'sourced', 1 );\n\t\t\tupdate_user_meta( $insert_id, Core\\META_PREFIX . 'created', time() );\n\n \t\t\t// And break.\n \t\t\tbreak;\n\n\t\t// End all case breaks.\n\t}\n\n\t// No other updates needed, so do the action.\n\tdo_action( Core\\HOOK_PREFIX . 'after_sourced_meta_generated', $insert_id, $meta_type );\n}",
"function wp_create_initial_post_meta()\n {\n }",
"function addUpdateMetadata(){\n\t \n\t\t $this->getMakeMetadata(); //get previously saved metadata\n\t\t \n\t\t $chValue = $this->checkParam(\"title\"); \n\t\t if($chValue != false ){\n\t\t\t\t$this->tableName = $chValue;\n\t\t }\n\t\t \n\t\t $chValue = $this->checkParam(\"description\"); \n\t\t if($chValue != false ){\n\t\t\t\t$this->tableDesciption = $chValue;\n\t\t }\n\t\t \n\t\t $chValue = $this->checkParam(\"doi\"); \n\t\t if($chValue != false ){\n\t\t\t\t$this->tableDOI = $chValue;\n\t\t }\n\t\t \n\t\t $chValue = $this->checkParam(\"ark\"); \n\t\t if($chValue != false ){\n\t\t\t\t$this->tableARK = $chValue;\n\t\t }\n\t\t \n\t\t $chValue = $this->checkParam(\"versionControl\");\n\t\t if($chValue != false){\n\t\t\t\t$this->versionControl = $chValue;\n\t\t }\n\t\t \n\t\t $chValue = $this->checkParam(\"pubCreated\");\n\t\t if($chValue != false){\n\t\t\t\t$this->pubCreated = $chValue;\n\t\t }\n\t\t \n\t\t $chValue = $this->checkParam(\"tags\"); \n\t\t if($chValue != false ){\n\t\t\t\tif(stristr($chValue, self::tagDelim)){\n\t\t\t\t\t $rawTags = explode(self::tagDelim, $chValue);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t $rawTags = array($chValue);\n\t\t\t\t}\n\t\t\t\t$tags = array();\n\t\t\t\tforeach($rawTags as $tag){\n\t\t\t\t\t $tags[] = trim($tag);\n\t\t\t\t}\n\t\t\t\t$this->tableTags = $tags;\n\t\t }\n\t\t \n\t\t $this->saveMetadata(); //save the upated metadata\n\t }",
"public function insert_entry()\r\n\t{\r\n\t\t$this->db->insert(\"email_workflow\", $this);\r\n\t}",
"function addEntry($formvars) { \n try {\n $rh = $this->pdo->prepare(\"insert into GUESTBOOK values(0,?,NOW(),?)\");\n $rh->execute(array($formvars['Name'],$formvars['Comment']));\n } catch (PDOException $e) {\n print \"Error!: \" . $e->getMessage();\n return false;\n }\t\n return true;\n }",
"function add_custom_meta_for_asso_event()\n{\n add_meta_box('asso_event_meta_box',\n 'Asso. event',\n 'display_asso_event_meta_box',\n 'asso_event', 'normal', 'high'\n );\n}",
"function adleex_resource_post_insert($data,$postarr) {\nglobal $adleex_fields_value;\nglobal $adleex_fields;\n $type = $data['post_type'];\n if ($type!='resource') return $data;\n \n if (key_exists($type,$adleex_fields)) {\n\t\tforeach($adleex_fields[$type] as $boxname => $fields) {\n\t\t\tforeach($fields as $name => $field) {\n\t\t\t\tif (isset($postarr[$name])) $adleex_fields_value[$postarr['ID']][$name] = $postarr[$name];\n\t\t\t\telse $adleex_fields_value[$postarr['ID']][$name] = get_post_meta($postarr['ID'],$name,true);\n\t\t\t}\n\t\t}\n }\n $adleex_fields_value[$postarr['ID']]['post_type'] = $type;\n return $data;\n}",
"function save()\n\t{\n\n\t\t$db =JFactory::getDBO();\n\t\t$db->setQuery('select * from #__pbbooking_customfields');\n\t\t$customfields = $db->loadObjectList();\t\t\n\t\t$db->setQuery('select * from #__pbbooking_config');\n\t\t$config = $db->loadObject();\n\t\t\n\t\t//load up the appointment data in an array.\n\t\t$data = array();\n\t\t$error = false;\n\t\tforeach ($customfields as $field) {\n\t\t\tif (JRequest::getVar($field->varname)) {\n\t\t\t\t$data[$field->varname] = is_array(JRequest::getVar($field->varname)) ? implode('|',JRequest::getVar($field->varname)) : JRequest::getVar($field->varname);\n\t\t\t} else if ($field->is_required == 1) {\n\t\t\t\t$error = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$data['treatment_id'] = JRequest::getInt('treatment_id',0);\n\t\t$data['date'] = JRequest::getVar('date',\"\");\n\t\t$data['treatment_time'] = JRequest::getVar('treatment_time');\n\t\t$data['cal_id'] = JRequest::getInt('cal_id');\n\t\t\n\t\t//redirect on error or missing data\n\t\tif ($error || $data['treatment_id'] == 0 || $data['date'] == \"\" || $data['treatment_time'] == \"\") {\n\t\t\t$this->setRedirect('index.php?option=com_pbbooking',JText::_('COM_PBBOOKING_MISSING_DATA'));\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t\n\t\t//verify the appointment is actually available \n\t\t$valid = Pbbookinghelper::valid_appointment($data);\n\t\tif ($valid) {\n\t\t\t//create pending event and email user\n\t\t\t$pending_id = Pbbookinghelper::save_pending_event($data);\n\t\t\tif ($pending_id) {\n\t\t\t\t$data['pending_id'] = $pending_id;\n\n\t\t\t\tPbbookinghelper::email_user($data);\n\t\t\t\t\n\t\t\t\t//now redirect - load up the view\n\t\t\t\t$view = $this->getView('PBBooking','html');\n\t\t\t\t$view->setLayout('success');\n\t\t\t\t\n\t\t\t\t//populate needed data into the view.\n\t\t\t\t$db->setQuery('select * from #__pbbooking_treatments where id = '.$db->escape($data['treatment_id']));\n\t\t\t\t$view->service = $db->loadObject();\n\t\t\t\t$view->config = $config;\n\t\t\t\t$db->setQuery('select * from #__pbbooking_pending where id = '.$db->escape($pending_id));\n\t\t\t\t$view->pending = $db->loadObject();\n\n\t\t\t\t//display the view\n\t\t\t\t$view->display();\t\t \t\n\t\t\t} else {\n\t\t\t\t$this->setRedirect('index.php/option=com_pbbooking',JText::_('COM_PBBOOKING_BOOKING_PROBLEM'));\t\t\t\t\n\t\t\t}\n\t\t} else {\n\t\t\t$this->setRedirect('index.php/option=com_pbbooking',JText::_('COM_PBBOOKING_BOOKING_PROBLEM'));\n\t\t}\n\t}",
"function add_movie($info){\n\t$db= $GLOBALS['db']; \n\textract($info);\n\t$submitted= $db->query(\"INSERT INTO movies VALUES('', '$title', '$year_released', '$synopsis', '$was_novel', '$studioID', '$timestamp')\");\n\techo \"<h3>The movie $title was submitted!</h3>\"; \n}",
"function handle_memberlist_insert() {\r\n\tglobal $wpdb;\r\n\t\r\n\t$table = $wpdb->prefix . 'memberlist';\r\n\t\r\n\r\n\tif (isset($_POST['name'])) {\r\n\t\t$name = $_POST['name'];\r\n\t}\r\n\tif (isset($_POST['phone'])) {\r\n\t\t$phone = $_POST['phone'];\r\n\t}\r\n\tif (isset($_POST['email'])) {\r\n\t\t$email = $_POST['email'];\r\n\t}\r\n\tif (isset($_POST['extra'])) {\r\n\t\t$extra = $_POST['extra'];\r\n\t}\r\n\t\r\n\t$wpdb->insert(\r\n\t\t$table, //table\r\n\t\tarray('name' => $name, 'phone' => $phone, 'email' => $email, 'extra' => $extra ), //variables\r\n\t\tarray('%s','%s','%s','%s') //data format\r\n\t);\r\n}",
"protected function MetaAfterCreate() {\n\t\t}",
"function add_actor($info){\n\t$db= $GLOBALS['db']; \n\textract($info);\n\t$submitted= $db->query(\"INSERT INTO actors VALUES('', '$first_name', '$last_name', '$bio', '$dob', '$won_oscar', '$timestamp')\");\n\techo \"<h3>$first_name $last_name has been submitted!</h3>\"; \n}",
"public function uploadMeta()\n\t{\n global $mysql;\n\n Debug::log('<hr><h1>Beginning meta update</h1><hr>', LEVEL_MAIN);\n \n $startTime = new DateTime();\n\n\t\t$version = $this->getVersionNumberFromFolder($this->folderlocation);\n\n\t\tif ($this->getVersionExistsInDatabase($version, $this->versionId) == null)\n\t\t{\n Debug::log('New version detected', LEVEL_MINIMUM);\n\n // Todo: Migrate to stored procedure\n $mysql->insert('wot_versions', array('version' => $version, 'published' => time()));\n\n $this->versionId = $mysql->getLastUpdatedId();\n\t\t}\n \n $this->deserializeWoTMetaFiles();\n $this->copyTranslationFiles();\n $this->updateTranslations();\n \n $this->vehicles_path = 'versions/' . $this->version . '/';\n \n $this->ImportEquipment();\n $this->ImportTankInformation();\n\n\n Debug::log('<hr><h1>Completed meta upate</h1>', LEVEL_MAIN);\n Debug::log('Meta update took '.$startTime->diff(new DateTime())->format('%I minutes and %S seconds'), LEVEL_MAIN);\n \n\t}",
"public function create($location): void\n {\n $sql = \"INSERT INTO {$this->table} (description) \";\n $sql .= \"VALUES (:description);\";\n\n DBConnection::getInstance()\n ->prepare($sql)\n ->execute([\n \"description\" => $location->getDescription()\n ]);\n\n $location->setId($this->getInsertedId());\n }",
"public function createMeta($key, $value): void\n {\n /** @var HasMetadataInterface $this */\n $exists = Meta::metable(static::class, $this->id)\n ->where('key', $key)->exists();\n\n if ($exists) {\n $message = \"Can't create meta (key: $key). \";\n $message .= \"Meta already exists\";\n throw new \\Exception($message);\n }\n\n $meta = new Meta;\n\n $meta->key = $key;\n $meta->value = $value;\n\n $this->meta()->save($meta);\n }",
"public function Create($extra_meta=array()) {\n $form_instance = $this->form_instance;\n // Retrieve the form instance\n $action_instance = $this->action_instance;\n // Create a new entry SQL helper\n $entries_sql_helper = new VCFF_Reports_Helper_SQL_Entries();\n // Add the entry\n $entries_sql_helper\n ->Add_Entry(array(\n 'form_uuid' => $form_instance->Get_UUID(),\n 'form_type' => $form_instance->Get_Type(),\n 'event_id' => $action_instance->Get_ID(),\n 'event_code' => $action_instance->Get_Code(),\n 'source_url' => 'http://something',\n ));\n // If extra meta information was supplied\n if ($extra_meta && is_array($extra_meta)) {\n // Loop through each submission meta item\n foreach ($extra_meta as $meta_key => $meta_data) {\n // Add the submission meta item\n $entries_sql_helper\n ->Add_Meta_Item(array(\n 'meta_code' => $meta_data['meta_code'],\n 'meta_value' => $meta_data['meta_value'],\n 'meta_label' => $meta_data['meta_label'],\n ));\n }\n }\n // Return the form fields\n $form_fields = $form_instance->fields;\n // Loop through each form field\n foreach ($form_fields as $machine_code => $field_instance) { \n // Add the entry\n $entries_sql_helper\n ->Add_Field_Item(array(\n 'machine_code' => $machine_code,\n 'field_label' => $field_instance->Get_Label(),\n 'field_value' => $field_instance->Get_Value(),\n 'field_value_html' => $field_instance->Get_HTML_Value(false),\n 'field_value_text' => $field_instance->Get_TEXT_Value(false),\n ));\n }\n // Store and retrieve the stored entry\n $entry = $entries_sql_helper->Store();\n \n $flags_sql_helper = new VCFF_Reports_Helper_SQL_Flags();\n \n $flags_sql_helper\n ->Add_Flag(array(\n 'entry_uuid' => $entry['uuid'],\n 'form_uuid' => $form_instance->Get_UUID(),\n 'flag_code' => 'unread',\n 'flag_data' => array('hey'),\n ))\n ->Store();\n \n return $this;\n }",
"public function addBooking()\r\n {\r\n $loggedin = isset($_SESSION['user']);\r\n if(! $loggedin)\r\n {\r\n return redirect('');\r\n }\r\n $user = $_SESSION['user']->account_no;\r\n\r\n $showtime = $_POST['showtime'];\r\n $num_seats = $_POST['num_seats'];\r\n\r\n App::get('database')->insert('booking', compact('user', 'showtime', \"num_seats\"));\r\n\r\n redirect('');\r\n }",
"public function insertStory()\n\t\t{\n\n\t\t\t$sql = \"INSERT INTO `BreakingNews`(`News`) VALUES (\\\" \\\")\";\n\n\t\t\t$this->connection->query($sql);\n\n\t\t}",
"private function storeToDB() {\r\n\t\tDBQuery::getInstance() -> insert('INSERT INTO `CalculatedDailyNeeds`' . DBUtils2::buildMultipleInsertOnDuplikateKeyUpdate($this -> aArticleData));\r\n\t}",
"function store()\n {\n $this->dbInit();\n // Sets the created to the system clock\n $this->Created = date( \"Y-m-d G:i:s\" ); \n $this->Database->query( \"INSERT INTO eZLink_Link SET\n ID='$this->ID',\n Title='$this->Title',\n Description='$this->Description',\n LinkGroup='$this->LinkGroupID',\n KeyWords='$this->KeyWords',\n Created='$this->Created',\n Url='$this->Url',\n ImageID='$this->ImageID',\n Accepted='$this->Accepted'\" );\n }",
"function erdp_save_book_metadata( $post_id ) {\n\tif( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) return;\n\t// Comprobamos el valor nonce creado en twp_mi_display_callback()\n\tif( !isset( $_POST['meta_box_nonce'] ) || !wp_verify_nonce( $_POST['meta_box_nonce'], 'books_meta_box_nonce' ) ) return;\n\t// Comprobamos si el usuario actual no puede editar el post\n\tif( !current_user_can( 'edit_post' ) ) return;\n \n\tif(get_post_type($post_id)==='books') {\n // Guardamos... \n if( isset( $_POST['idioma'] ) ) update_post_meta( $post_id, 'idioma', $_POST['idioma'] );\n if( isset( $_POST['isbn'] ) ) update_post_meta( $post_id, 'isbn', $_POST['isbn'] );\n if( isset( $_POST['book_publication_date'] ) ) update_post_meta( $post_id, 'book_publication_date', $_POST['book_publication_date'] );\n if( isset( $_POST['reading_start_date'] ) ) update_post_meta( $post_id, 'reading_start_date', $_POST['reading_start_date'] );\n if( isset( $_POST['reading_end_date'] ) ) update_post_meta( $post_id, 'reading_end_date', $_POST['reading_end_date'] );\n if( isset( $_POST['book_author_name'] ) ) update_post_meta( $post_id, 'book_author_name', $_POST['book_author_name'] );\n if( isset( $_POST['purchase_link'] ) ) update_post_meta( $post_id, 'purchase_link', $_POST['purchase_link'] );\n }\n}",
"public function save() {\n $db = Db::instance();\n // omit id and any timestamps\n $db_properties = array(\n 'author_id' => $this->author_id,\n 'clothingname' => $this->clothingname,\n 'clothingtype' => $this->clothingtype,\n 'tempmin' => $this->tempmin,\n 'tempmax' => $this->tempmax\n );\n $db->store($this, __CLASS__, self::DB_TABLE, $db_properties);\n }",
"protected function _insert()\n\t{\n\t}",
"function create_new_article_entry(){\n\tglobal $wpdb;\n\t\n $keys = array(\"Article_Affiliation\", \"Article_Authors\", \"Article_Date\", \"Article_Title\", \n\t\t\t\t \"Article_Pagination\", \"Article_URL\", \"Journal_Day\", \"Journal_Date\", \n\t\t\t\t \"Journal_Citation\", \"Journal_Abbreviation\", \"Date_Revised\", \"Date_Created\", \n\t\t\t\t \"Date_Completed\", \"Journal_Issue\", \"Journal_Month\",\"Journal_Title\", \"Journal_Volume\", \n\t\t\t\t \"Journal_Year\", \"PMID\", \"Article_Abstract\");\n\t\n//1. Create Post\n\t$category_id = retrieve_category_id(\"Pubmed\");\n\t$postType = 'post';\n\t$userID = '1';\n\t$postStatus = 'publish';\n\t\n\t$leadTitle = $_POST['Article_Title'];\n\t$leadContent = \"<p>\" . $_POST['Article_Authors'] . \"</p>\";\n\t$leadContent .= \"<p>\" . $_POST['Journal_Citation'] . \"</p>\";\n\t$leadContent .= \"<p>PMID: <a href = '\" . $_POST['Article_URL'] . \"'</p>\";\n\t$leadContent .= \"<h2> Abstract </h2>\";\n\t$leadContent .= \"<p> <p>\" . $_POST['Article_Abstract'] . \"</p> </p>\";\n\n\t// Array with necessary information for creating a new Article Post \n\t$new_post = array(\n\t\t'post_title' => $leadTitle,\n\t\t'post_content' => $leadContent,\n\t\t'post_status' => $postStatus,\n\t\t'post_author' => $userID,\n\t\t'post_type' => $postType,\n\t\t'post_category' => array($category_id),\n\t\t'tags_input' => array($_POST['Tag'])\n\t);\n\n\t/*The wordpress post function */\n\t$post_id = wp_insert_post($new_post);\n\t\n//2. Fill in the Post information in Post Meta\n //assign each_key to meta_key and meta_value\n foreach($keys as $each_key){\n $key = str_replace('_', ' ', $each_key);\n $wpdb ->insert(\n $wpdb->postmeta,\n array(\n 'post_id' => $post_id,\n 'meta_key' => $key,\n 'meta_value' => $_POST[$each_key]\n )\n );\n }\n}",
"function createMetaData()\n\t{\n\t\tparent::createMetaData();\n\t\t$this->saveAuthorToMetadata();\n\t}",
"private function save_paypal_meta_data()\n {\n $postMeta = [\n 'payer_email' => 'Payer PayPal address',\n 'first_name' => 'Payer first name',\n 'last_name' => 'Payer last name',\n 'payment_type' => 'Payment type',\n ];\n\n foreach ($postMeta as $key => $name) {\n $value = wc_clean($this->request->get($key, FILTER_DEFAULT));\n $value and update_post_meta($this->order->get_id(), $name, $value);\n }\n }",
"function addEvent($date,$title,$user_id,$fname,$address,$contact,$email,$location,$vlocation,$hour,$minutes,$choice,$tier,$flavor,$info,$confirmation){\r\n\t//Include db configuration file\r\n\tinclude 'dbConfig.php';\r\n\t$currentDate = date(\"Y-m-d H:i:s\");\r\n\t//Insert the event data into database\r\n\t$insert = $db->query(\"INSERT INTO cakemaker (title,date,created,modified,user_id,fname,address,contact,email,location,vlocation,hour,minutes,choice,tier,flavor,info,confirmation) VALUES ('\".$title.\"','\".$date.\"','\".$currentDate.\"','\".$currentDate.\"','\".$user_id.\"','\".$fname.\"','\".$address.\"','\".$contact.\"','\".$email.\"','\".$location.\"','\".$vlocation.\"','\".$hour.\"','\".$minutes.\"','\".$choice.\"','\".$tier.\"','\".$flavor.\"','\".$info.\"','\".$confirmation.\"')\");\r\n\tif($insert){\r\n\t\techo 'ok';\r\n\t}else{\r\n\t\techo 'err';\r\n\t}\r\n}",
"function add_comment_meta($comment_id, $meta_key, $meta_value, $unique = \\false)\n {\n }",
"private function insert_entry_qual()\n {\n global $DB;\n $params = $this->get_params();\n $this->id = $DB->insert_record('subject', $params);\n }",
"public function addOrUpdateMeta($key, $value)\n {\n return $this->meta()->updateOrCreate(\n ['key' => $key],\n ['value' => $value]\n );\n }",
"public function insert($calendario);",
"private function insert_data($request){\n $mytime = Carbon::now();\n \n DB::table('gis_maps')->insert([\n 'Lintang' => $request->Lintang,\n 'Bujur' => $request->Bujur,\n 'Kedalaman' => $request->Kedalaman,\n 'Magnitude' => $request->Magnitude,\n 'Audio_Link' => $request->Audio_Link,\n 'Video_Link' => $request->Video_Link,\n 'created_at' => $mytime->toDateTimeString()\n ]);\n }",
"public function addDeal($deal_info) {\n $package_name = $deal_info['new_deal_package_name'];\n $number_chairs = $deal_info['new_deal_number_chairs'];\n $number_guests = $deal_info['new_deal_number_guests'];\n $floral_arrangement = $deal_info['new_deal_floral_arrangement'];\n $music_package = $deal_info['new_deal_music_package'];\n $photo_package = $deal_info['new_deal_photo_package'];\n $discount = $deal_info['new_deal_discount'];\n $deal_of_month = $deal_info['new_deal_of_month'];\n $description = $deal_info['new_deal_description'];\n \n #creates an array to hold new deal information for use in query\n $deal_array = array($package_name,$number_chairs,$number_guests,$floral_arrangement,\n $music_package,$photo_package,$discount,$deal_of_month,\n $description);\n \n #creates MySQL statement to insert new deal information into deals table\n $sql = \"INSERT INTO deals\n SET packageName = ?,\n numberChairs = ?,\n numberGuests = ?,\n floralArrangement = ?,\n musicPackage = ?,\n photoPackage = ?,\n discount = ?,\n dealOfMonth = ?,\n packageDescription = ?\n \";\n \n #executes the query using the constructed statement and the new deal data\n $statement = $this->db->query($sql,$deal_array);\n \n }",
"public function p_add() {\n\t\t$_POST = DB::instance(DB_NAME)->sanitize($_POST);\n\t\t\n\t\t# Unix timestamp of when this post was created / modified\n\t\t$_POST['created'] = Time::now();\n\t\t$_POST['modified'] = Time::now();\n\t\t$_POST['created_by'] = $this->user['email'];\n\t\t$_POST['modified_by'] = $this->user['email'];\n\t\tunset($_POST['MAX_FILE_SIZE']);\n\n\t\t# Insert\n\t\t# Note we didn't have to sanitize any of the $_POST data because we're using the insert method which does it for us\n\t\tDB::instance(DB_NAME)->insert('teachers', $_POST);\n\n\t\t\n\t\t# Send them to the main page\n\t\tRouter::redirect(\"/\");\n\n\n\t}",
"public function add_entry($entry);",
"public function insert($post);",
"function wp_ajax_add_meta()\n {\n }",
"function add_meta_obj($meta_name = null, $vocab = null, $text = null, $lang = null, $attrs = null) {\n array_push($this->meta_objs, new MetaObj($meta_name, $vocab, $text, $lang, $attrs));\n }",
"function add_meta($key, $val) {\n $success = FALSE;\n $meta = '<meta name=\"' . $key . '\" content=\"' . $val . '\" />';\n\n if (!in_array($meta, $this->meta)) {\n $this->meta[] = $meta;\n $this->write('_meta', $meta);\n $success = TRUE;\n }\n\n return $success;\n }",
"protected function addAnnouncementToDb()\n {\n $db = Db::getConnection();\n $db->query(\"INSERT INTO sale (id, id_user, is_banned, street, total_area, living_area, kitchen_area, balcony, description, price, type_house, floor, count_floor, rooms_count, ownership) VALUES (NULL, '$this->userId', NULL, '$this->street', '$this->totalArea', '$this->livingArea', '$this->kitchenArea', '$this->balcony', '$this->description', '$this->price', '$this->typeHouse', '$this->floor', '$this->countOfFloors', '$this->roomsCount', '$this->ownership');\");\n return $db->lastInsertId();\n }"
] | [
"0.6270945",
"0.6206249",
"0.6186913",
"0.6150272",
"0.6046951",
"0.60208124",
"0.5947092",
"0.58898914",
"0.588254",
"0.58805084",
"0.58191466",
"0.5761349",
"0.5738335",
"0.5727745",
"0.57005835",
"0.5673149",
"0.5660738",
"0.5649115",
"0.5607448",
"0.5578807",
"0.5577788",
"0.5571533",
"0.5546161",
"0.5531089",
"0.5515475",
"0.55021685",
"0.5487551",
"0.54812515",
"0.54749155",
"0.5474451",
"0.5473368",
"0.5462777",
"0.54327023",
"0.5431739",
"0.54261535",
"0.541674",
"0.5412465",
"0.53782314",
"0.5369285",
"0.53617585",
"0.5354077",
"0.53467315",
"0.53262514",
"0.53251106",
"0.5324798",
"0.5324365",
"0.532404",
"0.53153026",
"0.5302411",
"0.52890706",
"0.5281775",
"0.52805835",
"0.5272193",
"0.52692014",
"0.5267888",
"0.52677095",
"0.52667373",
"0.5263199",
"0.5263199",
"0.5255488",
"0.5248948",
"0.5224411",
"0.52186906",
"0.521546",
"0.52148575",
"0.5212653",
"0.5208339",
"0.5206804",
"0.52055585",
"0.52045006",
"0.51968044",
"0.51909864",
"0.5185327",
"0.5182038",
"0.51780975",
"0.5178093",
"0.5173415",
"0.51725364",
"0.51709205",
"0.51697165",
"0.51691073",
"0.51641935",
"0.5157112",
"0.51566607",
"0.5154105",
"0.5150567",
"0.51460963",
"0.5145697",
"0.5142725",
"0.5140388",
"0.51352745",
"0.51344013",
"0.51338977",
"0.5131264",
"0.512666",
"0.51238644",
"0.5113747",
"0.51064646",
"0.5106239",
"0.5092354"
] | 0.7134083 | 0 |
Updates a meta entry for the booking | function wpbs_update_booking_meta($booking_id, $meta_key, $meta_value, $prev_value = '')
{
return wp_booking_system()->db['bookingmeta']->update($booking_id, $meta_key, $meta_value, $prev_value);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function update_booking_meta( $meta ) {\n foreach ( $meta as $key => $value ) {\n if ( $key !== 'services' ) {\n update_post_meta( $this->id, '_' . $key, $value );\n } else {\n wp_set_post_terms( $this->id, $value, YITH_WCBK_Post_Types::$service_tax );\n }\n }\n }",
"public function update() {\r\n\t\tif ( $this->key === 'job_title' || $this->key === 'job_description' ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t$value = $this->get_posted_value();\r\n\t\tupdate_post_meta( $this->listing->get_id(), '_'.$this->key, $value );\r\n\t}",
"function update_meta($meta_id, $meta_key, $meta_value)\n {\n }",
"function wpbs_add_booking_meta($booking_id, $meta_key, $meta_value, $unique = false)\n{\n\n return wp_booking_system()->db['bookingmeta']->add($booking_id, $meta_key, $meta_value, $unique);\n\n}",
"public function update_meta( &$object, $meta ) {\n\t\t}",
"public function update($info, $meta)\r\n {\r\n\r\n }",
"function update_book_meta( $id, $key, $value, $prev_value = '' ) {\r\n\treturn update_post_meta($id, $key, $value, $prev_value);\r\n}",
"function wpbs_update_booking($booking_id, $data)\n{\n\n return wp_booking_system()->db['bookings']->update($booking_id, $data);\n\n}",
"public function update_meta( $post_id, $meta_value, $meta_key ) {\n // To create new meta\n if ( ! get_post_meta( $post_id, $meta_key ) ) {\n add_post_meta( $post_id, $meta_key, $meta_value );\n } else {\n // or to update existing meta\n update_post_meta( $post_id, $meta_key, $meta_value );\n }\n }",
"public function updateMeta(string $key, $value)\n {\n $this->meta[$key] = $value;\n }",
"public function update_meta( $key, $value, $prev_value = '' );",
"function update_metadata($meta_type, $object_id, $meta_key, $meta_value, $prev_value = '')\n {\n }",
"public function update_meta_data( $key, $value, $meta_id = '' ) {\n\t\tif ( ! empty( $meta_id ) ) {\n\t\t\tupdate_metadata_by_mid( 'post', $meta_id, $value, $key );\n\t\t} else {\n\t\t\tupdate_post_meta( $this->get_id(), $key, $value );\n\t\t}\n\t}",
"function update_post_meta($post_id, $meta_key, $meta_value, $prev_value = '')\n {\n }",
"public function update(Request $request, Booking $booking)\n {\n //\n }",
"public function update(Request $request, Booking $booking)\n {\n //\n }",
"public function update(Request $request, Booking $booking)\n {\n //\n }",
"public function update(Request $request, Booking $booking)\n {\n //\n }",
"public function update(Request $request, Booking $booking)\n {\n //\n }",
"private function set_meta( $key, $value ) {\n\t\tupdate_post_meta( $this->get_id(), $key, $value );\n\t}",
"public function add_seller_id_meta( $booking_id ) {\n $product_id = get_post_meta( $booking_id, '_booking_product_id', true );\n $seller_id = get_post_field( 'post_author', $product_id );\n update_post_meta( $booking_id, '_booking_seller_id', $seller_id );\n }",
"protected function update_attribute_meta( $meta_key, $meta_value ) {\n\t\tif ( $attribute = $this->get_mapping_attribute( $meta_key ) ) {\n\t\t\t$this->set_attribute( $attribute, $meta_value );\n\t\t}\n\t}",
"function wpbs_get_booking_meta($booking_id, $meta_key = '', $single = false)\n{\n\n return wp_booking_system()->db['bookingmeta']->get($booking_id, $meta_key, $single);\n\n}",
"function textbook_save_data() {\r\n global $post;\r\n update_post_meta($post->ID, 'textbook_pub',\r\n\t\t $_POST['textbook_pub']);\r\n update_post_meta($post->ID, 'textbook_author',\r\n\t\t $_POST['textbook_author']);\r\n update_post_meta($post->ID, 'textbook_date',\r\n\t\t $_POST['textbook_date']);\r\n}",
"function update_custom_meta( $postID, $value, $field ) {\n if ( ! get_post_meta( $postID, $field ) ) {\n add_post_meta( $postID, $field, $value );\n } else {\n // or to update existing meta\n update_post_meta( $postID, $field, $value );\n }\n}",
"protected function save_meta() {}",
"function update_site_meta($site_id, $meta_key, $meta_value, $prev_value = '')\n {\n }",
"function wpbs_delete_booking_meta($booking_id, $meta_key, $meta_value = '', $delete_all = '')\n{\n\n return wp_booking_system()->db['bookingmeta']->delete($booking_id, $meta_key, $meta_value, $delete_all);\n\n}",
"public function updatePostMeta($post_meta_name) {\n $meta = array();\n $meta['image'] = $this->image;\n $meta['sub-images'] = $this->sub_images;\n $meta['link'] = $this->link;\n $meta['price'] = $this->price;\n $meta['product-code'] = $this->product_code;\n\n update_post_meta($this->id, $post_meta_name, $meta);\n }",
"function update_usermeta($user_id, $meta_key, $meta_value)\n {\n }",
"public function update($meeting)\n {\n\n }",
"function update_student_meta( $student_id, $meta_key, $meta_value, $prev_value = '' ) {\n return update_metadata('student', $student_id, $meta_key, $meta_value, $prev_value );\n }",
"function erdp_save_book_metadata( $post_id ) {\n\tif( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) return;\n\t// Comprobamos el valor nonce creado en twp_mi_display_callback()\n\tif( !isset( $_POST['meta_box_nonce'] ) || !wp_verify_nonce( $_POST['meta_box_nonce'], 'books_meta_box_nonce' ) ) return;\n\t// Comprobamos si el usuario actual no puede editar el post\n\tif( !current_user_can( 'edit_post' ) ) return;\n \n\tif(get_post_type($post_id)==='books') {\n // Guardamos... \n if( isset( $_POST['idioma'] ) ) update_post_meta( $post_id, 'idioma', $_POST['idioma'] );\n if( isset( $_POST['isbn'] ) ) update_post_meta( $post_id, 'isbn', $_POST['isbn'] );\n if( isset( $_POST['book_publication_date'] ) ) update_post_meta( $post_id, 'book_publication_date', $_POST['book_publication_date'] );\n if( isset( $_POST['reading_start_date'] ) ) update_post_meta( $post_id, 'reading_start_date', $_POST['reading_start_date'] );\n if( isset( $_POST['reading_end_date'] ) ) update_post_meta( $post_id, 'reading_end_date', $_POST['reading_end_date'] );\n if( isset( $_POST['book_author_name'] ) ) update_post_meta( $post_id, 'book_author_name', $_POST['book_author_name'] );\n if( isset( $_POST['purchase_link'] ) ) update_post_meta( $post_id, 'purchase_link', $_POST['purchase_link'] );\n }\n}",
"public function updateMeta($key, $value): void\n {\n try {\n /** @var HasMetadataInterface $this */\n $meta = Meta::metable(static::class, $this->id)\n ->where('key', $key)->firstOrFail();\n } catch (\\Exception $e) {\n $message = \"Can't update meta (key: $key). \";\n $message .= \"Meta doesn't exist\";\n\n throw new \\Exception($message);\n }\n\n $meta->value = $value;\n\n $this->meta()->save($meta);\n }",
"function add_update_or_delete_post_meta($new_meta_value, $post_id, $key) {\n global $clientele_events;\n global $post_type;\n $args['post_id'] = $post_id;\n $args['key'] = $key;\n $old_meta_value = get_post_meta($post_id, $key, true);\n if ('' == $new_meta_value) { // If empty delete it\n delete_post_meta($post_id, $key, $old_meta_value);\n if ($post_type == 'clientele-client') {\n $clientele_events->do_event('change', 'delete_meta', 'Meta field \"' . $key . '\" deleted', $args);\n }\n } elseif (isset($new_meta_value) && '' == $old_meta_value) { // If new add it.\n add_post_meta($post_id, $key, $new_meta_value, true);\n if ($post_type == 'clientele-client') {\n $clientele_events->do_event('change', 'add_meta', 'Meta field \"' . $key . '\" added', $args);\n }\n } elseif (isset($new_meta_value) && $new_meta_value != $old_meta_value) { // If changed update it\n update_post_meta($post_id, $key, $new_meta_value);\n if ($post_type == 'clientele-client') {\n $clientele_events->do_event('change', 'update_meta', 'Meta field \"' . $key . '\" updated', $args);\n }\n }\n }",
"public function update()\n {\n if ( ! $this->bean->getId()) {\n $this->bean->user = R::dispense('user')->current();\n }\n $this->bean->year = date('Y', strtotime($this->bean->invoicedate));\n $this->bean->m = date('m', strtotime($this->bean->invoicedate));\n $this->bean->d = date('d', strtotime($this->bean->invoicedate));\n $this->bean->yearname = $this->bean->year.$this->bean->name;\n parent::update();\n }",
"protected function postUpdateMeta()\n {\n $sql = sprintf(\"\n UPDATE\n %sfaqattachment\n SET virtual_hash = '%s',\n mime_type = '%s'\n WHERE id = %d\",\n PMF_Db::getTablePrefix(),\n $this->virtualHash,\n $this->readMimeType(),\n $this->id\n );\n\n $this->db->query($sql);\n }",
"function save_meta_info( $post_id, $post ) {\n if($post->post_type != 'events')\n return $post_id;\n\n /* Verify the nonce before proceeding. */\n if ( !isset( $_POST['mindevents_event_meta_nonce'] ) || !wp_verify_nonce( $_POST['mindevents_event_meta_nonce'], basename( __FILE__ ) ) )\n return $post_id;\n\n\n\n $field_key = 'event_meta';\n /* Get the posted data and sanitize it for use as an HTML class. */\n $new_meta_values = (isset( $_POST[$field_key]) ? $_POST[$field_key] : '' );\n if($new_meta_values) :\n foreach ($new_meta_values as $key => $value) :\n update_post_meta( $post_id, $key, $value);\n endforeach;\n endif;\n\n return $post_id;\n }",
"function wprss_update_feed_meta( $meta_id, $post_id, $meta_key, $meta_value ) {\n $post = get_post( $post_id );\n if ( $post !== NULL && $post->post_status === 'publish' && $post->post_type === 'wprss_feed' ) {\n if ( $meta_key === 'wprss_url' )\n wprss_change_fb_url( $post_id, $meta_value );\n }\n }",
"public function set_meta( $meta, $single = false ) {\n\t\t$this->meta = wp_parse_args( $meta, $this->meta );\n\n\t\tif ( $single ) {\n\t\t\tupdate_comment_meta( $this->id, key( $meta ), $meta[ key( $meta ) ] );\n\t\t} else {\n\t\t\tupdate_comment_meta( $this->id, APP_REPORTS_C_DATA_KEY, $this->meta );\n\t\t}\n\t}",
"public function updateBookTag()\n {\n\t\tif (intval($this->type_flag) === ENTRY_TYPE_BOOK)\n\t\t{\n\t\t\t// non-book may have been changed to book\n\t\t\t$this->addBookTag();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// in case book was changed to non-book\n\t\t\t$this->removeBookTag();\n\t\t}\n\t}",
"public function updateSiteMeta($meta_key, $meta_value) {\n $data = array(\"meta_value\" => $meta_value);\n if($this->db->update('site_meta', $data, array('meta_key' => $meta_key)))\n echo '<div style=\"padding: 10px; background: #bdffa7; color: #0da01e; \">Enregistrement réussi!</div>';\n else\n echo '<div style=\"padding: 10px; background: #ffa7c4; color: #cd0614; \">Erreur lors de l\\'enregistrement! Veuillez réessayer SVP.</div>';\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 _update()\n {\n $this->updatedAt = new \\DateTime();\n }",
"function _action_brightech_page_contacts_meta_update( $post_id ) {\n\n\tif ( \n\t\tempty( $_POST['bt_office_meta'] )\n\t\t|| ! wp_verify_nonce( $_POST['bt_office_postmeta_nonce'], __FILE__ )\n\t\t|| wp_is_post_autosave( $post_id )\n\t\t|| wp_is_post_revision( $post_id )\n\t\t|| ! current_user_can( 'edit_post', $post_id )\n\t) return;\n\n\tforeach( $_POST['bt_office_meta'] as $key => $value ) {\n\n\t\tswitch ($key) {\n\t\t\t\n\t\t\tcase 'bt_test':\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tdefault:\n\t\t\t\t$value = sanitize_text_field($value);\n\t\t\t\tbreak;\n\t\t}\n\n\t\tif ( empty($value) ) {\n\t\t\tdelete_post_meta( $post_id, $key );\n\t\t\tcontinue;\n\t\t}\n\t\tupdate_post_meta( $post_id, $key, $value );\n\t}\n\n\treturn $post_id;\n}",
"public function edit(Booking $booking)\n {\n //\n }",
"public function edit(Booking $booking)\n {\n //\n }",
"public function edit(Booking $booking)\n {\n //\n }",
"public function edit(Booking $booking)\n {\n //\n }",
"public function edit(Booking $booking)\n {\n //\n }",
"public function edit(Booking $booking)\n {\n //\n }",
"private function update_post_meta( $post_id, $meta_key, $meta_value ) {\n\t\t\n\t\tif ( is_array( $_POST[ $meta_key ] ) ) {\n\t\t\t$meta_value = array_filter( $_POST[ $meta_key ] );\n\t\t}\n\t\t\n\t\tupdate_post_meta( $post_id, $meta_key, $meta_value );\n\t}",
"public function update( $field, $value ) {\n\t\tif ( isset($this->ID) ) {\n\t\t\tupdate_post_meta($this->ID, $field, $value);\n\t\t\t$this->$field = $value;\n\t\t}\n\t}",
"function __update_post_meta( $post_id, $field_name, $value = '' ){\n\tif ( empty( $value ) OR ! $value )\t{\n\t\tdelete_post_meta( $post_id, $field_name );\n\t}\n\telseif ( ! get_post_meta( $post_id, $field_name ) ) {\n\t\tadd_post_meta( $post_id, $field_name, $value );\n\t}\n\telse {\n\t\tupdate_post_meta( $post_id, $field_name, $value );\n\t}\n}",
"public function updateBooking(Request $request, $id)\n{\n $booking = Booking::find($id);\n $booking->update($request->all());\n\n $response = [\n 'message'=>'Update Succesfully',\n 'booking' => $booking,\n \n \n ];\n\n return response($response); \n}",
"public function update(): void\n {\n $this->updateQuality();\n $this->updateSellIn();\n $this->expiresAfterSale();\n }",
"function update_passenger_record($book_id, $sindex, $status) {\r\n\t\t$cond ['app_reference'] = $book_id;\r\n\t\t$cond ['segment_indicator'] = $sindex;\r\n\t\t\r\n\t\t$data ['status'] = $status;\r\n\t\t$CI = & get_instance ();\r\n\t\t\r\n\t\t$CI->custom_db->update_record ( 'flight_booking_passenger_details', $data, $cond );\r\n\t}",
"public function update_resource_data() {\n $post_data = wp_unslash( $_POST ); // phpcs:ignore\n\n if ( ! isset( $post_data['dokan_booking_resource_update'] ) ) {\n return;\n }\n\n $post_id = intval( $post_data['resource_id'] );\n\n $post = get_post( $post_id );\n $post->post_title = sanitize_text_field( $post_data['post_title'] );\n\n wp_update_post( $post );\n\n // Qty field\n update_post_meta( $post_id, 'qty', wc_clean( $post_data['_wc_booking_qty'] ) );\n // Availability\n $availability = array();\n $row_size = isset( $post_data['wc_booking_availability_type'] ) ? count( $post_data['wc_booking_availability_type'] ) : 0;\n for ( $i = 0; $i < $row_size; $i ++ ) {\n $availability[ $i ]['type'] = wc_clean( $post_data['wc_booking_availability_type'][ $i ] );\n $availability[ $i ]['bookable'] = wc_clean( $post_data['wc_booking_availability_bookable'][ $i ] );\n $availability[ $i ]['priority'] = intval( $post_data['wc_booking_availability_priority'][ $i ] );\n\n switch ( $availability[ $i ]['type'] ) {\n case 'custom':\n $availability[ $i ]['from'] = wc_clean( $post_data['wc_booking_availability_from_date'][ $i ] );\n $availability[ $i ]['to'] = wc_clean( $post_data['wc_booking_availability_to_date'][ $i ] );\n break;\n case 'months':\n $availability[ $i ]['from'] = wc_clean( $post_data['wc_booking_availability_from_month'][ $i ] );\n $availability[ $i ]['to'] = wc_clean( $post_data['wc_booking_availability_to_month'][ $i ] );\n break;\n case 'weeks':\n $availability[ $i ]['from'] = wc_clean( $post_data['wc_booking_availability_from_week'][ $i ] );\n $availability[ $i ]['to'] = wc_clean( $post_data['wc_booking_availability_to_week'][ $i ] );\n break;\n case 'days':\n $availability[ $i ]['from'] = wc_clean( $post_data['wc_booking_availability_from_day_of_week'][ $i ] );\n $availability[ $i ]['to'] = wc_clean( $post_data['wc_booking_availability_to_day_of_week'][ $i ] );\n break;\n case 'time':\n case 'time:1':\n case 'time:2':\n case 'time:3':\n case 'time:4':\n case 'time:5':\n case 'time:6':\n case 'time:7':\n $availability[ $i ]['from'] = wc_booking_sanitize_time( $post_data['wc_booking_availability_from_time'][ $i ] );\n $availability[ $i ]['to'] = wc_booking_sanitize_time( $post_data['wc_booking_availability_to_time'][ $i ] );\n break;\n case 'time:range':\n $availability[ $i ]['from'] = wc_booking_sanitize_time( $post_data['wc_booking_availability_from_time'][ $i ] );\n $availability[ $i ]['to'] = wc_booking_sanitize_time( $post_data['wc_booking_availability_to_time'][ $i ] );\n\n $availability[ $i ]['from_date'] = wc_clean( $post_data['wc_booking_availability_from_date'][ $i ] );\n $availability[ $i ]['to_date'] = wc_clean( $post_data['wc_booking_availability_to_date'][ $i ] );\n break;\n }\n }\n update_post_meta( $post_id, '_wc_booking_availability', $availability );\n\n $redirect_url = dokan_get_navigation_url( 'booking' ) . 'resources/edit/?id=' . $post_id;\n wp_safe_redirect( add_query_arg( array( 'message' => 'success' ), $redirect_url ) );\n }",
"function update_single_data(){\n\t\t\t$name = $this->input->post('name');\n\t\t\t$value = $this->input->post('value');\t\t\t\n\t\t\t$pk = $this->input->post('pk');\n\t\t\treturn $this->InteractModal->update_post_meta( $pk, $name, $value );\n\t\t\t\n\t\t\t\n\t\t}",
"public function update() {\n $bookingJson = array(\n 'adults' => $this->getAdults(),\n 'children' => $this->getChildren(),\n 'infants' => $this->getInfants()\n );\n $response = \\tabs\\api\\client\\ApiClient::getApi()->put(\n \"/booking/{$this->getBookingId()}\",\n array(\n 'data' => json_encode($bookingJson)\n )\n );\n if ($response->status !== 204) {\n throw new \\tabs\\api\\client\\ApiException(\n $response,\n 'Could not update booking'\n );\n }\n\n return $this;\n }",
"public function updateBookingStatus(){\n $command = Yii::$app->db->createCommand();\n $id= Yii::$app->request->bodyParams[\"booking2\"];\n\n try {\n $command->update('car', ['pendingTime' => 'on', 'inUse' => 'pending'], 'id = '.$id)->execute();\n } catch (Exception $e) {\n printf(\"Cannot update data\");\n }\n }",
"public function Update($entry) {\n $sql_entries_helper = new VCFF_Reports_Helper_SQL_Entries();\n // Add the entry\n $sql_entries_helper\n ->Add_Entry($entry['store_entry']);\n // If there is meta to store\n if (isset($entry['store_fields']) && is_array($entry['store_fields'])) {\n // Loop through each field\n foreach ($entry['store_fields'] as $machine_code => $field_data) { \n // Add the entry\n $sql_entries_helper->Add_Field_Item($field_data);\n }\n }\n // If there is meta to store\n if (isset($entry['store_meta']) && is_array($entry['store_meta'])) {\n // Loop through each field\n foreach ($entry['store_meta'] as $meta_code => $meta_data) {\n // Add the entry\n $sql_entries_helper->Add_Meta_Item($meta_data);\n }\n }\n // Store the changes\n $sql_entries_helper->Store();\n }",
"public function testUpdateMetadata1UsingPUT()\n {\n }",
"function set_seller_meta($user_id) {\n update_user_meta( $user_id, 'dokan_publishing', 'yes' );\n}",
"protected function save_meta() {\n\t\t// save report meta details\n\t\tupdate_comment_meta( $this->id, APP_REPORTS_C_DATA_KEY, $this->get_meta() );\n\t}",
"function acf_update_metadata($post_id = 0, $name = '', $value = '', $hidden = \\false)\n{\n}",
"function bookking_update_instance($data, $mform) {\n global $DB;\n\n $data->timemodified = time();\n $data->id = $data->instance;\n\n $data->scale = $data->grade;\n\n $DB->update_record('bookking', $data);\n\n $context = context_module::instance($data->coursemodule);\n $mform->save_mod_data($data, $context);\n\n // Update grade item and grades.\n bookking_update_grades($data);\n\n return true;\n}",
"public function setMeta($key, $value)\n {\n return update_user_meta($this->getID(), $key, $value);\n }",
"public function setMeta($key, $value)\n {\n }",
"public function update_meta(Request $request)\n {\n $type = $request->input('type');\n $ret['msg'] = 'info';\n $ret['message'] = __('messages.nothing');\n $auth_id = auth()->id();\n $is_saved = false;\n\n $type_key = 'default'; $is_page_meta = false;\n if($type == 'tnx_page_meta' || $type == 'kyc_page_meta' || $type == 'user_page_meta') {\n $type_key = str_replace('_page_meta', '', $type);\n $is_page_meta = true;\n }\n\n if ($is_page_meta==true) {\n $meta_name = $this->meta_key_val($request->meta, 'key');\n $meta_val = $this->meta_key_val($request->meta, 'value');\n $ret['msg'] = 'error';\n $ret['message'] = __('messages.update.failed', ['what' => 'Options']);\n\n if($meta_name=='perpage') {\n $meta_by_name = $type_key.'_per_page';\n $result = GlobalMeta::save_meta($meta_by_name, $meta_val, $auth_id);\n $is_saved = true;\n } elseif($meta_name=='ordered') {\n $meta_by_name = $type_key.'_ordered';\n $result = GlobalMeta::save_meta($meta_by_name, $meta_val, $auth_id);\n $is_saved = true;\n } elseif($meta_name=='orderby') {\n $meta_by_name = $type_key.'_order_by';\n $result = GlobalMeta::save_meta($meta_by_name, $meta_val, $auth_id);\n $is_saved = true;\n } else {\n $meta_by_name = $type_key.'_'.$meta_name;\n $result = GlobalMeta::save_meta($meta_by_name, $meta_val, $auth_id);\n $is_saved = true;\n }\n if($is_saved) {\n $ret['msg'] = 'success';\n $ret['message'] = __('messages.update.success', ['what' => 'Options']);\n }\n }\n\n if ($request->ajax()) {\n return response()->json($ret);\n }\n return back()->with([$ret['msg'] => $ret['message']]);\n }",
"public function testUpdateMetadata2UsingPUT()\n {\n }",
"public function setMetaInfo($meta) {\n $this->meta = $meta;\n }",
"public function maybe_update_meta_keys() {\n global $wpdb;\n\n // check, if the current version is greater than or equal 0.9.7\n if ( version_compare( $this->config->get( 'version' ), '0.9.7', '>=' ) ) {\n // map old values to new ones\n $meta_key_mapping = array(\n 'Teaser content' => 'laterpay_post_teaser',\n 'Pricing Post' => 'laterpay_post_pricing',\n 'Pricing Post Type' => 'laterpay_post_pricing_type',\n );\n\n $sql = 'UPDATE ' . $wpdb->postmeta . \" SET meta_key = '%s' WHERE meta_key = '%s'\";\n\n foreach ( $meta_key_mapping as $before => $after ) {\n $prepared_sql = $wpdb->prepare( $sql, array( $after, $before ) );\n $wpdb->query( $prepared_sql );\n }\n }\n }",
"public static function set_meta( $object_id, $meta_key, $meta_value ) {\n\n\t\tupdate_term_meta( $object_id, $meta_key, $meta_value );\n\t}",
"function update_metadata_by_mid($meta_type, $meta_id, $meta_value, $meta_key = \\false)\n {\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 addBooking($booking){\n \n }",
"function getfaircoin_edd_updated_edited_purchase( $payment_id ) {\r\n // get the payment meta\r\n $payment_meta = edd_get_payment_meta( $payment_id );\r\n // update our fairaddress number\r\n $payment_meta['fairaddress'] = isset( $_POST['edd_fairaddress'] ) ? $_POST['edd_fairaddress'] : false;\r\n $payment_meta['fairsaving'] = isset( $_POST['edd_fairsaving'] ) ? $_POST['edd_fairsaving'] : false;\r\n // update the payment meta with the new array\r\n update_post_meta( $payment_id, '_edd_payment_meta', $payment_meta );\r\n}",
"public function update(Request $request, ShopMeta $shopMeta)\n {\n $shopMeta->update([\n 'user_id'=>auth()->user()->id,\n 'phone2'=>$request['phone2'],\n 'instagram'=>$request->instagram,\n 'telegram'=>$request->telegram,\n ]);\n\n }",
"function update_term_meta($term_id, $taxonomy, $meta_key, $meta_value, $prev_value = '') {\n\n return update_metadata('post', $post_id, $meta_key, $meta_value, $prev_value);\n}",
"function DoctorAppointment_meta_save($post_id){\n $is_auto_save = wp_is_post_autosave( $post_id );\n $is_revision = wp_is_post_revision( $post_id );\n $is_valid_nonce = (isset($_POST['DoctorAppointment_nonce']) && \n wp_verify_nonce( $_POST['DoctorAppointment_nonce'], basename(__FILE__)))? 'true' : 'false';\n \n // return if ina auto svae , revision of non valid nouncer\n if($is_auto_save || $is_revision || !$is_valid_nonce){\n return ;\n }\n \n // update DoctorAppointment_id\n if(isset($_POST[\"DoctorAppointment_id\"])){\n update_post_meta( $post_id, \"DoctorAppointment_id\",sanitize_text_field( $_POST[\"DoctorAppointment_id\"]) );\n\n }\n\n // update DoctorAppointment_name\n if(isset($_POST[\"DoctorAppointment_name\"])){\n update_post_meta( $post_id, \"DoctorAppointment_name\",sanitize_text_field( $_POST[\"DoctorAppointment_name\"]) );\n \n }\n\n // update DoctorAppointment_email\n if(isset($_POST[\"DoctorAppointment_email\"])){\n update_post_meta( $post_id, \"DoctorAppointment_email\",sanitize_email( $_POST[\"DoctorAppointment_email\"]) );\n \n }\n\n // update DoctorAppointment_mobile\n if(isset($_POST[\"DoctorAppointment_mobile\"])){\n update_post_meta( $post_id, \"DoctorAppointment_mobile\",sanitize_text_field( $_POST[\"DoctorAppointment_mobile\"]) );\n }\n\n\n // update DoctorAppointment_message\n if(isset($_POST[\"DoctorAppointment_message\"])){\n update_post_meta( $post_id, \"DoctorAppointment_message\", sanitize_text_field($_POST[\"DoctorAppointment_message\"]));\n }\n\n// still have to write code fo\n \n \n \n \n \n\n}",
"protected function put() {\n \t// Update room options\n \n }",
"public function setMeta($meta)\n {\n $this->setValue('meta', $meta);\n }",
"public function setMeta($meta)\n {\n $this->setValue('meta', $meta);\n }",
"public function update()\n {\n $this->_checkItem();\n $service = $this->getService();\n $entry = $service->getGbaseItemEntry( $this->getItem()->getGbaseItemId() );\n $this->setEntry($entry);\n $this->_prepareEnrtyForSave();\n $entry = $service->updateGbaseItem($this->getEntry());\n\n }",
"function vw_hospital_cs_savecustom_meta() {\n add_meta_box( 'cs_meta', __( 'Settings', 'vw-hospital' ), 'w_hospital_cs_appoint_callback' , 'Appointment','normal', 'high' ); \n}",
"protected function update_meta() {\n\t\t$changed = array_diff_assoc($this->meta, $this->cached_meta);\n\t\tforeach ($changed as $key => $value) {\n\t\t\tupdate_post_meta( $this->post->ID, '_speak_' . $key, $value );\n\t\t}\n\n\t\t// Update the internal cache\n\t\t$this->cached_meta = $this->meta;\n\n\t\treturn true;\n\t}",
"public function editAppointMent(appointmentClass $info,$id)\n { \n $values = array();\n $sqlUpdate=\"UPDATE appointment SET customer_name='\".$info->getCustomerName().\"',customer_mail='\".$info->getCustomerMail().\"',customer_id='\".$info->getCustomerID().\"',appointment_time='\".$info->getAppointment_time().\"',appointment_date='\".$info->getAppointment_date().\"' WHERE appointment_id='\".$id.\"'\";\n $this->execute($sqlUpdate,$values);\n }",
"public function update_meta( $post_id , $meta )\n\t{\n\t\t// $meta is typically $_POST[ $this->id_base ], but\n\t\t// the following silly scenario must be valid through this method:\n\t\t// $this->update_meta( $post_id, $this->get_meta( $post_id ) );\n\n\t\t// $meta needs to be fully sanitized and validated in this method\n\t\t// assume people -- even employees -- will try to hack this\n\t\t// review WP's methods and best practices for this thoroughly\n\t\t// http://codex.wordpress.org/Data_Validation\n\t\t// http://codex.wordpress.org/Function_Reference/wp_filter_nohtml_kses\n\n\t\t// make sure we have a valid post_id\n\t\tif ( ! $post_id = $this->sanitize_post_id( $post_id ) )\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t// what word are we talking about\n\t\t$sanitized_meta['word'] = wp_kses( $meta['word'], array() );\n\t\twp_set_object_terms( $post_id, $sanitized_meta['word'], $this->post_type_name . '_words', FALSE );\n\n\t\t// the pronunciation\n\t\t$sanitized_meta['pronunciation'] = wp_kses( $meta['pronunciation'], array() );\n\n\t\t// the part of speech\n\t\t$sanitized_meta['partofspeech'] = isset( $this->default_parts_of_speech[ $meta['partofspeech'] ] ) ? $meta['partofspeech'] : $meta_defaults['partofspeech'];\n\t\twp_set_object_terms( $post_id, $sanitized_meta['partofspeech'], $this->post_type_name . '_partsofspeech', FALSE );\n\n\t\t// save the meta\n\t\tupdate_post_meta( $post_id , $this->post_meta_key , $sanitized_meta );\n\n\t\t// updating the post title is a pain in the ass, just look at what happens when we try to save it\n\t\t$post = (object) array();\n\t\t$post->ID = $post_id;\n\n\t\t// update the title\n\t\t$post->post_title = $sanitized_meta['word'];\n\t\t$post->post_name = sanitize_title_with_dashes( $sanitized_meta['word'] . '-' . $sanitized_meta['partofspeech'] );\n\n\t\t// remove the save post action and revision support\n\t\tremove_post_type_support( $this->post_type_name , 'revisions' );\n\t\tremove_action( 'save_post', array( bdefinite(), 'save_post' ) ); // not using '$this' because it's ambiguous when this is called within a child class\n\n\t\t// update the post\n\t\twp_update_post( $post );\n\n\t\t// add back the save post action and revision support\n\t\tadd_action( 'save_post', array( bdefinite(), 'save_post' ) );\n\t\tadd_post_type_support( $this->post_type_name , 'revisions' );\n\n\t}",
"function vitero_grade_item_update(stdClass $vitero) {\n}",
"public function uploadMeta()\n\t{\n global $mysql;\n\n Debug::log('<hr><h1>Beginning meta update</h1><hr>', LEVEL_MAIN);\n \n $startTime = new DateTime();\n\n\t\t$version = $this->getVersionNumberFromFolder($this->folderlocation);\n\n\t\tif ($this->getVersionExistsInDatabase($version, $this->versionId) == null)\n\t\t{\n Debug::log('New version detected', LEVEL_MINIMUM);\n\n // Todo: Migrate to stored procedure\n $mysql->insert('wot_versions', array('version' => $version, 'published' => time()));\n\n $this->versionId = $mysql->getLastUpdatedId();\n\t\t}\n \n $this->deserializeWoTMetaFiles();\n $this->copyTranslationFiles();\n $this->updateTranslations();\n \n $this->vehicles_path = 'versions/' . $this->version . '/';\n \n $this->ImportEquipment();\n $this->ImportTankInformation();\n\n\n Debug::log('<hr><h1>Completed meta upate</h1>', LEVEL_MAIN);\n Debug::log('Meta update took '.$startTime->diff(new DateTime())->format('%I minutes and %S seconds'), LEVEL_MAIN);\n \n\t}",
"function update_meta_cache($meta_type, $object_ids)\n {\n }",
"public function update(BookRec $request, Book $book)\n {\n $request->validated();\n\n $book->barCode = $request->barCode;\n $book->title = $request->title;\n $book->author = $request->author;\n $book->price = $request->price;\n $book->quantity = $request->quantity;\n $book->available = $request->available;\n $book->description = $request->description;\n $book->save();\n\n return redirect()->route('books.index')->with('success', 'Book Has Been Created Successfully');\n }",
"protected function update() {}",
"private function save_paypal_meta_data()\n {\n $postMeta = [\n 'payer_email' => 'Payer PayPal address',\n 'first_name' => 'Payer first name',\n 'last_name' => 'Payer last name',\n 'payment_type' => 'Payment type',\n ];\n\n foreach ($postMeta as $key => $name) {\n $value = wc_clean($this->request->get($key, FILTER_DEFAULT));\n $value and update_post_meta($this->order->get_id(), $name, $value);\n }\n }",
"public static function save_meta( $post_id ) {\n\n\t\t/* Verify the nonce before proceeding. */\n\t\tif ( !isset( $_POST['sponsor-meta'] ) || !wp_verify_nonce( $_POST['sponsor-meta'], basename( __FILE__ ) ) )\n\t\t\treturn $post_id;\n\n\t\t$meta = array(\n\t\t\t'sponsor-url'\n\t\t);\n\n\t\tforeach ( $meta as $meta_key ) {\n\t\t\t$new_meta_value = $_POST[$meta_key];\n\n\t\t\t/* Get the meta value of the custom field key. */\n\t\t\t$meta_value = get_post_meta( $post_id, '_' . $meta_key , true );\n\n\t\t\t/* If there is no new meta value but an old value exists, delete it. */\n\t\t\tif ( '' == $new_meta_value && $meta_value )\n\t\t\t\tdelete_post_meta( $post_id, '_' . $meta_key , $meta_value );\n\n\t\t\t/* If a new meta value was added and there was no previous value, add it. */\n\t\t\telseif ( $new_meta_value && '' == $meta_value )\n\t\t\t\tadd_post_meta( $post_id, '_' . $meta_key , $new_meta_value, true );\n\n\t\t\t/* If the new meta value does not match the old value, update it. */\n\t\t\telseif ( $new_meta_value && $new_meta_value != $meta_value )\n\t\t\t\tupdate_post_meta( $post_id, '_' . $meta_key , $new_meta_value );\n\t\t}\n\t}",
"function update_comment_meta($comment_id, $meta_key, $meta_value, $prev_value = '')\n {\n }",
"protected function update_post_meta( &$order ) {\n\t\tglobal $wpdb;\n\n\t\t$edit_data = array(\n\t\t\t'order_key' => $order->get_order_key( 'edit' ),\n\t\t\t'customer_id' => $order->get_customer_id( 'edit' ),\n\t\t\t'payment_method' => $order->get_payment_method( 'edit' ),\n\t\t\t'payment_method_title' => $order->get_payment_method_title( 'edit' ),\n\t\t\t'transaction_id' => $order->get_transaction_id( 'edit' ),\n\t\t\t'customer_ip_address' => $order->get_customer_ip_address( 'edit' ),\n\t\t\t'customer_user_agent' => $order->get_customer_user_agent( 'edit' ),\n\t\t\t'created_via' => $order->get_created_via( 'edit' ),\n\t\t\t'date_completed' => $order->get_date_completed( 'edit' ),\n\t\t\t'date_paid' => $order->get_date_paid( 'edit' ),\n\t\t\t'cart_hash' => $order->get_cart_hash( 'edit' ),\n\n\t\t\t'billing_first_name' => $order->get_billing_first_name( 'edit' ),\n\t\t\t'billing_last_name' => $order->get_billing_last_name( 'edit' ),\n\t\t\t'billing_company' => $order->get_billing_company( 'edit' ),\n\t\t\t'billing_address_1' => $order->get_billing_address_1( 'edit' ),\n\t\t\t'billing_address_2' => $order->get_billing_address_2( 'edit' ),\n\t\t\t'billing_city' => $order->get_billing_city( 'edit' ),\n\t\t\t'billing_state' => $order->get_billing_state( 'edit' ),\n\t\t\t'billing_postcode' => $order->get_billing_postcode( 'edit' ),\n\t\t\t'billing_country' => $order->get_billing_country( 'edit' ),\n\n\t\t\t'billing_email' => $order->get_billing_email( 'edit' ),\n\t\t\t'billing_phone' => $order->get_billing_phone( 'edit' ),\n\n\t\t\t'shipping_first_name' => $order->get_shipping_first_name( 'edit' ),\n\t\t\t'shipping_last_name' => $order->get_shipping_last_name( 'edit' ),\n\t\t\t'shipping_company' => $order->get_shipping_company( 'edit' ),\n\t\t\t'shipping_address_1' => $order->get_shipping_address_1( 'edit' ),\n\t\t\t'shipping_address_2' => $order->get_shipping_address_2( 'edit' ),\n\t\t\t'shipping_city' => $order->get_shipping_city( 'edit' ),\n\t\t\t'shipping_state' => $order->get_shipping_state( 'edit' ),\n\t\t\t'shipping_postcode' => $order->get_shipping_postcode( 'edit' ),\n\t\t\t'shipping_country' => $order->get_shipping_country( 'edit' ),\n\n\t\t\t'discount_total' => $order->get_discount_total( 'edit' ),\n\t\t\t'discount_tax' => $order->get_discount_tax( 'edit' ),\n\t\t\t'shipping_total' => $order->get_shipping_total( 'edit' ),\n\t\t\t'shipping_tax' => $order->get_shipping_tax( 'edit' ),\n\t\t\t'cart_tax' => $order->get_total_tax( 'edit' ),\n\t\t\t'total' => $order->get_total( 'edit' ),\n\n\t\t\t'version' => $order->get_version( 'edit' ),\n\t\t\t'currency' => $order->get_currency( 'edit' ),\n\t\t\t'prices_include_tax' => $order->get_prices_include_tax( 'edit' ),\n\t\t);\n\n\t\t$changes = array();\n\n\t\tif ( $this->creating ) {\n\t\t\t$wpdb->insert(\n\t\t\t\t\"{$wpdb->prefix}woocommerce_orders\",\n\t\t\t\tarray_merge( array(\n\t\t\t\t\t'order_id' => $order->get_id(),\n\t\t\t\t), $edit_data )\n\t\t\t);\n\n\t\t\t// We are no longer creating the order, it is created.\n\t\t\t$this->creating = false;\n\t\t} else {\n\t\t\t$changes = array_intersect_key( $edit_data, $order->get_changes() );\n\n\t\t\tif ( ! empty( $changes ) ) {\n\t\t\t\t$wpdb->update(\n\t\t\t\t\t\"{$wpdb->prefix}woocommerce_orders\",\n\t\t\t\t\t$changes,\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'order_id' => $order->get_id(),\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\t$updated_props = array_keys( (array) $changes );\n\n\t\t// If customer changed, update any downloadable permissions.\n\t\tif ( in_array( 'customer_user', $updated_props ) || in_array( 'billing_email', $updated_props ) ) {\n\t\t\t$data_store = WC_Data_Store::load( 'customer-download' );\n\t\t\t$data_store->update_user_by_order_id( $order->get_id(), $order->get_customer_id(), $order->get_billing_email() );\n\t\t}\n\n\t\tdo_action( 'woocommerce_order_object_updated_props', $order, $updated_props );\n\t}",
"protected function set_meta( $meta ) {\n\t\t$this->meta = wp_parse_args( $meta, $this->meta );\n\t}",
"public function updated(ReservationPayment $ReservationPayment)\n {\n //\n }"
] | [
"0.705349",
"0.6823063",
"0.68111444",
"0.66619456",
"0.6560141",
"0.6476049",
"0.63927746",
"0.6223144",
"0.6060355",
"0.6024493",
"0.5988447",
"0.5980762",
"0.596906",
"0.58837885",
"0.58753985",
"0.58753985",
"0.58753985",
"0.58753985",
"0.58753985",
"0.585582",
"0.5834761",
"0.5795145",
"0.5788237",
"0.5723136",
"0.5666161",
"0.56421196",
"0.56391746",
"0.5631451",
"0.56177425",
"0.55804586",
"0.5574294",
"0.5565843",
"0.5542088",
"0.55247396",
"0.55242723",
"0.55152625",
"0.55118984",
"0.54887",
"0.54798424",
"0.5472411",
"0.54634476",
"0.5463232",
"0.5442021",
"0.5430829",
"0.5407217",
"0.53937757",
"0.53937757",
"0.53937757",
"0.53937757",
"0.53937757",
"0.53937757",
"0.53891164",
"0.53886837",
"0.538092",
"0.5372433",
"0.5369195",
"0.53673357",
"0.53462845",
"0.5340909",
"0.5335961",
"0.5333307",
"0.53332424",
"0.5332096",
"0.5329612",
"0.53295594",
"0.5318526",
"0.5317395",
"0.531377",
"0.53057265",
"0.5291314",
"0.52901274",
"0.5289451",
"0.5287327",
"0.5266563",
"0.52663946",
"0.52652436",
"0.5264668",
"0.5264569",
"0.52599674",
"0.52591836",
"0.52586496",
"0.52436894",
"0.5235511",
"0.5235511",
"0.5233477",
"0.5231773",
"0.52200043",
"0.5213996",
"0.52039325",
"0.5201369",
"0.5192029",
"0.51913184",
"0.51862645",
"0.51854116",
"0.5181923",
"0.5173186",
"0.5165148",
"0.51637936",
"0.51627004",
"0.5154889"
] | 0.75284314 | 0 |
Returns a meta entry for the booking | function wpbs_get_booking_meta($booking_id, $meta_key = '', $single = false)
{
return wp_booking_system()->db['bookingmeta']->get($booking_id, $meta_key, $single);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function get_booking_meta() {\n $meta = array();\n foreach ( $this->get_default_meta_data() as $key => $value ) {\n if ( $key !== 'services' ) {\n $meta[ $key ] = get_post_meta( $this->id, '_' . $key, true );\n } else {\n $meta[ $key ] = wp_get_post_terms( $this->id, YITH_WCBK_Post_Types::$service_tax, array( 'fields' => 'ids' ) );\n }\n }\n\n return $meta;\n }",
"function wpbs_get_booking($booking)\n{\n\n return wp_booking_system()->db['bookings']->get_object($booking);\n\n}",
"function get_meta() {\n\n\t\t// Get meta fields\n\t\t$post_id\t\t\t= $this->post_id;\n\t\t$capacity\t\t\t= get_post_meta( $post_id , 'event_capacity' , true );\n\t\t$this->capacity\t\t= ( '' == $capacity ) ? 9999 : $capacity;\n\t\t$this->req_rsvp\t\t= get_post_meta( $post_id , 'event_rsvp' , true );\n\t\t$this->req_role\t\t= get_post_meta( $post_id , 'event_role' , true );\n\t\t$rsvps\t\t\t\t= get_post_meta( $post_id , 'event_rsvps' , true );\n\n\t\t// Sort responses alphabetically by name\n\t\tif( !empty( $rsvps ) ) :\n\t\t\t$names = array();\n\t\t\t\n\t\t\t// Get user information\n\t\t\tforeach ($rsvps as $user_id => $info) {\n\t\t\t\t$name = bp_core_get_user_displayname( $user_id );\n\t\t\t\t$link = bp_core_get_userlink( $user_id );\n\t\t\t\t$rsvps[$user_id]['id']\t\t= $user_id;\n\t\t\t\t$rsvps[$user_id]['name'] \t= $name;\n\t\t\t\t$rsvps[$user_id]['link'] \t= $link;\n\t\t\t\t$names[$user_id] \t\t\t= strtolower( $name );\n\t\t\t}\n\t\t\t\n\t\t\t// Sort the array alphabetically\n\t\t\tarray_multisort($names, SORT_STRING, $rsvps);\n\t\t\t\n\t\t\t// Restore the user_id keys\n\t\t\t$temp = array();\n\t\t\tfor ( $i = 0; $i < count( $rsvps ); $i++ )\n\t\t\t\t$temp[$rsvps[$i]['id']] = $rsvps[$i];\t\n\t\t\t$rsvps = $temp;\n\t\telse :\n\t\t\t$rsvps = array();\n\t\tendif;\n\n\t\t// Add the array of RSVPS to the object\n\t\t$this->rsvps = $rsvps;\n\n\t\t// Count Attendance\n\t\t$confirmed \t= 0;\n\t\t$maybe \t\t= 0;\n\t\t$declined \t= 0;\n\t\tforeach ( $rsvps as $response ) {\n\t\t\tif ( 'yes' == $response['rsvp'] )\t\t$confirmed++;\n\t\t\telseif ( 'maybe' == $response['rsvp'] ) $maybe++;\n\t\t\telseif ( 'no' == $response['rsvp'] )\t$declined++;\n\t\t}\n\n\t\t// Add response counts to the object\n\t\t$this->confirmed = $confirmed;\n\t\t$this->maybe = $maybe;\n\t\t$this->declined = $declined;\n\n\t\t// Check the user's response\n\t\tif ( isset( $rsvps[get_current_user_id()] ) ) {\n\t\t\tswitch ( $rsvps[get_current_user_id()]['rsvp'] ) {\n\t\t\t\tcase \"yes\" :\n\t\t\t\t\t$rsvp = \"Attending\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"no\" :\n\t\t\t\t\t$rsvp = \"Absent\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"maybe\" :\n\t\t\t\t\t$rsvp = \"Maybe\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\telse $rsvp = \"RSVP\";\n\t\t$this->rsvp = $rsvp;\n\n\t\t// Get date information\n\t\t$this->time\t= get_the_date( 'g:ia' );\n\t\t$this->day\t= get_the_date( 'l' );\n\t\t$this->date\t= get_the_date( 'M j' );\n\n\t\t// Has it passed?\n\t\t$this->is_past = ( strtotime( get_the_date( \"Y-m-d\\TH:i \\E\\S\\T\" ) ) < time() ) ? true : false;\n\t}",
"function wpbs_add_booking_meta($booking_id, $meta_key, $meta_value, $unique = false)\n{\n\n return wp_booking_system()->db['bookingmeta']->add($booking_id, $meta_key, $meta_value, $unique);\n\n}",
"public function get_meta() {\n\t\treturn $this->meta;\n\t}",
"public function get_meta() {\n\t\treturn $this->meta;\n\t}",
"public function detailData($booking_id)\n {\n return DB::table('bookings')->where('booking_id', $booking_id)->first();\n }",
"public function meta()\n {\n return $this->meta;\n }",
"public function getMeta() {\n return $this->meta;\n }",
"function get_book_meta( $id, $key, $single = true ) {\r\n\tif ( strpos($key, 'book_') === false )\r\n\t\t$key = \"book_$key\";\r\n\treturn get_post_meta($id, $key, $single);\r\n}",
"public function getMeta();",
"public function getMeta();",
"public function getMeta()\n {\n return $this->getValue('meta');\n }",
"public function getMeta()\n {\n return $this->getValue('meta');\n }",
"public function getMeta()\n {\n return $this->meta;\n }",
"public function getMeta()\n {\n return $this->meta;\n }",
"public function getMeta()\n {\n return $this->meta;\n }",
"public function getMeta()\n {\n return $this->meta;\n }",
"public function getMeta()\n {\n return $this->meta;\n }",
"public function getMeta(){\n // $this->meta();\n }",
"public function getMeta() {\n return $this->meta;\n }",
"public function show(Booking $booking)\n {\n return $booking;\n }",
"public function metadata()\n {\n return $this->hasOne(EntryMeta::class);\n }",
"protected function meta() {\n if (!$this->_meta) {\n // Initialize at first call\n $this->_meta = new \\stdClass();\n if (!$this->isNewRecord && $this->{static::meta_id_field()}) {\n foreach ($this->meta as $meta_row) {\n $this->_meta->{static::meta_prefix() . $meta_row->meta_key} = $meta_row->meta_value;\n }\n }\n }\n return $this->_meta;\n }",
"public function getMeta()\n {\n return $this->Meta;\n }",
"public function getBook()\n\t{\n\t\treturn $this->getKeyValue('book'); \n\n\t}",
"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 }",
"function get_booking(){\r\n\t\tglobal $EM_Booking;\r\n\t\tif( is_object($this->booking) && get_class($this->booking)=='EM_Booking' && ($this->booking->id == $this->booking_id || (empty($this->id) && empty($this->booking_id))) ){\r\n\t\t\treturn $this->booking;\r\n\t\t}elseif( is_object($EM_Booking) && $EM_Booking->id == $this->booking_id ){\r\n\t\t\t$this->booking = $EM_Booking;\r\n\t\t}else{\r\n\t\t\tif(is_numeric($this->booking_id)){\r\n\t\t\t\t$this->booking = new EM_Booking($this->booking_id);\r\n\t\t\t}else{\r\n\t\t\t\t$this->booking = new EM_Booking();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn apply_filters('em_ticket_booking_get_booking', $this->booking, $this);;\r\n\t}",
"public function getMetaAttribute(): object\n {\n return $this->getMetas();\n }",
"function get_meta( $key = '' ) {\n\t\tif ( $key ) {\n\t\t\tif ( empty( $this->meta[ $key ] ) )\n\t\t\t\treturn;\n\n\t\t\t$meta = $this->meta[ $key ];\n\t\t} else {\n\t\t\t$meta = $this->meta;\n\t\t}\n\t\treturn $meta;\n\t}",
"function meta($key) {\n return get_post_meta($post->ID, $key, true);\n}",
"public function get_meta( $key = '', $single = false );",
"public function meta($name = null) {\n if ( $name === null ) {\n return $this->metaCache;\n }\n else {\n return @$this->metaCache[$name];\n }\n }",
"public function meta($key)\n {\n return $this->meta[$key] ?? null;\n }",
"public static function getMetaData()\n {\n // _deprecated_function( __FUNCTION__, '1.4.1');\n\n global $post;\n\n $meta = new stdClass();\n\n $active = get_post_meta($post->ID, Pronamic_Google_Maps_Post::META_KEY_ACTIVE, true);\n $meta->active = filter_var($active, FILTER_VALIDATE_BOOLEAN);\n\n $meta->latitude = null;\n $value = get_post_meta($post->ID, Pronamic_Google_Maps_Post::META_KEY_LATITUDE, true);\n if ($value != '') {\n $meta->latitude = (float)$value;\n }\n $meta->longitude = null;\n $value = get_post_meta($post->ID, Pronamic_Google_Maps_Post::META_KEY_LONGITUDE, true);\n if ($value != '') {\n $meta->longitude = (float)$value;\n }\n\n $meta->mapType = self::MAP_TYPE_DEFAULT;\n $value = get_post_meta($post->ID, Pronamic_Google_Maps_Post::META_KEY_MAP_TYPE, true);\n if ($value != '') {\n $meta->mapType = $value;\n }\n\n $meta->zoom = self::MAP_ZOOM_DEFAULT;\n $value = get_post_meta($post->ID, Pronamic_Google_Maps_Post::META_KEY_ZOOM, true);\n if ($value != '') {\n $meta->zoom = (int)$value;\n }\n\n $meta->title = get_post_meta($post->ID, Pronamic_Google_Maps_Post::META_KEY_TITLE, true);\n\n $description = get_post_meta($post->ID, Pronamic_Google_Maps_Post::META_KEY_DESCRIPTION, true);\n if (!is_admin()) {\n $description = apply_filters('pronamic_google_maps_item_description', $description);\n }\n $meta->description = $description;\n\n $meta->address = get_post_meta($post->ID, Pronamic_Google_Maps_Post::META_KEY_ADDRESS, true);\n\n $meta = apply_filters('pronamic_google_maps_post_meta', $meta);\n\n return $meta;\n }",
"public function metaTag()\n {\n return $this->meta()->where('id', $this->meta_id)->first();\n }",
"function getMeta(){\n\t\t$AccessToken = Auth::token();\n\t\t$baseUrl = url . '/api/v1/' . customerAlias . '/' . databaseAlias;\n\t\t$endpoint = '/meta';\n\t\t$request = $baseUrl . $endpoint;\n\t\t$ch = curl_init();\n\t\tcurl_setopt_array($ch, array(\n\t\t CURLOPT_HTTPGET => true,\n\t\t CURLOPT_HTTPHEADER => array(\n\t\t\t\t'Authorization: Bearer ' . $AccessToken),\n\t\t CURLOPT_URL => $request,\n\t\t\tCURLOPT_RETURNTRANSFER => 1\n\t\t ));\n\t\t$response = curl_exec($ch);\n\t\tcurl_close($ch);\n\t\treturn $response;\n\t}",
"public function getMetaInfo() {\n return $this->meta;\n }",
"public static function get_meta_table();",
"private function getMeta() {\n $metadata = array(\n 'title' => 'User', \n 'desc' => 'Request URL: ' . Config::get('app.api_url'), \n 'meta' => array( \n 'title' => 'User | Seeties', \n 'description' => 'Sample meta description' \n ),\n 'sidebar' => View::make('user.sidebar')\n );\n\n return $metadata;\n }",
"public function getEntry();",
"function getBookingDetailsByBookingId($bookingid) {\n $query = \"SELECT * FROM `bookingdetails` WHERE BookingId='\".$bookingid.\"'\";\n $result = Database::selectQuery($query);\n if($result == null) {\n return null;\n } else {\n return $result;\n }\n }",
"public function booking()\n {\n return $this->hasOne('App\\Booking','id_stato_prenotazione','id_stato_prenotazione');\n }",
"function get_metadata($meta_type, $object_id, $meta_key = '', $single = \\false)\n {\n }",
"public function booking()\n {\n return $this->belongsTo(Booking::class);\n }",
"public function get_meta( $key ) {\n\t\treturn isset( $this->data['meta'][ $key ] ) ? $this->data['meta'][ $key ] : null;\n\t}",
"public function booking()\n {\n return $this->belongsTo(\\App\\Booking::class);\n }",
"public function metaProvider()\n {\n return [[new \\Urbania\\AppleNews\\Api\\Objects\\Meta()]];\n }",
"function get_student_meta( $student_id, $key = '', $single = false ) {\n return get_metadata( 'student', $student_id, $key, $single );\n }",
"abstract public function get_meta_key();",
"public function meta(){\n $table_meta = new \\stdClass();\n\n // get fields in the database table\n if(count($this->_model_meta)==0){\n $this->_meta();\n }\n\n\n foreach ($this->_model_meta as $meta) {\n $table_meta->{$meta->name} = $meta;\n }\n\n return $table_meta;\n }",
"function the_meta()\n {\n }",
"public function meta($key=false) {\n $object = $this->hasMany('VenueMeta');\n if($key) {\n $object = $object->where('meta_key',$key)->first();\n if( $object ) return $object->meta_value;\n } else {\n $voucher_meta = [];\n foreach ($object->get()->toArray() as $meta) {\n if( substr( $meta['meta_key'], 0, 8 ) == '_secure_' ) {\n $voucher_meta[$meta['meta_key']] = _jsondecrypt( $meta['meta_value'] );\n } else {\n $voucher_meta[$meta['meta_key']] = $meta['meta_value'];\n }\n }\n return $voucher_meta;\n }\n return null;\n }",
"public function get( $meta_name, $single = true ) {\r\n\t\t$meta_name = '_campaign_' . $meta_name;\r\n\t\treturn get_post_meta( $this->post->ID, $meta_name, $single );\r\n\t}",
"public function getMeta($key) {\n\t\t$meta = $this->getMetaData();\n\t\treturn isset($meta[$key]) ? $meta[$key] : null;\n\t}",
"function sc_get_post_meta( $id, $key ){\n\treturn (object)get_post_meta( $id, $key, true );\n}",
"public function loadBookingInformation()\n {\n $this->booking = Booking::with([\n 'usedCoupon',\n 'bookingPeriods',\n 'bookingAddOns.addOn',\n 'AdhocItems',\n ])->find(json_decode($this->request->booking, true)['id']);\n }",
"public function metaField()\n {\n return $this->belongsTo(\n MetaField::class,\n self::COLUMN_META_FIELD_ID\n );\n }",
"public function getMeta(): LaramoreMeta\n {\n return Meta::getForTableName($this->getTableName());\n }",
"public function show(Booking $booking)\n {\n //\n }",
"public function show(Booking $booking)\n {\n //\n }",
"public function show(Booking $booking)\n {\n //\n }",
"public function show(Booking $booking)\n {\n //\n }",
"public function show(Booking $booking)\n {\n //\n }",
"function wpbs_get_translated_booking_meta($booking_id, $meta_key, $language_code)\n{\n $translated_meta = wpbs_get_booking_meta($booking_id, $meta_key . '_translation_' . $language_code, true);\n\n if (!empty($translated_meta)) {\n return $translated_meta;\n }\n\n return wpbs_get_booking_meta($booking_id, $meta_key, true);\n}",
"public function getMeta($meta)\n {\n if (!isset($this->metas[$meta])) {\n return;\n }\n\n return $this->metas[$meta];\n }",
"public static function getMeta() {\n return json_decode(\n '['\n . ' {'\n . ' \"name\":\"appointment_id\",'\n . ' \"type\":\"int\",'\n . ' \"default\": null'\n . ' },'\n . ' {'\n . ' \"name\":\"appointment_patient_id\",'\n . ' \"type\":\"int\",'\n . ' \"default\": null'\n . ' },'\n . ' {'\n . ' \"name\":\"appointment_time\",'\n . ' \"type\":\"varchar\",'\n . ' \"default\": null'\n . ' },'\n . ' {'\n . ' \"name\":\"appointment_date\",'\n . ' \"type\":\"varchar\",'\n . ' \"default\": null'\n . ' },'\n . ' {'\n . ' \"name\":\"appointment_reason\",'\n . ' \"type\":\"varchar\",'\n . ' \"default\": null'\n . ' },'\n . ' {'\n . ' \"name\":\"appointment_doctor_id\",'\n . ' \"type\":\"int\",'\n . ' \"default\": null'\n . ' },'\n . ' {'\n . ' \"name\":\"appointment_cncl\",'\n . ' \"type\":\"varchar\",'\n . ' \"default\": null'\n . ' },'\n . ' {'\n . ' \"name\":\"appointment_cncl_reason\",'\n . ' \"type\":\"varchar\",'\n . ' \"default\": null'\n . ' },'\n . ' {'\n . ' \"name\":\"doctor_firstname\",'\n . ' \"type\":\"varchar\",'\n . ' \"default\": null'\n . ' },'\n . ' {'\n . ' \"name\":\"doctor_lastname\",'\n . ' \"type\":\"varchar\",'\n . ' \"default\": null'\n . ' },'\n . ' {'\n . ' \"name\":\"user_firstname\",'\n . ' \"type\":\"varchar\",'\n . ' \"default\": null'\n . ' },'\n . ' {'\n . ' \"name\":\"user_lastname\",'\n . ' \"type\":\"varchar\",'\n . ' \"default\": null'\n . ' },'\n . ' {'\n . ' \"name\":\"appointment_state_descr\",'\n . ' \"type\":\"varchar\",'\n . ' \"default\": null'\n . ' },'\n . ' {'\n . ' \"name\":\"appointment_cncl_descr\",'\n . ' \"type\":\"varchar\",'\n . ' \"default\": null'\n . ' }'\n . ']'\n );\n }",
"public function meta($key = null)\n {\n if (is_null($key)) {\n return $this->meta;\n }\n\n return $this->meta[$key];\n }",
"public static function meta();",
"public function getMetaData(): object\n\t{\n\t\treturn $this->metaData;\n\t}",
"public function info($code)\n {\n $booking = Booking::with('flightFrom', 'flightBack', 'passengers')\n ->where('code', $code)->first();\n\n $booking->flightFrom->setDate($booking->date_from);\n\n if (!empty($booking->flightBack)) {\n $booking->flightBack->setDate($booking->date_back);\n }\n\n return new BookingResource($booking);\n }",
"function print_special_event_meta_info() {\n\t// Date.\n\tif ( get_field( 'begin_date' ) ) {\n\t\t$date = get_special_event_date_format();\n\n\t\tprintf(\n\t\t\t'<h3>%1$s</h3>\n\t\t<p class=\"event-dates\">%2$s</p>',\n\t\t\tget_field( 'end_date' ) ? 'Dates' : 'Date',\n\t\t\t$date['human']\n\t\t);\n\t}\n\n\t// Location.\n\tif ( get_field( 'location' ) ) {\n\t\t$location = get_field( 'location' );\n\n\t\tprintf(\n\t\t\t'<h3>Location</h3>\n\t\t<p class=\"location\"><a href=\"https://www.google.com/maps/search/%1$s\" target=\"_blank\">%1$s</a></p>',\n\t\t\t$location['address']\n\t\t);\n\t}\n\n\t// Keynote speakers.\n\tif ( get_field( 'keynote_speaker' ) ) {\n\n\t\t$speaker_args = array(\n\t\t\t'post_type' => 'special_speaker',\n\t\t\t'post_status' => 'publish',\n\t\t\t'posts_per_page' => -1,\n\t\t\t'post__in' => get_field( 'keynote_speaker' ),\n\t\t\t'order' => 'ASC',\n\t\t\t'orderby' => 'meta_value',\n\t\t\t'meta_key' => 'sort_order',\n\t\t\t'cache_results' => true,\n\t\t\t'update_post_meta_cache' => true,\n\t\t\t'update_post_term_cache' => true,\n\t\t);\n\n\t\t$special_speaker_query = new WP_Query( $speaker_args );\n\n\t\tif ( $special_speaker_query->have_posts() ) {\n\t\t\techo '<h3>Keynote Speaker' . ( $special_speaker_query->post_count === 1 ? '' : 's' ) . '</h3>';\n\n\t\t\twhile ( $special_speaker_query->have_posts() ) {\n\t\t\t\t$special_speaker_query->the_post();\n\t\t\t\techo wp_kses_post( get_featured_speaker_info( get_the_ID(), $special_speaker_query->found_posts ) );\n\t\t\t}\n\t\t}\n\n\t\twp_reset_postdata();\n\t}\n\n\t// Speakers.\n\tif ( get_field( 'special_speaker' ) ) {\n\n\t\t$speaker_args = array(\n\t\t\t'post_type' => 'special_speaker',\n\t\t\t'post_status' => 'publish',\n\t\t\t'posts_per_page' => -1,\n\t\t\t'post__in' => get_field( 'special_speaker' ),\n\t\t\t'order' => 'ASC',\n\t\t\t'orderby' => 'meta_value',\n\t\t\t'meta_key' => 'sort_order',\n\t\t\t'cache_results' => true,\n\t\t\t'update_post_meta_cache' => true,\n\t\t\t'update_post_term_cache' => true,\n\t\t);\n\n\t\t$special_speaker_query = new WP_Query( $speaker_args );\n\n\t\tif ( $special_speaker_query->have_posts() ) {\n\t\t\techo '<h3>Special Speaker' . ( 1 === $special_speaker_query->post_count ? '' : 's' ) . '</h3>';\n\n\t\t\twhile ( $special_speaker_query->have_posts() ) {\n\t\t\t\t$special_speaker_query->the_post();\n\t\t\t\techo wp_kses_post( get_featured_speaker_info( get_the_ID(), $special_speaker_query->found_posts ) );\n\t\t\t}\n\t\t}\n\n\t\twp_reset_postdata();\n\t}\n}",
"public function getMetaTags()\n {\n $datetimeString = date('n/d/y @ g:ia', strtotime($this->eventdatetime->starttime));\n if ($this->isAllDay()) {\n $datetimeString = date('n/d/y', strtotime($this->eventdatetime->starttime));\n }\n\n $title = $this->event->displayTitle($this) . ' - ' . $datetimeString;\n\n // Add a description if it is set\n $description = 'Event on ' . $datetimeString;\n if (isset($this->event->description) && !empty($this->event->description)) {\n $description = $this->event->description;\n }\n\n // Add a image if it is set\n $image = '';\n if (isset($this->event->imagedata) && !empty($this->event->imagedata)) {\n $image = MetaTagUtility::getSiteURL() . '?image&id=' . $this->event->id;\n }\n\n // Build the options\n $options = array(\n 'image' => $image,\n 'label1' => 'Calendar',\n 'data1' => $this->calendar->name,\n );\n\n $location = $this->eventdatetime->getLocation();\n $webcast = $this->eventdatetime->getWebcast();\n\n if ($location !== false && $webcast !== false) {\n $options['label2'] = 'In-Person and Online';\n $options['data2'] = $location->name . ' & ' . $webcast->title;\n } elseif ($location !== false) {\n $options['label2'] = 'Location';\n $options['data2'] = $location->name;\n } elseif ($webcast !== false) {\n $options['label2'] = 'Virtual Location';\n $options['data2'] = $webcast->title;\n }\n\n $metaTagUtility = new MetaTagUtility($this->getURL(), $title, $description, $options);\n\n return $metaTagUtility->getMetaTags();\n }",
"public function getMeta() {\n return $this->hasMany(Meta::class,\n ['owner_id' => static::meta_id_field()])->andWhere([Meta::tableName() . '.owner' => static::tableName()]);\n }",
"public function meta()\n {\n return array_merge([\n 'meta' => [\n 'cardHeight' => $this->getHeight(),\n 'seriesLabels' => $this->seriesLabels(),\n 'colors' => $this->colors(),\n 'showMarkers' => $this->showMarkers(),\n 'refreshRate' => $this->refreshRate()\n ]\n ], $this->withMeta([]));\n }",
"function acitpo_entry_meta() {\n\tglobal $post;\n\tif (is_page()) { return; }\n\t$categories = get_the_category_list(__(', ', 'acitpo'));\n\n\tprintf('<span class=\"date-link\"><a href=\"%1$s\" title=\"%2$s\" rel=\"bookmark\"><time class=\"entry-date\" datetime=\"%3$s\">%4$s</time></a></span>', esc_attr(get_permalink()), esc_attr(get_the_time()), esc_attr(get_the_time('c')), esc_html(get_the_date()));\n\tif ($categories) {\n\t\tprintf('<span class=\"category-links\">%s</span>', $categories);\n\t}\n\tprintf('<span class=\"author-link vcard\"><a href=\"%1$s\" title=\"%2$s\" rel=\"author\">%3$s</a></span>', esc_attr(get_author_posts_url(get_the_author_meta('ID'))), esc_attr(sprintf(__('View all posts by %s', 'acitpo'), get_the_author())), esc_html(get_the_author()));\n}",
"public function getMeta($key)\n {\n return array_key_exists($key, $this->properties) ? $this->properties[$key] : null;\n }",
"public function getMetaByKey($key)\n {\n return $this->metas()->where('key', $key)->first();\n }",
"function brag_rest_meta_get_flamingo( $object, $field_name, $request ) {\n\n\t$meta = get_post_meta( $object[ 'id' ], '_meta' );\n\n\treturn $meta;\n}",
"function getmeta($params) {\n\t\trequire_once('deriveMetaData.class.php');\n\t\t$dbh = getConnection('ID');\n\t\t$getMeta = new DeriveMetaData();\n\t\t$getMeta->setdbh($dbh);\n\t\t$getMeta->setSQL($params->query);\n\t\t$retval = new \\stdClass();\n\t\t$retval->metaData = $getMeta->getPHPObject();\n\t\treturn $retval;\n}",
"function getMeta()\n {\n if (!$this->meta)\n $this->meta = new DataEntity;\n\n return $this->meta;\n }",
"function meta($name, $value = NULL)\n {\n return get_instance()->theme->meta($name, $value);\n }",
"public function get_value() {\r\n\t\tif ( $this->key === 'job_title' ) {\r\n\t\t\treturn $this->listing->get_name();\r\n\t\t}\r\n\r\n\t\tif ( $this->key === 'job_description' ) {\r\n\t\t\treturn $this->listing->get_data('post_content');\r\n\t\t}\r\n\r\n\t\t// othewise, retrieve from wp_postmeta\r\n\t\treturn get_post_meta( $this->listing->get_id(), '_'.$this->key, true );\r\n\t}",
"public function _meta(){\n if(!$this->db->table_exists($this->table_name())):\n throw new OrmExceptions(sprintf(\"The table %s does not exist\", $this->table_name()));\n endif;\n\n if(empty($this->_model_meta )){\n $this->_model_meta = $this->db->field_data($this->table_name());\n $this->_fields_loaded = TRUE;\n }\n return $this->_model_meta ;\n }",
"function affwp_get_referral_meta( $referral_id, $meta_key = '', $single = false ) {\n\treturn affiliate_wp()->referral_meta->get_meta( $referral_id, $meta_key, $single );\n}",
"private function getMetaData ()\n\t\t{\n\t\t\t$data = file_get_contents (\"META.inf\");\n\t\t\t$o = json_decode ($data,true);\n\t\t\treturn $o;\t\n\t\t}",
"public static function metaDate($post = null)\n {\n echo __METHOD__;\n $meta = get_post_meta($post->ID);\n echo '<pre>';\n print_r($meta);\n echo '</pre>';\n /*\n * repeat_start\n * repeat_end\n */\n print_r($post);\n }",
"function update_booking_meta( $meta ) {\n foreach ( $meta as $key => $value ) {\n if ( $key !== 'services' ) {\n update_post_meta( $this->id, '_' . $key, $value );\n } else {\n wp_set_post_terms( $this->id, $value, YITH_WCBK_Post_Types::$service_tax );\n }\n }\n }",
"function wpbs_update_booking_meta($booking_id, $meta_key, $meta_value, $prev_value = '')\n{\n\n return wp_booking_system()->db['bookingmeta']->update($booking_id, $meta_key, $meta_value, $prev_value);\n\n}",
"public function getInstanceDetail()\n {\n return $this->get(self::_INSTANCE_DETAIL);\n }",
"function wprt_entry_meta() {\n\t// Get meta items from theme mod\n\t$meta_item = wprt_get_mod( 'blog_entry_meta_items', array( 'date', 'author', 'comments' ) );\n\n\t// If blocks are 100% empty return defaults\n\t$meta_item = $meta_item ? $meta_item : 'date,author,comments';\n\n\t// Turn into array if string\n\tif ( $meta_item && ! is_array( $meta_item ) ) {\n\t\t$meta_item = explode( ',', $meta_item );\n\t}\n\n\t// Set keys equal to values\n\t$meta_item = array_combine( $meta_item, $meta_item );\n\n\t// Loop through items\n\tforeach ( $meta_item as $item ) :\n\t\tif ( 'author' == $item ) { \n\t\t\tprintf( '<span class=\"post-by-author item\"><span class=\"inner\">By <a href=\"%s\" title=\"%s\" rel=\"author\">%s</a></span></span>',\n\t\t\t\tesc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),\n\t\t\t\tesc_attr( sprintf( esc_html__( 'View all posts by %s', 'fundrize' ), get_the_author() ) ),\n\t\t\t\tget_the_author()\n\t\t\t\t);\n\t\t}\n\t\telseif ( 'date' == $item ) {\n\t\t\tprintf( '<span class=\"post-date item\"><span class=\"inner\"><span class=\"entry-date\">%1$s</span></span></span>',\n\t\t\t\tget_the_date()\n\t\t\t);\n\t\t}\n\t\telseif ( 'comments' == $item ) {\n\t\t\tif ( comments_open() || get_comments_number() ) {\n\t\t\t\techo '<span class=\"post-comment item\"><span class=\"inner\">';\n\t\t\t\tcomments_popup_link( esc_html__( '0 comment', 'fundrize' ), esc_html__( '1 Comment', 'fundrize' ), esc_html__( '% Comments', 'fundrize' ) );\n\t\t\t\techo '</span></span>';\n\t\t\t}\n\t\t}\n\t\telseif ( 'categories' == $item ) {\n\t\t\techo '<span class=\"post-meta-categories item\"><span class=\"inner\">';\n\t\t\tthe_category( ', ', get_the_ID() );\n\t\t\techo '</span></span>';\n\t\t}\n\tendforeach;\n}",
"function thememount_entry_meta($echo = true) {\n\t$return = '';\n\t\n\tglobal $post;\n\t\n\tif( isset($post->post_type) && $post->post_type=='page' ){\n\t\treturn;\n\t}\n\t\n\t\n\t$postFormat = get_post_format();\n\t\n\t// Post author\n\t$categories_list = get_the_category_list( __( ', ', 'howes' ) ); // Translators: used between list items, there is a space after the comma.\n\t$tag_list = get_the_tag_list( '', __( ', ', 'howes' ) ); // Translators: used between list items, there is a space after the comma.\n\t$num_comments = get_comments_number();\n\t\n\t$return .= '<div class=\"thememount-meta-details\">';\n\t\t// Date\n\t\t$return .= '<span class=\"tm-date-wrapper\"><i class=\"tmicon-fa-clock-o\"></i> ' . get_the_date() . '</span>';\n\n\t\tif ( 'post' == get_post_type() ) {\n\t\t\tif( !is_single() ){\n\t\t\t\t$return .= sprintf( '<div class=\"thememount-post-user\"><span class=\"author vcard\"><i class=\"tmicon-fa-user\"></i> <a class=\"url fn n\" href=\"%1$s\" title=\"%2$s\" rel=\"author\">%3$s</a></span></div>',\n\t\t\t\t\tesc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),\n\t\t\t\t\tesc_attr( sprintf( __( 'View all posts by %s', 'howes' ), get_the_author() ) ),\n\t\t\t\t\tget_the_author()\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\tif ( $tag_list ) { $return .= '<span class=\"tags-links\"><i class=\"tmicon-fa-tags\"></i> ' . $tag_list . '</span>'; };\n\t\tif ( $categories_list ) { $return .= '<span class=\"categories-links\"><i class=\"tmicon-fa-folder-open\"></i> ' . $categories_list . '</span>'; };\n\t\tif( !is_sticky() && comments_open() && ($num_comments>0) ){\n\t\t\t$return .= '<span class=\"comments\"><i class=\"tmicon-fa-comments\"></i> ';\n\t\t\t$return .= $num_comments;\n\t\t\t$return .= '</span>';\n\t\t}\n\n\t$return .= '</div>';\n\t\n\tif( $echo == true ){\n\t\techo $return;\n\t} else {\n\t\treturn $return;\n\t}\n\t\n\t\n}",
"function carton_get_order_item_meta( $item_id, $key, $single = true ) {\n\treturn get_metadata( 'order_item', $item_id, $key, $single );\n}",
"public function read_meta( &$object );",
"public function model()\n {\n return Booking::class;\n }",
"public function getMetas(): object\n {\n return (object) $this->metas->pluck('value', 'key')->toArray();\n }",
"public function getMeta($key)\n {\n return $this->userMeta()\n ->where('meta_key', $key)\n ->get();\n }",
"public function getMeta($key)\n {\n return $this->meta[$key] = get_post_meta($this->id, $key, true);\n }",
"public function getBook()\n {\n return $this->_book;\n }",
"function EM_Booking( $booking_data = false ){\r\n\t\tif( $booking_data !== false ){\r\n\t\t\t//Load booking data\r\n\t\t\t$booking = array();\r\n\t\t\tif( is_array($booking_data) ){\r\n\t\t\t\t$booking = $booking_data;\r\n\t\t\t\t//Also create a person out of this...\r\n\t\t\t \t$this->person = new EM_Person($booking_data);\r\n\t\t\t}elseif( $booking_data > 0 ){\r\n\t\t\t\t//Retreiving from the database\t\t\r\n\t\t\t\tglobal $wpdb;\t\t\t\r\n\t\t\t\t$sql = \"SELECT * FROM \". $wpdb->prefix . EM_BOOKINGS_TABLE .\" WHERE booking_id ='$booking_data'\"; \r\n\t\t\t \t$booking = $wpdb->get_row($sql, ARRAY_A);\r\n\t\t\t \t//Get the person for this booking\r\n\t\t\t \t$this->person = new EM_Person($booking['person_id']);\r\n\t\t\t}\r\n\t\t\t//Save into the object\r\n\t\t\t$this->to_object($booking);\r\n\t\t}\r\n\t}"
] | [
"0.66069955",
"0.6369954",
"0.61451024",
"0.6119425",
"0.6099613",
"0.6099613",
"0.6096732",
"0.5950852",
"0.59049326",
"0.59042037",
"0.5893344",
"0.5893344",
"0.58485353",
"0.58485353",
"0.58227235",
"0.58227235",
"0.58227235",
"0.58227235",
"0.58227235",
"0.5778372",
"0.57655406",
"0.5706976",
"0.5642161",
"0.5636022",
"0.559716",
"0.5596816",
"0.55842316",
"0.5549479",
"0.5548293",
"0.5539309",
"0.54829776",
"0.54750687",
"0.5466092",
"0.54567283",
"0.54484695",
"0.54109955",
"0.5402893",
"0.53906476",
"0.5360925",
"0.53531593",
"0.53444284",
"0.5330301",
"0.53260106",
"0.5313534",
"0.5313533",
"0.52994984",
"0.5295059",
"0.52947426",
"0.52946657",
"0.52946323",
"0.5287189",
"0.5286748",
"0.5281341",
"0.5277008",
"0.5272808",
"0.52720934",
"0.5252313",
"0.5240465",
"0.52376246",
"0.5236859",
"0.5236859",
"0.5236859",
"0.5236859",
"0.5236859",
"0.5235074",
"0.5209497",
"0.52039415",
"0.5193154",
"0.5186812",
"0.51712024",
"0.51634943",
"0.5159175",
"0.51542443",
"0.5148214",
"0.51451486",
"0.51430017",
"0.5139061",
"0.513643",
"0.5134614",
"0.51247126",
"0.5108663",
"0.5106147",
"0.510541",
"0.51031435",
"0.50938344",
"0.5082335",
"0.5080672",
"0.5076565",
"0.5073687",
"0.5069997",
"0.50584114",
"0.50529724",
"0.5049406",
"0.5039606",
"0.50377655",
"0.50319296",
"0.502985",
"0.50217575",
"0.50074935",
"0.5000451"
] | 0.7402602 | 0 |
Returns the translated meta entry for the booking | function wpbs_get_translated_booking_meta($booking_id, $meta_key, $language_code)
{
$translated_meta = wpbs_get_booking_meta($booking_id, $meta_key . '_translation_' . $language_code, true);
if (!empty($translated_meta)) {
return $translated_meta;
}
return wpbs_get_booking_meta($booking_id, $meta_key, true);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function wpbs_get_booking_meta($booking_id, $meta_key = '', $single = false)\n{\n\n return wp_booking_system()->db['bookingmeta']->get($booking_id, $meta_key, $single);\n\n}",
"function get_booking_meta() {\n $meta = array();\n foreach ( $this->get_default_meta_data() as $key => $value ) {\n if ( $key !== 'services' ) {\n $meta[ $key ] = get_post_meta( $this->id, '_' . $key, true );\n } else {\n $meta[ $key ] = wp_get_post_terms( $this->id, YITH_WCBK_Post_Types::$service_tax, array( 'fields' => 'ids' ) );\n }\n }\n\n return $meta;\n }",
"public function get( $meta_name, $single = true ) {\r\n\t\t$meta_name = '_campaign_' . $meta_name;\r\n\t\treturn get_post_meta( $this->post->ID, $meta_name, $single );\r\n\t}",
"public function get_meta() {\n\t\treturn $this->meta;\n\t}",
"public function get_meta() {\n\t\treturn $this->meta;\n\t}",
"function setup_meta_translation() {\n\t\t\tglobal $post, $wpdb;\n\t\t\t$post_id = $post->ID;\n\t\t\t\n\t\t\tforeach($this->arabic_meta_keys as $key ) {\n\t\t\t\tif ($post_id){\n\t\t\t\t\t$$key = get_post_meta($post_id, $key, true);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$$key = '';\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$the_post = get_post($post_id);\n\t\t\t\n\t\t\tinclude(dirname(__FILE__).'/views/ipc-meta-box-translation.php');\n\t\t}",
"function wpbs_get_booking($booking)\n{\n\n return wp_booking_system()->db['bookings']->get_object($booking);\n\n}",
"function get_book_meta( $id, $key, $single = true ) {\r\n\tif ( strpos($key, 'book_') === false )\r\n\t\t$key = \"book_$key\";\r\n\treturn get_post_meta($id, $key, $single);\r\n}",
"function getTranslationObject();",
"public function getMeta();",
"public function getMeta();",
"public function meta($key=false) {\n $object = $this->hasMany('VenueMeta');\n if($key) {\n $object = $object->where('meta_key',$key)->first();\n if( $object ) return $object->meta_value;\n } else {\n $voucher_meta = [];\n foreach ($object->get()->toArray() as $meta) {\n if( substr( $meta['meta_key'], 0, 8 ) == '_secure_' ) {\n $voucher_meta[$meta['meta_key']] = _jsondecrypt( $meta['meta_value'] );\n } else {\n $voucher_meta[$meta['meta_key']] = $meta['meta_value'];\n }\n }\n return $voucher_meta;\n }\n return null;\n }",
"function acitpo_entry_meta() {\n\tglobal $post;\n\tif (is_page()) { return; }\n\t$categories = get_the_category_list(__(', ', 'acitpo'));\n\n\tprintf('<span class=\"date-link\"><a href=\"%1$s\" title=\"%2$s\" rel=\"bookmark\"><time class=\"entry-date\" datetime=\"%3$s\">%4$s</time></a></span>', esc_attr(get_permalink()), esc_attr(get_the_time()), esc_attr(get_the_time('c')), esc_html(get_the_date()));\n\tif ($categories) {\n\t\tprintf('<span class=\"category-links\">%s</span>', $categories);\n\t}\n\tprintf('<span class=\"author-link vcard\"><a href=\"%1$s\" title=\"%2$s\" rel=\"author\">%3$s</a></span>', esc_attr(get_author_posts_url(get_the_author_meta('ID'))), esc_attr(sprintf(__('View all posts by %s', 'acitpo'), get_the_author())), esc_html(get_the_author()));\n}",
"public function getMeta()\n {\n return $this->getValue('meta');\n }",
"public function getMeta()\n {\n return $this->getValue('meta');\n }",
"function get_meta() {\n\n\t\t// Get meta fields\n\t\t$post_id\t\t\t= $this->post_id;\n\t\t$capacity\t\t\t= get_post_meta( $post_id , 'event_capacity' , true );\n\t\t$this->capacity\t\t= ( '' == $capacity ) ? 9999 : $capacity;\n\t\t$this->req_rsvp\t\t= get_post_meta( $post_id , 'event_rsvp' , true );\n\t\t$this->req_role\t\t= get_post_meta( $post_id , 'event_role' , true );\n\t\t$rsvps\t\t\t\t= get_post_meta( $post_id , 'event_rsvps' , true );\n\n\t\t// Sort responses alphabetically by name\n\t\tif( !empty( $rsvps ) ) :\n\t\t\t$names = array();\n\t\t\t\n\t\t\t// Get user information\n\t\t\tforeach ($rsvps as $user_id => $info) {\n\t\t\t\t$name = bp_core_get_user_displayname( $user_id );\n\t\t\t\t$link = bp_core_get_userlink( $user_id );\n\t\t\t\t$rsvps[$user_id]['id']\t\t= $user_id;\n\t\t\t\t$rsvps[$user_id]['name'] \t= $name;\n\t\t\t\t$rsvps[$user_id]['link'] \t= $link;\n\t\t\t\t$names[$user_id] \t\t\t= strtolower( $name );\n\t\t\t}\n\t\t\t\n\t\t\t// Sort the array alphabetically\n\t\t\tarray_multisort($names, SORT_STRING, $rsvps);\n\t\t\t\n\t\t\t// Restore the user_id keys\n\t\t\t$temp = array();\n\t\t\tfor ( $i = 0; $i < count( $rsvps ); $i++ )\n\t\t\t\t$temp[$rsvps[$i]['id']] = $rsvps[$i];\t\n\t\t\t$rsvps = $temp;\n\t\telse :\n\t\t\t$rsvps = array();\n\t\tendif;\n\n\t\t// Add the array of RSVPS to the object\n\t\t$this->rsvps = $rsvps;\n\n\t\t// Count Attendance\n\t\t$confirmed \t= 0;\n\t\t$maybe \t\t= 0;\n\t\t$declined \t= 0;\n\t\tforeach ( $rsvps as $response ) {\n\t\t\tif ( 'yes' == $response['rsvp'] )\t\t$confirmed++;\n\t\t\telseif ( 'maybe' == $response['rsvp'] ) $maybe++;\n\t\t\telseif ( 'no' == $response['rsvp'] )\t$declined++;\n\t\t}\n\n\t\t// Add response counts to the object\n\t\t$this->confirmed = $confirmed;\n\t\t$this->maybe = $maybe;\n\t\t$this->declined = $declined;\n\n\t\t// Check the user's response\n\t\tif ( isset( $rsvps[get_current_user_id()] ) ) {\n\t\t\tswitch ( $rsvps[get_current_user_id()]['rsvp'] ) {\n\t\t\t\tcase \"yes\" :\n\t\t\t\t\t$rsvp = \"Attending\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"no\" :\n\t\t\t\t\t$rsvp = \"Absent\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"maybe\" :\n\t\t\t\t\t$rsvp = \"Maybe\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\telse $rsvp = \"RSVP\";\n\t\t$this->rsvp = $rsvp;\n\n\t\t// Get date information\n\t\t$this->time\t= get_the_date( 'g:ia' );\n\t\t$this->day\t= get_the_date( 'l' );\n\t\t$this->date\t= get_the_date( 'M j' );\n\n\t\t// Has it passed?\n\t\t$this->is_past = ( strtotime( get_the_date( \"Y-m-d\\TH:i \\E\\S\\T\" ) ) < time() ) ? true : false;\n\t}",
"function meta($key) {\n return get_post_meta($post->ID, $key, true);\n}",
"public function meta()\n {\n return $this->meta;\n }",
"public function getMeta(){\n // $this->meta();\n }",
"public function getMeta() {\n return $this->meta;\n }",
"function twentytwelve_entry_meta() {\n\t\t// Translators: used between list items, there is a space after the comma.\n\t\t$categories_list = get_the_category_list( __( ', ', 'twentytwelve' ) );\n\n\t\t// Translators: used between list items, there is a space after the comma.\n\t\t$tag_list = get_the_tag_list( '', __( ', ', 'twentytwelve' ) );\n\n\t\t$date = sprintf(\n\t\t\t'<a href=\"%1$s\" title=\"%2$s\" rel=\"bookmark\"><time class=\"entry-date\" datetime=\"%3$s\">%4$s</time></a>',\n\t\t\tesc_url( get_permalink() ),\n\t\t\tesc_attr( get_the_time() ),\n\t\t\tesc_attr( get_the_date( 'c' ) ),\n\t\t\tesc_html( get_the_date() )\n\t\t);\n\n\t\t$author = sprintf(\n\t\t\t'<span class=\"author vcard\"><a class=\"url fn n\" href=\"%1$s\" title=\"%2$s\" rel=\"author\">%3$s</a></span>',\n\t\t\tesc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),\n\t\t\tesc_attr( sprintf( __( 'View all posts by %s', 'twentytwelve' ), get_the_author() ) ),\n\t\t\tget_the_author()\n\t\t);\n\n\t\t// Translators: 1 is category, 2 is tag, 3 is the date and 4 is the author's name.\n\t\tif ( $tag_list ) {\n\t\t\t$utility_text = __( 'This entry was posted in %1$s and tagged %2$s on %3$s<span class=\"by-author\"> by %4$s</span>.', 'twentytwelve' );\n\t\t} elseif ( $categories_list ) {\n\t\t\t$utility_text = __( 'This entry was posted in %1$s on %3$s<span class=\"by-author\"> by %4$s</span>.', 'twentytwelve' );\n\t\t} else {\n\t\t\t$utility_text = __( 'This entry was posted on %3$s<span class=\"by-author\"> by %4$s</span>.', 'twentytwelve' );\n\t\t}\n\n\t\tprintf(\n\t\t\t$utility_text,\n\t\t\t$categories_list,\n\t\t\t$tag_list,\n\t\t\t$date,\n\t\t\t$author\n\t\t);\n\t}",
"public function get_value() {\r\n\t\tif ( $this->key === 'job_title' ) {\r\n\t\t\treturn $this->listing->get_name();\r\n\t\t}\r\n\r\n\t\tif ( $this->key === 'job_description' ) {\r\n\t\t\treturn $this->listing->get_data('post_content');\r\n\t\t}\r\n\r\n\t\t// othewise, retrieve from wp_postmeta\r\n\t\treturn get_post_meta( $this->listing->get_id(), '_'.$this->key, true );\r\n\t}",
"public function getMessageMeta();",
"public function getMetaDescription()\n {\n if (\\Lang::hasForLocale($this->getRoutesPath() . \\Slug::getRouteSlug(), $this->getCurrent())) {\n return trans($this->getRoutesPath() . \\Slug::getRouteSlug() . '.metaDescription');\n } else {\n return trans($this->getRoutesPath() . \\Slug::getRouteName() . '.metaDescription');\n }\n }",
"public function getMeta()\n {\n return $this->meta;\n }",
"public function getMeta()\n {\n return $this->meta;\n }",
"public function getMeta()\n {\n return $this->meta;\n }",
"public function getMeta()\n {\n return $this->meta;\n }",
"public function getMeta()\n {\n return $this->meta;\n }",
"function twentytwelve_entry_meta() {\n // Translators: used between list items, there is a space after the comma.\n $categories_list = get_the_category_list(__(', ', 'twentytwelve'));\n\n // Translators: used between list items, there is a space after the comma.\n $tag_list = get_the_tag_list('', __(', ', 'twentytwelve'));\n\n $date = sprintf('<a href=\"%1$s\" title=\"%2$s\" rel=\"bookmark\"><time class=\"entry-date\" datetime=\"%3$s\">%4$s</time></a>', esc_url(get_permalink()), esc_attr(get_the_time()), esc_attr(get_the_date('c')), esc_html(get_the_date())\n );\n\n $author = sprintf('<span class=\"author vcard\"><a class=\"url fn n\" href=\"%1$s\" title=\"%2$s\" rel=\"author\">%3$s</a></span>', esc_url(get_author_posts_url(get_the_author_meta('ID'))), esc_attr(sprintf(__('View all posts by %s', 'twentytwelve'), get_the_author())), get_the_author()\n );\n\n // Translators: 1 is category, 2 is tag, 3 is the date and 4 is the author's name.\n if ($tag_list) {\n $utility_text = __('This entry was posted in %1$s and tagged %2$s on %3$s<span class=\"by-author\"> by %4$s</span>.', 'twentytwelve');\n } elseif ($categories_list) {\n $utility_text = __('This entry was posted in %1$s on %3$s<span class=\"by-author\"> by %4$s</span>.', 'twentytwelve');\n } else {\n $utility_text = __('This entry was posted on %3$s<span class=\"by-author\"> by %4$s</span>.', 'twentytwelve');\n }\n\n printf(\n $utility_text, $categories_list, $tag_list, $date, $author\n );\n }",
"function get_meta( $key = '' ) {\n\t\tif ( $key ) {\n\t\t\tif ( empty( $this->meta[ $key ] ) )\n\t\t\t\treturn;\n\n\t\t\t$meta = $this->meta[ $key ];\n\t\t} else {\n\t\t\t$meta = $this->meta;\n\t\t}\n\t\treturn $meta;\n\t}",
"public function get_meta( $key = '', $single = false );",
"public function getMeta() {\n return $this->meta;\n }",
"abstract public function get_meta_key();",
"public function metaDescription()\n\t{\n\t\tif ( static::$titleLangPrefix and static::$descriptionLangSuffix )\n\t\t{\n\t\t\treturn \\IPS\\Member::loggedIn()->language()->addToStack( static::$titleLangPrefix . $this->id . static::$descriptionLangSuffix, FALSE, array( 'striptags' => TRUE ) );\n\t\t}\n\t\treturn NULL;\n\t}",
"function print_special_event_meta_info() {\n\t// Date.\n\tif ( get_field( 'begin_date' ) ) {\n\t\t$date = get_special_event_date_format();\n\n\t\tprintf(\n\t\t\t'<h3>%1$s</h3>\n\t\t<p class=\"event-dates\">%2$s</p>',\n\t\t\tget_field( 'end_date' ) ? 'Dates' : 'Date',\n\t\t\t$date['human']\n\t\t);\n\t}\n\n\t// Location.\n\tif ( get_field( 'location' ) ) {\n\t\t$location = get_field( 'location' );\n\n\t\tprintf(\n\t\t\t'<h3>Location</h3>\n\t\t<p class=\"location\"><a href=\"https://www.google.com/maps/search/%1$s\" target=\"_blank\">%1$s</a></p>',\n\t\t\t$location['address']\n\t\t);\n\t}\n\n\t// Keynote speakers.\n\tif ( get_field( 'keynote_speaker' ) ) {\n\n\t\t$speaker_args = array(\n\t\t\t'post_type' => 'special_speaker',\n\t\t\t'post_status' => 'publish',\n\t\t\t'posts_per_page' => -1,\n\t\t\t'post__in' => get_field( 'keynote_speaker' ),\n\t\t\t'order' => 'ASC',\n\t\t\t'orderby' => 'meta_value',\n\t\t\t'meta_key' => 'sort_order',\n\t\t\t'cache_results' => true,\n\t\t\t'update_post_meta_cache' => true,\n\t\t\t'update_post_term_cache' => true,\n\t\t);\n\n\t\t$special_speaker_query = new WP_Query( $speaker_args );\n\n\t\tif ( $special_speaker_query->have_posts() ) {\n\t\t\techo '<h3>Keynote Speaker' . ( $special_speaker_query->post_count === 1 ? '' : 's' ) . '</h3>';\n\n\t\t\twhile ( $special_speaker_query->have_posts() ) {\n\t\t\t\t$special_speaker_query->the_post();\n\t\t\t\techo wp_kses_post( get_featured_speaker_info( get_the_ID(), $special_speaker_query->found_posts ) );\n\t\t\t}\n\t\t}\n\n\t\twp_reset_postdata();\n\t}\n\n\t// Speakers.\n\tif ( get_field( 'special_speaker' ) ) {\n\n\t\t$speaker_args = array(\n\t\t\t'post_type' => 'special_speaker',\n\t\t\t'post_status' => 'publish',\n\t\t\t'posts_per_page' => -1,\n\t\t\t'post__in' => get_field( 'special_speaker' ),\n\t\t\t'order' => 'ASC',\n\t\t\t'orderby' => 'meta_value',\n\t\t\t'meta_key' => 'sort_order',\n\t\t\t'cache_results' => true,\n\t\t\t'update_post_meta_cache' => true,\n\t\t\t'update_post_term_cache' => true,\n\t\t);\n\n\t\t$special_speaker_query = new WP_Query( $speaker_args );\n\n\t\tif ( $special_speaker_query->have_posts() ) {\n\t\t\techo '<h3>Special Speaker' . ( 1 === $special_speaker_query->post_count ? '' : 's' ) . '</h3>';\n\n\t\t\twhile ( $special_speaker_query->have_posts() ) {\n\t\t\t\t$special_speaker_query->the_post();\n\t\t\t\techo wp_kses_post( get_featured_speaker_info( get_the_ID(), $special_speaker_query->found_posts ) );\n\t\t\t}\n\t\t}\n\n\t\twp_reset_postdata();\n\t}\n}",
"public function getAdditionalInformation()\n {\n $compName = '';\n\n if ($compUid = $this->getCompetition()) {\n $competition = tx_rnbase::makeInstance('tx_cfcleague_models_Competition', $compUid);\n $compName = $competition->isValid() ? $competition->getName() : '[invalid!]';\n }\n\n return sprintf('Aktualisierung der Spieler für Wettbewerb >%s<', $compName);\n // return sprintf( $GLOBALS['LANG']->sL('LLL:EXT:mksearch/locallang_db.xml:scheduler_indexTask_taskinfo'),\n // $this->getTargetPath(), $this->getItemsInQueue());\n }",
"public function meta_box() {\n\t\tglobal $post;\n\t\t\n\t\tif ( isset( $_GET['post'] ) )\n\t\t\t$post_ID = (int) $_GET['post'];\n\t\telse\n\t\t\t$post_ID = '';\n\n\t\techo '<input type=\"hidden\" name=\"_lingo_hidden\" id=\"_lingo_hidden\" value=\"1\" />\n\t\t<p>\n\t\t\t<label for=\"_translation\">' . __( 'Translation', 'lingo' ) . '</label>\n\t\t\t<br />';\n\n\t\t$_translation = get_post_meta( $post_ID, '_translation' );\n\t\tforeach( $_translation as $key => $trans ) {\n\t\t\techo '<input type=\"text\" name=\"_translation[' . $key . ']\" id=\"_translation' . $key . '\" value=\"' . $trans . '\" />';\n\t\t}\n\t\techo '<input type=\"text\" name=\"_translation[' . ( $key + 1 ) . ']\" id=\"_translation' . ( $key + 1 ) . '\" value=\"\" />';\n\t\t\n\t\techo '</p>';\n\t}",
"function wpbs_add_booking_meta($booking_id, $meta_key, $meta_value, $unique = false)\n{\n\n return wp_booking_system()->db['bookingmeta']->add($booking_id, $meta_key, $meta_value, $unique);\n\n}",
"function twentytwelve_entry_meta() {\n\t// Translators: used between list items, there is a space after the comma.\n\t$categories_list = get_the_category_list( __( ', ', 'twentytwelve' ) );\n\t// Translators: used between list items, there is a space after the comma.\n\t$tag_list = get_the_tag_list( '', __( ', ', 'twentytwelve' ) );\n\t$date = sprintf( '<a href=\"%1$s\" title=\"%2$s\" rel=\"bookmark\"><time class=\"entry-date\" datetime=\"%3$s\">%4$s</time></a>',\n\t\tesc_url( get_permalink() ),\n\t\tesc_attr( get_the_time() ),\n\t\tesc_attr( get_the_date( 'c' ) ),\n\t\tesc_html( get_the_date() )\n\t);\n\t$author = sprintf( '<span class=\"author vcard\"><a class=\"url fn n\" href=\"%1$s\" title=\"%2$s\" rel=\"author\">%3$s</a></span>',\n\t\tesc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),\n\t\tesc_attr( sprintf( __( 'View all posts by %s', 'twentytwelve' ), get_the_author() ) ),\n\t\tget_the_author()\n\t);\n\t// Translators: 1 is category, 2 is tag, 3 is the date and 4 is the author's name.\n\tif ( $tag_list ) {\n\t\t$utility_text = __( 'This entry was posted in %1$s and tagged %2$s on %3$s<span class=\"by-author\"> by %4$s</span>.', 'twentytwelve' );\n\t} elseif ( $categories_list ) {\n\t\t$utility_text = __( 'This entry was posted in %1$s on %3$s<span class=\"by-author\"> by %4$s</span>.', 'twentytwelve' );\n\t} else {\n\t\t$utility_text = __( 'This entry was posted on %3$s<span class=\"by-author\"> by %4$s</span>.', 'twentytwelve' );\n\t}\n\tprintf(\n\t\t$utility_text,\n\t\t$categories_list,\n\t\t$tag_list,\n\t\t$date,\n\t\t$author\n\t);\n}",
"public static function get_meta_table();",
"function twentytwelve_entry_meta() {\n\t// Translators: used between list items, there is a space after the comma.\n\t$categories_list = get_the_category_list( __( ', ', 'twentytwelve' ) );\n\n\t// Translators: used between list items, there is a space after the comma.\n\t$tag_list = get_the_tag_list( '', __( ', ', 'twentytwelve' ) );\n\n\t$date = sprintf( '<a href=\"%1$s\" title=\"%2$s\" rel=\"bookmark\"><time class=\"entry-date\" datetime=\"%3$s\">%4$s</time></a>',\n\t\tesc_url( get_permalink() ),\n\t\tesc_attr( get_the_time() ),\n\t\tesc_attr( get_the_date( 'c' ) ),\n\t\tesc_html( get_the_date() )\n\t);\n\n\t$author = sprintf( '<span class=\"author vcard\"><a class=\"url fn n\" href=\"%1$s\" title=\"%2$s\" rel=\"author\">%3$s</a></span>',\n\t\tesc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),\n\t\tesc_attr( sprintf( __( 'View all posts by %s', 'twentytwelve' ), get_the_author() ) ),\n\t\tget_the_author()\n\t);\n\n\t// Translators: 1 is category, 2 is tag, 3 is the date and 4 is the author's name.\n\tif ( $tag_list ) {\n\t\t$utility_text = __( 'This entry was posted in %1$s and tagged %2$s on %3$s<span class=\"by-author\"> by %4$s</span>.', 'twentytwelve' );\n\t} elseif ( $categories_list ) {\n\t\t$utility_text = __( 'This entry was posted in %1$s on %3$s<span class=\"by-author\"> by %4$s</span>.', 'twentytwelve' );\n\t} else {\n\t\t$utility_text = __( 'This entry was posted on %3$s<span class=\"by-author\"> by %4$s</span>.', 'twentytwelve' );\n\t}\n\n\tprintf(\n\t\t$utility_text,\n\t\t$categories_list,\n\t\t$tag_list,\n\t\t$date,\n\t\t$author\n\t);\n}",
"function twentytwelve_entry_meta() {\n\t// Translators: used between list items, there is a space after the comma.\n\t$categories_list = get_the_category_list( __( ', ', 'twentytwelve' ) );\n\n\t// Translators: used between list items, there is a space after the comma.\n\t$tag_list = get_the_tag_list( '', __( ', ', 'twentytwelve' ) );\n\n\t$date = sprintf( '<a href=\"%1$s\" title=\"%2$s\" rel=\"bookmark\"><time class=\"entry-date\" datetime=\"%3$s\" pubdate>%4$s</time></a>',\n\t\tesc_url( get_permalink() ),\n\t\tesc_attr( get_the_time() ),\n\t\tesc_attr( get_the_date( 'c' ) ),\n\t\tesc_html( get_the_date() )\n\t);\n\n\t$author = sprintf( '<span class=\"author vcard\"><a class=\"url fn n\" href=\"%1$s\" title=\"%2$s\" rel=\"author\">%3$s</a></span>',\n\t\tesc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),\n\t\tesc_attr( sprintf( __( 'View all posts by %s', 'twentytwelve' ), get_the_author() ) ),\n\t\tget_the_author()\n\t);\n\n\t// Translators: 1 is category, 2 is tag, 3 is the date and 4 is the author's name.\n\tif ( $tag_list ) {\n\t\t$utility_text = __( 'This entry was posted in %1$s and tagged %2$s on %3$s<span class=\"by-author\"> by %4$s</span>.', 'twentytwelve' );\n\t} elseif ( $categories_list ) {\n\t\t$utility_text = __( 'This entry was posted in %1$s on %3$s<span class=\"by-author\"> by %4$s</span>.', 'twentytwelve' );\n\t} else {\n\t\t$utility_text = __( 'This entry was posted on %3$s<span class=\"by-author\"> by %4$s</span>.', 'twentytwelve' );\n\t}\n\n\tprintf(\n\t\t$utility_text,\n\t\t$categories_list,\n\t\t$tag_list,\n\t\t$date,\n\t\t$author\n\t);\n}",
"public function meta($key)\n {\n return $this->meta[$key] ?? null;\n }",
"public function getMeta()\n {\n return $this->Meta;\n }",
"public static function getMetaData()\n {\n // _deprecated_function( __FUNCTION__, '1.4.1');\n\n global $post;\n\n $meta = new stdClass();\n\n $active = get_post_meta($post->ID, Pronamic_Google_Maps_Post::META_KEY_ACTIVE, true);\n $meta->active = filter_var($active, FILTER_VALIDATE_BOOLEAN);\n\n $meta->latitude = null;\n $value = get_post_meta($post->ID, Pronamic_Google_Maps_Post::META_KEY_LATITUDE, true);\n if ($value != '') {\n $meta->latitude = (float)$value;\n }\n $meta->longitude = null;\n $value = get_post_meta($post->ID, Pronamic_Google_Maps_Post::META_KEY_LONGITUDE, true);\n if ($value != '') {\n $meta->longitude = (float)$value;\n }\n\n $meta->mapType = self::MAP_TYPE_DEFAULT;\n $value = get_post_meta($post->ID, Pronamic_Google_Maps_Post::META_KEY_MAP_TYPE, true);\n if ($value != '') {\n $meta->mapType = $value;\n }\n\n $meta->zoom = self::MAP_ZOOM_DEFAULT;\n $value = get_post_meta($post->ID, Pronamic_Google_Maps_Post::META_KEY_ZOOM, true);\n if ($value != '') {\n $meta->zoom = (int)$value;\n }\n\n $meta->title = get_post_meta($post->ID, Pronamic_Google_Maps_Post::META_KEY_TITLE, true);\n\n $description = get_post_meta($post->ID, Pronamic_Google_Maps_Post::META_KEY_DESCRIPTION, true);\n if (!is_admin()) {\n $description = apply_filters('pronamic_google_maps_item_description', $description);\n }\n $meta->description = $description;\n\n $meta->address = get_post_meta($post->ID, Pronamic_Google_Maps_Post::META_KEY_ADDRESS, true);\n\n $meta = apply_filters('pronamic_google_maps_post_meta', $meta);\n\n return $meta;\n }",
"function wprt_entry_meta() {\n\t// Get meta items from theme mod\n\t$meta_item = wprt_get_mod( 'blog_entry_meta_items', array( 'date', 'author', 'comments' ) );\n\n\t// If blocks are 100% empty return defaults\n\t$meta_item = $meta_item ? $meta_item : 'date,author,comments';\n\n\t// Turn into array if string\n\tif ( $meta_item && ! is_array( $meta_item ) ) {\n\t\t$meta_item = explode( ',', $meta_item );\n\t}\n\n\t// Set keys equal to values\n\t$meta_item = array_combine( $meta_item, $meta_item );\n\n\t// Loop through items\n\tforeach ( $meta_item as $item ) :\n\t\tif ( 'author' == $item ) { \n\t\t\tprintf( '<span class=\"post-by-author item\"><span class=\"inner\">By <a href=\"%s\" title=\"%s\" rel=\"author\">%s</a></span></span>',\n\t\t\t\tesc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),\n\t\t\t\tesc_attr( sprintf( esc_html__( 'View all posts by %s', 'fundrize' ), get_the_author() ) ),\n\t\t\t\tget_the_author()\n\t\t\t\t);\n\t\t}\n\t\telseif ( 'date' == $item ) {\n\t\t\tprintf( '<span class=\"post-date item\"><span class=\"inner\"><span class=\"entry-date\">%1$s</span></span></span>',\n\t\t\t\tget_the_date()\n\t\t\t);\n\t\t}\n\t\telseif ( 'comments' == $item ) {\n\t\t\tif ( comments_open() || get_comments_number() ) {\n\t\t\t\techo '<span class=\"post-comment item\"><span class=\"inner\">';\n\t\t\t\tcomments_popup_link( esc_html__( '0 comment', 'fundrize' ), esc_html__( '1 Comment', 'fundrize' ), esc_html__( '% Comments', 'fundrize' ) );\n\t\t\t\techo '</span></span>';\n\t\t\t}\n\t\t}\n\t\telseif ( 'categories' == $item ) {\n\t\t\techo '<span class=\"post-meta-categories item\"><span class=\"inner\">';\n\t\t\tthe_category( ', ', get_the_ID() );\n\t\t\techo '</span></span>';\n\t\t}\n\tendforeach;\n}",
"function the_meta()\n {\n }",
"function boom_post_meta() {\n\tif ( get_post_type() == 'post' ) {\n\t\techo sprintf(\n\t\t\t__( 'Posted %s in %s%s by %s. ', 'boom' ),\n\t\t\tget_the_time( get_option( 'date_format' ) ),\n\t\t\tget_the_category_list( ', ' ),\n\t\t\tget_the_tag_list( __( ', <b>Tags</b>: ', 'boom' ), ', ' ),\n\t\t\tget_the_author_link()\n\t\t);\n\t}\n\tedit_post_link( __( ' (edit)', 'boom' ), '<span class=\"edit-link\">', '</span>' );\n}",
"function _themename_post_meta() {\n printf(\n esc_html__('Published on %s', '_themename'),\n '<a href=\"' . esc_url(get_permalink()) . '\"><time datetime=\"' . esc_attr(get_the_date('c')) . '\">' . esc_html(get_the_date()) . '</time></a>'\n );\n /* translators: %s: Post Author */\n printf(\n esc_html__(' by %s', '_themename'),\n esc_html(get_the_author())\n );\n}",
"public function metaTag()\n {\n return $this->meta()->where('id', $this->meta_id)->first();\n }",
"function sc_get_post_meta( $id, $key ){\n\treturn (object)get_post_meta( $id, $key, true );\n}",
"function setup_meta_english() {\n\t\t\tglobal $post, $wpdb;\n\t\t\t$post_id = $post->ID;\n\t\t\t\n\t\t\tforeach($this->english_meta_keys as $key ) {\n\t\t\t\tif ($post_id){\n\t\t\t\t\t$$key = get_post_meta($post_id, $key, true);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$$key = '';\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tinclude(dirname(__FILE__).'/views/ipc-meta-box-english.php');\n\t\t}",
"public function getMeta($meta)\n {\n if (!isset($this->metas[$meta])) {\n return;\n }\n\n return $this->metas[$meta];\n }",
"public function get_meta( $key ) {\n\t\treturn isset( $this->data['meta'][ $key ] ) ? $this->data['meta'][ $key ] : null;\n\t}",
"public function meta($name = null) {\n if ( $name === null ) {\n return $this->metaCache;\n }\n else {\n return @$this->metaCache[$name];\n }\n }",
"public static function get_default_meta() {\n\t\t\t$meta = array(\n\t\t\t\t'duration' => '10 weeks',\n\t\t\t\t'max_students' => 1000,\n\t\t\t\t'students' => 0,\n\t\t\t\t'retake_count' => 0,\n\t\t\t\t'featured' => 'no',\n\t\t\t\t'block_lesson_content' => 'no',\n\t\t\t\t'external_link_buy_course' => '',\n\t\t\t\t'course_result' => 'evaluate_lesson',\n\t\t\t\t'passing_condition' => 80,\n\t\t\t\t'price' => '',\n\t\t\t\t'sale_price' => '',\n\t\t\t\t'sale_start' => '',\n\t\t\t\t'sale_end' => '',\n\t\t\t\t'required_enroll' => 'yes',\n\t\t\t\t'course_author' => learn_press_get_current_user_id(),\n\t\t\t);\n\n\t\t\treturn apply_filters( 'learn-press/course/default-meta', $meta );\n\t\t}",
"function v2_mumm_get_meta_tag($arg = '', $name = '') {\n global $language;\n $title = t('Mumm International');\n $list_meta = variable_get('list_meta', array());\n if ($list_meta[$language->language]['title_' . $arg]) {\n $title = $list_meta[$language->language]['title_' . $arg] . ' | ' . $name;\n }\n return $title;\n}",
"public function getMetaDescription();",
"public function getMetaInfo() {\n return $this->meta;\n }",
"public function getBook()\n\t{\n\t\treturn $this->getKeyValue('book'); \n\n\t}",
"public function getMetaDescription() {\n return (isset($this->metaDescription) && $this->metaDescription!='') ? $this->metaDescription : Params::param('metainfo-metaDescription');\n }",
"protected function get_meta_value() {\n\n\t\t$key = $this->attributes['key'];\n\t\t$format = isset( $this->attributes['format'] ) ? $this->attributes['format'] : null;\n\n\t\t// Get Movie ID.\n\t\t$post_id = $this->get_movie_id();\n\n\t\t// Get value\n\t\t$value = utils\\movie\\get_meta( $post_id, $key, true );\n\t\tif ( empty( $value ) ) {\n\t\t\t/**\n\t\t\t * Filter empty meta value.\n\t\t\t *\n\t\t\t * @since 3.0.0\n\t\t\t *\n\t\t\t * @param string $value\n\t\t\t * @param string $format\n\t\t\t */\n\t\t\t$value = apply_filters( \"wpmoly/shortcode/format/{$key}/empty/value\", $value, $format );\n\t\t\tif ( empty( $value ) ) {\n\t\t\t\t/** This filter is documented in includes/utils/formatting.php **/\n\t\t\t\t$value = apply_filters( 'wpmoly/filter/meta/empty/value', '—' );\n\t\t\t}\n\n\t\t\treturn $value;\n\t\t}\n\n\t\t// Raw value requested\n\t\tif ( 'raw' == $format ) {\n\t\t\t/**\n\t\t\t * Filter raw meta value.\n\t\t\t *\n\t\t\t * @since 3.0.0\n\t\t\t *\n\t\t\t * @param string $value\n\t\t\t */\n\t\t\treturn apply_filters( \"wpmoly/shortcode/format/{$key}/raw/value\", $value );\n\t\t}\n\n\t\t// Deal with lists\n\t\tif ( ! empty( $this->attributes['count'] ) && 0 < $this->attributes['count'] ) {\n\n\t\t\t$old_value = $value;\n\n\t\t\t$value = explode( ',', $value );\n\t\t\t$value = array_map( 'trim', $value );\n\t\t\t$value = array_slice( $value, 0, $this->attributes['count'] );\n\n\t\t\t/**\n\t\t\t * Filter array-shaped meta value.\n\t\t\t *\n\t\t\t * @since 3.0.0\n\t\t\t *\n\t\t\t * @param array $value\n\t\t\t * @param array $options\n\t\t\t */\n\t\t\treturn apply_filters( \"wpmoly/shortcode/format/{$key}/value\", $value, compact( 'format' ) );\n\t\t}\n\n\t\t/**\n\t\t * Filter meta value.\n\t\t *\n\t\t * @since 3.0.0\n\t\t *\n\t\t * @param string $value\n\t\t * @param array $options\n\t\t */\n\t\treturn apply_filters( \"wpmoly/shortcode/format/{$key}/value\", $value, compact( 'format' ) );\n\t}",
"function translate_metadate_to_string( $short_date = false ) {\n\t\n\tglobal $post;\n\t\n\t$output = '';\n\t$meta_day \t= get_the_time('D');\n\t$meta_date\t= get_the_time('d');\n\t$meta_month\t= get_the_time('M');\n\t$meta_year\t= get_the_time('Y');\n\t\n\tif ($short_date) {\n\t\tswitch ($meta_day) {\n\t\t\t\n\t\t\t//Translate Weekday\n\t\t\tcase 'Mon':\n\t\t\t\t$output .= __( 'Monday' , 'sptheme' );\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'Tue':\n\t\t\t\t$output .= __( 'Tuesday' , 'sptheme' );\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'Wed':\n\t\t\t\t$output .= __( 'Wednesday' , 'sptheme' );\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'Thu':\n\t\t\t\t$output .= __( 'Thursday' , 'sptheme' );\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'Fri':\n\t\t\t\t$output .= __( 'Friday' , 'sptheme' );\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'Sat':\n\t\t\t\t$output .= __( 'Saturday' , 'sptheme' );\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'Sun':\n\t\t\t\t$output .= __( 'Sunday' , 'sptheme' );\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t\n\t\t}\n\t}\n\t\n\t$output .= ' ' . $meta_date . ' ';\n\t\n\t//Translate Month\n\tswitch ($meta_month) {\n\t\t\n\t\tcase 'Jan':\n\t\t\t$output .= __( 'January' , 'sptheme' );\n\t\t\tbreak;\n\t\t\n\t\tcase 'Feb':\n\t\t\t$output .= __( 'February' , 'sptheme' );\n\t\t\tbreak;\n\t\t\n\t\tcase 'Mar':\n\t\t\t$output .= __( 'March' , 'sptheme' );\n\t\t\tbreak;\n\t\t\n\t\tcase 'Apr':\n\t\t\t$output .= __( 'April' , 'sptheme' );\n\t\t\tbreak;\n\t\t\n\t\tcase 'May':\n\t\t\t$output .= __( 'May' , 'sptheme' );\n\t\t\tbreak;\n\t\t\n\t\tcase 'Jun':\n\t\t\t$output .= __( 'June' , 'sptheme' );\n\t\t\tbreak;\n\t\t\n\t\tcase 'Jul':\n\t\t\t$output .= __( 'July' , 'sptheme' );\n\t\t\tbreak;\n\t\t\t\n\t\tcase 'Aug':\n\t\t\t$output .= __( 'August' , 'sptheme' );\n\t\t\tbreak;\n\t\t\t\n\t\tcase 'Sep':\n\t\t\t$output .= __( 'September' , 'sptheme' );\n\t\t\tbreak;\n\t\t\t\n\t\tcase 'Oct':\n\t\t\t$output .= __( 'October' , 'sptheme' );\n\t\t\tbreak;\n\t\t\t\n\t\tcase 'Nov':\n\t\t\t$output .= __( 'November' , 'sptheme' );\n\t\t\tbreak;\n\t\t\t\n\t\tcase 'Dec':\n\t\t\t$output .= __( 'December' , 'sptheme' );\n\t\t\tbreak;\t\t\t\t\t\n\t\t\n\t\tdefault:\n\t\t\tbreak;\n\t\t\n\t}\n\t\n\t$output .= ', ' . $meta_year;\n\t\t\n\treturn $output;\t\n}",
"public function getMeta($key)\n {\n return array_key_exists($key, $this->properties) ? $this->properties[$key] : null;\n }",
"function brag_rest_meta_get_flamingo( $object, $field_name, $request ) {\n\n\t$meta = get_post_meta( $object[ 'id' ], '_meta' );\n\n\treturn $meta;\n}",
"function get_student_meta( $student_id, $key = '', $single = false ) {\n return get_metadata( 'student', $student_id, $key, $single );\n }",
"public function getMetaAttribute(): object\n {\n return $this->getMetas();\n }",
"public static function getMeta() {\n return json_decode(\n '['\n . ' {'\n . ' \"name\":\"appointment_id\",'\n . ' \"type\":\"int\",'\n . ' \"default\": null'\n . ' },'\n . ' {'\n . ' \"name\":\"appointment_patient_id\",'\n . ' \"type\":\"int\",'\n . ' \"default\": null'\n . ' },'\n . ' {'\n . ' \"name\":\"appointment_time\",'\n . ' \"type\":\"varchar\",'\n . ' \"default\": null'\n . ' },'\n . ' {'\n . ' \"name\":\"appointment_date\",'\n . ' \"type\":\"varchar\",'\n . ' \"default\": null'\n . ' },'\n . ' {'\n . ' \"name\":\"appointment_reason\",'\n . ' \"type\":\"varchar\",'\n . ' \"default\": null'\n . ' },'\n . ' {'\n . ' \"name\":\"appointment_doctor_id\",'\n . ' \"type\":\"int\",'\n . ' \"default\": null'\n . ' },'\n . ' {'\n . ' \"name\":\"appointment_cncl\",'\n . ' \"type\":\"varchar\",'\n . ' \"default\": null'\n . ' },'\n . ' {'\n . ' \"name\":\"appointment_cncl_reason\",'\n . ' \"type\":\"varchar\",'\n . ' \"default\": null'\n . ' },'\n . ' {'\n . ' \"name\":\"doctor_firstname\",'\n . ' \"type\":\"varchar\",'\n . ' \"default\": null'\n . ' },'\n . ' {'\n . ' \"name\":\"doctor_lastname\",'\n . ' \"type\":\"varchar\",'\n . ' \"default\": null'\n . ' },'\n . ' {'\n . ' \"name\":\"user_firstname\",'\n . ' \"type\":\"varchar\",'\n . ' \"default\": null'\n . ' },'\n . ' {'\n . ' \"name\":\"user_lastname\",'\n . ' \"type\":\"varchar\",'\n . ' \"default\": null'\n . ' },'\n . ' {'\n . ' \"name\":\"appointment_state_descr\",'\n . ' \"type\":\"varchar\",'\n . ' \"default\": null'\n . ' },'\n . ' {'\n . ' \"name\":\"appointment_cncl_descr\",'\n . ' \"type\":\"varchar\",'\n . ' \"default\": null'\n . ' }'\n . ']'\n );\n }",
"public function _meta(){\n if(!$this->db->table_exists($this->table_name())):\n throw new OrmExceptions(sprintf(\"The table %s does not exist\", $this->table_name()));\n endif;\n\n if(empty($this->_model_meta )){\n $this->_model_meta = $this->db->field_data($this->table_name());\n $this->_fields_loaded = TRUE;\n }\n return $this->_model_meta ;\n }",
"function enlight_get_api_post_meta($object, $field, $request)\n{\n return get_post_meta($object['id'], 'enlight_' . $field, true);\n}",
"public function readMetaField () {\n $pdo = $this->_backend->getPDO();\n\n $statement = $pdo->prepare('SELECT * FROM `'. $this->_validatedTable . '` LIMIT 1 OFFSET 0');\n try {\n $statement->execute();\n } catch (\\PDOException $e) {\n throw new PdoResponseException($e);\n }\n\n $restfmMessage = new \\RESTfm\\Message\\Message();\n\n $this->_parseMetaField($restfmMessage, $statement);\n\n $statement->closeCursor();\n\n return $restfmMessage;\n }",
"protected function meta() {\n if (!$this->_meta) {\n // Initialize at first call\n $this->_meta = new \\stdClass();\n if (!$this->isNewRecord && $this->{static::meta_id_field()}) {\n foreach ($this->meta as $meta_row) {\n $this->_meta->{static::meta_prefix() . $meta_row->meta_key} = $meta_row->meta_value;\n }\n }\n }\n return $this->_meta;\n }",
"public function getMetaAsRawString()\n\t{\n\t\t$meta = '';\n\t\t$title = $this->getTitleLineString();\n\t\t\n\t\tarray_shift($this->items);\n\t\t\n\t\tforeach ((array) $this->items as $type => $items) {\n\t\t\tforeach ((array) $items as $key => $item) {\n\t\t\t\t$meta .= \"<meta $type=\\\"{$key}\\\" content=\\\"{$item}\\\"/>\\n\";\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $title . $this->getOgHeadLineString() . $meta;\n\t}",
"public function read_meta( &$object );",
"public function getMetaTags()\n {\n $datetimeString = date('n/d/y @ g:ia', strtotime($this->eventdatetime->starttime));\n if ($this->isAllDay()) {\n $datetimeString = date('n/d/y', strtotime($this->eventdatetime->starttime));\n }\n\n $title = $this->event->displayTitle($this) . ' - ' . $datetimeString;\n\n // Add a description if it is set\n $description = 'Event on ' . $datetimeString;\n if (isset($this->event->description) && !empty($this->event->description)) {\n $description = $this->event->description;\n }\n\n // Add a image if it is set\n $image = '';\n if (isset($this->event->imagedata) && !empty($this->event->imagedata)) {\n $image = MetaTagUtility::getSiteURL() . '?image&id=' . $this->event->id;\n }\n\n // Build the options\n $options = array(\n 'image' => $image,\n 'label1' => 'Calendar',\n 'data1' => $this->calendar->name,\n );\n\n $location = $this->eventdatetime->getLocation();\n $webcast = $this->eventdatetime->getWebcast();\n\n if ($location !== false && $webcast !== false) {\n $options['label2'] = 'In-Person and Online';\n $options['data2'] = $location->name . ' & ' . $webcast->title;\n } elseif ($location !== false) {\n $options['label2'] = 'Location';\n $options['data2'] = $location->name;\n } elseif ($webcast !== false) {\n $options['label2'] = 'Virtual Location';\n $options['data2'] = $webcast->title;\n }\n\n $metaTagUtility = new MetaTagUtility($this->getURL(), $title, $description, $options);\n\n return $metaTagUtility->getMetaTags();\n }",
"function affwp_get_referral_meta( $referral_id, $meta_key = '', $single = false ) {\n\treturn affiliate_wp()->referral_meta->get_meta( $referral_id, $meta_key, $single );\n}",
"function meta($name, $value = NULL)\n {\n return get_instance()->theme->meta($name, $value);\n }",
"function twentytwelve_entry_meta() {\n\t// used between list items, there is a space after the comma.\n\t$categories_list = get_the_category_list( ', ' );\n\n\t// used between list items, there is a space after the comma.\n\t$tag_list = get_the_tag_list( '', ', ' );\n\n\t$date = sprintf( '<a href=\"%1$s\" title=\"%2$s\" rel=\"bookmark\"><time class=\"entry-date\" datetime=\"%3$s\">%4$s</time></a>',\n\t\tesc_url( get_permalink() ),\n\t\tesc_attr( get_the_time() ),\n\t\tesc_attr( get_the_date( 'c' ) ),\n\t\tesc_html( get_the_date() )\n\t);\n\n\t$author = sprintf( '<span class=\"author vcard\"><a class=\"url fn n\" href=\"%1$s\" title=\"%2$s\" rel=\"author\">%3$s</a></span>',\n\t\tesc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),\n\t\tesc_attr( sprintf( __( 'View all posts by %s', 'twentytwelve' ), get_the_author() ) ),\n\t\tget_the_author()\n\t);\n\n\t// 1 is category, 2 is tag, 3 is the date and 4 is the author's name.\n\tif ( $tag_list ) {\n\t\t$utility_text = __( 'This entry was posted in %1$s and tagged %2$s on %3$s<span class=\"by-author\"> by %4$s</span>.', 'twentytwelve' );\n\t} elseif ( $categories_list ) {\n\t\t$utility_text = __( 'This entry was posted in %1$s on %3$s<span class=\"by-author\"> by %4$s</span>.', 'twentytwelve' );\n\t} else {\n\t\t$utility_text = __( 'This entry was posted on %3$s<span class=\"by-author\"> by %4$s</span>.', 'twentytwelve' );\n\t}\n\n\tprintf(\n\t\t$utility_text,\n\t\t$categories_list,\n\t\t$tag_list,\n\t\t$date,\n\t\t$author\n\t);\n}",
"public function meta_description()\n\t{\n\t\treturn $this->get_context_meta_value( __FUNCTION__ );\n\t}",
"public function detailData($booking_id)\n {\n return DB::table('bookings')->where('booking_id', $booking_id)->first();\n }",
"public function getMeta(): LaramoreMeta\n {\n return Meta::getForTableName($this->getTableName());\n }",
"function quasar_entry_meta() {\n\t$return = '';\n\t\n\tif ( is_sticky() && is_home() && ! is_paged() )\n\t\t$return .= '<span class=\"featured-post\">' . __( 'Sticky', 'quasar' ) . '</span>';\n\n\t/*\n\tCurrently Disabled. We have used the Date in the right side\n\tif ( ! has_post_format( 'link' ) && 'post' == get_post_type() )\n\t\t$return .= quasar_entry_date(false);\n\t\n\t*/\n\n\t// Translators: used between list items, there is a space after the comma.\n\t$categories_list = get_the_category_list( __( ', ', 'quasar' ) );\n\tif ( $categories_list ) {\n\t\t$return .= '<span class=\"categories-links\">' . $categories_list . '</span>';\n\t}\n\n\t// Translators: used between list items, there is a space after the comma.\n\t$tag_list = get_the_tag_list( '', __( ', ', 'quasar' ) );\n\tif ( $tag_list ) {\n\t\t$return .= '<span class=\"tags-links\">' . $tag_list . '</span>';\n\t}\n\n\t// Post author\n\tif ( 'post' == get_post_type() ) {\n\t\t/*\n\t\tLinking to Author's archive currently disabled\n\t\t\n\t\t$return .= sprintf( '<span class=\"author vcard\"><a class=\"url fn n\" href=\"%1$s\" title=\"%2$s\" rel=\"author\">%3$s</a></span>',\n\t\t\tesc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),\n\t\t\tesc_attr( sprintf( __( 'View all posts by %s', 'quasar' ), get_the_author() ) ),\n\t\t\tget_the_author()\n\t\t);\n\t\t*/\n\t\t$return .= sprintf( '<span class=\"author vcard\"><a class=\"url fn n\" title=\"%2$s\" rel=\"author\">%3$s</a></span>',\n\t\t\tesc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),\n\t\t\tesc_attr( sprintf( __( 'View all posts by %s', 'quasar' ), get_the_author() ) ),\n\t\t\tget_the_author()\n\t\t);\n\t}\n\t\n\treturn $return;\n}",
"function wp_foundation_entry_meta() {\n\t// Translators: used between list items, there is a space after the comma.\n\t$categories_list = get_the_category_list( __( ', ', 'wp_foundation' ) );\n\n\t// Translators: used between list items, there is a space after the comma.\n\t$tag_list = get_the_tag_list( '', __( ', ', 'wp_foundation' ) );\n\n\t$date = sprintf( '<a href=\"%1$s\" title=\"%2$s\" rel=\"bookmark\"><time class=\"entry-date\" datetime=\"%3$s\">%4$s</time></a>',\n\t\tesc_url( get_permalink() ),\n\t\tesc_attr( get_the_time() ),\n\t\tesc_attr( get_the_date( 'c' ) ),\n\t\tesc_html( get_the_date() )\n\t);\n\n\t$author = sprintf( '<span class=\"author vcard\"><a class=\"url fn n\" href=\"%1$s\" title=\"%2$s\" rel=\"author\">%3$s</a></span>',\n\t\tesc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),\n\t\tesc_attr( sprintf( __( 'View all posts by %s', 'wp_foundation' ), get_the_author() ) ),\n\t\tget_the_author()\n\t);\n\n\t// Translators: 1 is category, 2 is tag, 3 is the date and 4 is the author's name.\n\tif ( $tag_list ) {\n\t\t$utility_text = __( 'This entry was posted in %1$s and tagged %2$s on %3$s<span class=\"by-author\"> by %4$s</span>.', 'wp_foundation' );\n\t} elseif ( $categories_list ) {\n\t\t$utility_text = __( 'This entry was posted in %1$s on %3$s<span class=\"by-author\"> by %4$s</span>.', 'wp_foundation' );\n\t} else {\n\t\t$utility_text = __( 'This entry was posted on %3$s<span class=\"by-author\"> by %4$s</span>.', 'wp_foundation' );\n\t}\n\n\tprintf(\n\t\t$utility_text,\n\t\t$categories_list,\n\t\t$tag_list,\n\t\t$date,\n\t\t$author\n\t);\n}",
"public function meta_box() {\r\n\t\tglobal $post;\r\n\t\t\r\n\t\t// \r\n\t\tif ( isset( $_GET['post'] ) )\r\n\t\t\t$post_ID = (int) $_GET['post'];\r\n\t\telse\r\n\t\t\t$post_ID = '';\r\n\r\n\t\tforeach( $this->post_meta as $key => $value ) {\r\n\t\t\tif (\r\n\t\t\t\t'previous_start' == $key ||\r\n\t\t\t\t'previous_end' == $key ||\r\n\t\t\t\t'total_start' == $key ||\r\n\t\t\t\t'total_end' == $key\r\n\t\t\t) {\r\n\t\t\t\t$time_value = get_post_meta( $post_ID, '_' . $key, true );\r\n\t\t\t\t$time = date( 'h:m d M Y', $time_value );\r\n\t\t\t} else {\r\n\t\t\t\t$time = '';\r\n\t\t\t}\r\n\r\n\t\t\techo '\r\n\t\t\t<p>\r\n\t\t\t\t<label for=\"_' . $key . '\">' . $value . '</label>\r\n\t\t\t\t<br />\r\n\t\t\t\t<input type=\"text\" name=\"_' . $key . '\" id=\"_' . $key . '\" value=\"' . get_post_meta( $post_ID, '_' . $key, true ) . '\" />\r\n\t\t\t\t<br />\r\n\t\t\t\t<small>' . $time . '</small>\r\n\t\t\t</p>';\r\n\t\t\tunset( $time );\r\n\t\t}\r\n\t}",
"public function getTranslation() {\n\t\treturn $this->translation;\n\t}",
"public function getDetails($key)\n {\n switch ($key)\n {\n case 'id':\n return $this->id;\n break;\n case 'author':\n return $this->author;\n break;\n case 'text':\n return $this->text;\n break;\n case 'timestamp':\n return $this->timeStamp;\n break;\n default:\n return $this->text;\n break;\n }\n }",
"public function getMeta($name)\n {\n $meta = $this->meta;\n\n return array_get($meta, $name);\n }",
"private function get_meta( $key, $single = true ) {\n\t\treturn get_post_meta( $this->get_id(), $key, $single );\n\t}",
"function thememount_entry_meta($echo = true) {\n\t$return = '';\n\t\n\tglobal $post;\n\t\n\tif( isset($post->post_type) && $post->post_type=='page' ){\n\t\treturn;\n\t}\n\t\n\t\n\t$postFormat = get_post_format();\n\t\n\t// Post author\n\t$categories_list = get_the_category_list( __( ', ', 'howes' ) ); // Translators: used between list items, there is a space after the comma.\n\t$tag_list = get_the_tag_list( '', __( ', ', 'howes' ) ); // Translators: used between list items, there is a space after the comma.\n\t$num_comments = get_comments_number();\n\t\n\t$return .= '<div class=\"thememount-meta-details\">';\n\t\t// Date\n\t\t$return .= '<span class=\"tm-date-wrapper\"><i class=\"tmicon-fa-clock-o\"></i> ' . get_the_date() . '</span>';\n\n\t\tif ( 'post' == get_post_type() ) {\n\t\t\tif( !is_single() ){\n\t\t\t\t$return .= sprintf( '<div class=\"thememount-post-user\"><span class=\"author vcard\"><i class=\"tmicon-fa-user\"></i> <a class=\"url fn n\" href=\"%1$s\" title=\"%2$s\" rel=\"author\">%3$s</a></span></div>',\n\t\t\t\t\tesc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),\n\t\t\t\t\tesc_attr( sprintf( __( 'View all posts by %s', 'howes' ), get_the_author() ) ),\n\t\t\t\t\tget_the_author()\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\tif ( $tag_list ) { $return .= '<span class=\"tags-links\"><i class=\"tmicon-fa-tags\"></i> ' . $tag_list . '</span>'; };\n\t\tif ( $categories_list ) { $return .= '<span class=\"categories-links\"><i class=\"tmicon-fa-folder-open\"></i> ' . $categories_list . '</span>'; };\n\t\tif( !is_sticky() && comments_open() && ($num_comments>0) ){\n\t\t\t$return .= '<span class=\"comments\"><i class=\"tmicon-fa-comments\"></i> ';\n\t\t\t$return .= $num_comments;\n\t\t\t$return .= '</span>';\n\t\t}\n\n\t$return .= '</div>';\n\t\n\tif( $echo == true ){\n\t\techo $return;\n\t} else {\n\t\treturn $return;\n\t}\n\t\n\t\n}",
"public function getMetaDescription(): string\n {\n return (string) $this->metaDescription;\n }",
"public function getMeta($key) {\n\t\t$meta = $this->getMetaData();\n\t\treturn isset($meta[$key]) ? $meta[$key] : null;\n\t}",
"function __themename_post_meta(){\n printf(\n esc_html__( 'posted on %s', 'Cypher Nex' ),\n '<a href=\"' . esc_url(get_permalink()) . '\" >\n <time datetime=\"' . esc_attr(get_the_date('c')) .'\"> '. get_the_date() .'</time></a>'\n );\n /* translators: %s Post Author */\n printf(\n esc_html__( ' By %s', 'Cypher Nex' ),\n '<a href=\"'. esc_url(get_author_posts_url(get_the_author_meta('ID'))) . '\"> '. esc_html(get_the_author()) .'</a>'\n );\n}",
"public function metaField()\n {\n return $this->belongsTo(\n MetaField::class,\n self::COLUMN_META_FIELD_ID\n );\n }",
"public function meta(){\n $table_meta = new \\stdClass();\n\n // get fields in the database table\n if(count($this->_model_meta)==0){\n $this->_meta();\n }\n\n\n foreach ($this->_model_meta as $meta) {\n $table_meta->{$meta->name} = $meta;\n }\n\n return $table_meta;\n }",
"function update_booking_meta( $meta ) {\n foreach ( $meta as $key => $value ) {\n if ( $key !== 'services' ) {\n update_post_meta( $this->id, '_' . $key, $value );\n } else {\n wp_set_post_terms( $this->id, $value, YITH_WCBK_Post_Types::$service_tax );\n }\n }\n }",
"function classiera_entry_meta() {\r\n\tif ( is_sticky() && is_home() && ! is_paged() )\r\n\t\techo '<span class=\"featured-post\">' . esc_html_e( 'Sticky', 'classiera' ) . '</span>';\r\n\r\n\tif ( ! has_post_format( 'link' ) && 'post' == get_post_type() )\r\n\t\tclassiera_entry_date();\r\n\r\n\t// Translators: used between list items, there is a space after the comma.\r\n\t$categories_list = get_the_category_list( esc_html_e( ',', 'classiera' ) );\r\n\tif ( $categories_list ) {\r\n\t\techo '<span class=\"categories-links\">' . $categories_list . '</span>';\r\n\t}\r\n\r\n\t// Translators: used between list items, there is a space after the comma.\r\n\t$tag_list = get_the_tag_list( '', esc_html_e( ',', 'classiera' ) );\r\n\tif ( $tag_list ) {\r\n\t\techo '<span class=\"tags-links\">' . $tag_list . '</span>';\r\n\t}\r\n\r\n\t// Post author\r\n\tif ( 'post' == get_post_type() ) {\r\n\t\tprintf( '<span class=\"author vcard\"><a class=\"url fn n\" href=\"%1$s\" title=\"%2$s\" rel=\"author\">%3$s</a></span>',\r\n\t\t\tesc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),\r\n\t\t\tesc_attr( sprintf( __( 'View all posts by %s', 'classiera' ), get_the_author() ) ),\r\n\t\t\tget_the_author()\r\n\t\t);\r\n\t}\r\n}",
"function tcsn_post_meta() {\n\n\tglobal $post;\n\tif ( ! is_page() && 'page' != $post->post_type ) {\n\t\t$post_footer_metadata = ( get_post_format() ? '<a class=\"post-format-meta\" href=\"' . get_post_format_link( get_post_format() ) . '\">' . get_post_format_string( get_post_format() ) . '</a>' : '' \t\t);\n\t} \n\t\techo '<span class=\"post-meta\">' . $post_footer_metadata. '</span>'; \n\t\t\n\t// Post author\n\tif ( 'post' == get_post_type() ) {\n\t\tprintf( 'By <span class=\"author vcard margin-less\"><a class=\"url fn n\" href=\"%1$s\" title=\"%2$s\" rel=\"author\">%3$s</a></span><span class=\"text-sep\">/</span>',\n\t\t\tesc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),\n\t\t\tesc_attr( sprintf( __( 'View all posts by %s', 'tcsn_theme' ), get_the_author() ) ),\n\t\t\tget_the_author()\n\t\t);\n\t}\n\t\n\t// Post date\n\tif ( ! has_post_format( 'link' ) && 'post' == get_post_type() )\n\t\ttcsn_post_date();\n\t\t\n\t// Categories\n\t$categories_list = get_the_category_list( __( ', ', 'tcsn_theme' ) );\n\tif ( $categories_list ) {\n\t\techo 'in <span class=\"categories-links\">' . $categories_list . '</span>';\n\t}\n\t\n\t// Tags\n\tif ( ! is_single() ) {\n\t\t$tag_list = get_the_tag_list( '', __( ', ', 'tcsn_theme' ) );\n\t\tif ( $tag_list ) {\n\t\t\techo '<span class=\"text-sep\">/</span> tags <span class=\"tags-links\">' . $tag_list . '</span>';\n\t\t}\n\t}\n\t\n\telse {\n\t\t$tag_list = get_the_tag_list( '', __( ', ', 'tcsn_theme' ) );\n\t if ( $tag_list ) {\n\t\techo '<span class=\"text-sep\">/</span> tags <span class=\"tags-links\">' . $tag_list . '</span>';\n\t } \n\t}\n}",
"function agilespirit_entry_meta() {\n if ( is_sticky() && is_home() && ! is_paged() )\n echo '<span class=\"featured-post\">' . __( 'Sticky', 'agilespirit' ) . '</span>';\n\n if ( ! has_post_format( 'link' ) && 'post' == get_post_type() )\n agilespirit_entry_date();\n\n // Translators: used between list items, there is a space after the comma.\n $categories_list = get_the_category_list( __( ', ', 'agilespirit' ) );\n if ( $categories_list ) {\n echo ' ' . __('in', 'agilespirit') . ' <span class=\"categories-links\">' . $categories_list . '</span>';\n }\n\n // Translators: used between list items, there is a space after the comma.\n $tag_list = get_the_tag_list( '', __( ', ', 'agilespirit' ) );\n if ( $tag_list ) {\n echo '<span class=\"tags-links\">' . ' ' . __(' concerning ', 'agilespirit') . ' ' . $tag_list . '</span>';\n }\n\n // Post author\n if ( 'post' == get_post_type() ) {\n _e(' by ', 'agilespirit');\n printf( '<span class=\"author\"><a class=\"url fn n\" href=\"%1$s\" title=\"%2$s\" rel=\"author\">%3$s</a></span>',\n esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),\n esc_attr( sprintf( __( 'View all posts by %s', 'agilespirit' ), get_the_author() ) ),\n get_the_author()\n );\n }\n}",
"public function get_meta( $meta_key ) {\n\t\t$meta_value = get_metadata( $this->get_meta_type(), $this->get_id(), $meta_key, true );\n\n\t\tif ( false === $meta_value ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn $meta_value;\n\t}"
] | [
"0.67563593",
"0.61785555",
"0.5706054",
"0.5674821",
"0.5674821",
"0.5669658",
"0.5592495",
"0.5554754",
"0.5520171",
"0.5511923",
"0.5511923",
"0.54742587",
"0.5471152",
"0.5466725",
"0.5466725",
"0.5459793",
"0.545514",
"0.5429134",
"0.54226637",
"0.5405048",
"0.53978944",
"0.53868103",
"0.5355457",
"0.53040695",
"0.530066",
"0.530066",
"0.530066",
"0.530066",
"0.530066",
"0.52846503",
"0.52614903",
"0.5254834",
"0.5251888",
"0.52359456",
"0.52203476",
"0.5209645",
"0.5200883",
"0.5197324",
"0.51896983",
"0.518813",
"0.51825297",
"0.5182363",
"0.51721704",
"0.51686203",
"0.51461667",
"0.51382935",
"0.51291734",
"0.51205987",
"0.510043",
"0.5088671",
"0.50746924",
"0.50733244",
"0.50638515",
"0.506136",
"0.50505686",
"0.504282",
"0.50405645",
"0.50339234",
"0.5032447",
"0.503201",
"0.5030524",
"0.5025324",
"0.5013822",
"0.50054044",
"0.49943048",
"0.49916106",
"0.49912322",
"0.49781984",
"0.497768",
"0.49759346",
"0.4966105",
"0.49544305",
"0.4953201",
"0.4949011",
"0.49482217",
"0.49456593",
"0.49437475",
"0.49399364",
"0.49383146",
"0.49380365",
"0.4926446",
"0.4924341",
"0.49218684",
"0.49142888",
"0.4905935",
"0.49055988",
"0.48973733",
"0.48899844",
"0.48776105",
"0.48768583",
"0.4876252",
"0.48715878",
"0.4858285",
"0.48501873",
"0.48457405",
"0.48395953",
"0.48238084",
"0.48195496",
"0.4816233",
"0.48096654"
] | 0.71295846 | 0 |
Removes a meta entry for the booking | function wpbs_delete_booking_meta($booking_id, $meta_key, $meta_value = '', $delete_all = '')
{
return wp_booking_system()->db['bookingmeta']->delete($booking_id, $meta_key, $meta_value, $delete_all);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function magazine_remove_entry_meta() {\n\tif ( ! is_single() ) {\n\t\tremove_action( 'genesis_entry_footer', 'genesis_entry_footer_markup_open', 5 );\n\t\tremove_action( 'genesis_entry_footer', 'genesis_post_meta' );\n\t\tremove_action( 'genesis_entry_footer', 'genesis_entry_footer_markup_close', 15 );\n\t}\n\n}",
"public function removeMeta(string $key)\n {\n if (isset($this->meta[$key])) {\n unset($this->meta[$key]);\n }\n }",
"public function delete_meta( &$object, $meta ) {\n\t\t}",
"function delete_book_meta( $id, $key, $value = '' ) {\r\n\treturn delete_post_meta($id, $key, $value);\r\n}",
"function delete_post_meta_by_key($post_meta_key)\n {\n }",
"function delete_site_meta_by_key($meta_key)\n {\n }",
"function delete_post_meta($post_id, $meta_key, $meta_value = '')\n {\n }",
"public function deletemeta($meta) {\n\t\tif ($this->req ['auth_type'] == 'oauth') {\n\t\t\tif (( int ) $meta == 0) {\n\t\t\t\t$oRow = $this->oMetas->getById ( $meta );\n\t\t\t\tif (is_array ( $oRow )) {\n\t\t\t\t\t$meta = ( int ) $oRow ['idmeta'];\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (( int ) $meta > 0) {\n\t\t\t\t\n\t\t\t\t$oTableCompMetas = new Application_Model_Table ();\n\t\t\t\t$oTableCompMetas->setTable ( 'comp_metas' );\n\t\t\t\t$oTableCompMetas->setPrimary ( 'idcomp_meta' );\n\t\t\t\t$oSelect = $oTableCompMetas->fetchAll ( $oTableCompMetas->select ()->from ( $oTableCompMetas->getTable () )->where ( 'metas_idmeta=' . ( int ) $meta ) );\n\t\t\t\tif (isset ( $_GET ['force'] ) && $_GET ['force'] == 'yes') {\n\t\t\t\t\tif ($this->isExtendable ()) {\n\t\t\t\t\t\tif ($this->oMetas->deleteMeta ( $meta )) {\n\t\t\t\t\t\t\t$iGiveBudgetBack = $this->usr;\n\t\t\t\t\t\t\tif (isset ( $oRowToDelete->accounts_idaccount ) && ( int ) $oRowToDelete->accounts_idaccount > 0) {\n\t\t\t\t\t\t\t\t$iIdCreator = ( int ) $oRowToDelete->accounts_idaccount;\n\t\t\t\t\t\t\t\t$iGiveBudgetBack = ($iIdCreator > 0) ? $iIdCreator : $iGiveBudgetBack;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$this->setUsage ( $iGiveBudgetBack, array ('maxmetas' => - 1 ) );\n\t\t\t\t\t\t\t$this->addEntry ( 'response', array ('meta' => $meta, 'message' => 'META_WAS_DELETED', 'comps_affected' => ( int ) $oSelect->count () ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->addEntry ( 'response', $this->oError->throwError ( 'MISSING_EXTEND_RIGHT' ) );\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif ($this->isDeleteable ()) {\n\t\t\t\t\t\tif ($oSelect->count () == 0) {\n\t\t\t\t\t\t\t$oRowToDelete = $this->oMetas->fetchRow ( $this->oMetas->select ()->where ( $this->oMetas->getPrimary () . '=' . $meta ) );\n\t\t\t\t\t\t\tif ($this->oMetas->deleteMeta ( $meta )) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$iGiveBudgetBack = $this->usr;\n\t\t\t\t\t\t\t\tif (isset ( $oRowToDelete->accounts_idaccount ) && ( int ) $oRowToDelete->accounts_idaccount > 0) {\n\t\t\t\t\t\t\t\t\t$iIdCreator = ( int ) $oRowToDelete->accounts_idaccount;\n\t\t\t\t\t\t\t\t\t$iGiveBudgetBack = ($iIdCreator > 0) ? $iIdCreator : $iGiveBudgetBack;\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\t$this->setUsage ( $iGiveBudgetBack, array ('maxmetas' => - 1 ) );\n\t\t\t\t\t\t\t\t$this->addEntry ( 'response', array ('meta' => $meta, 'message' => 'META_WAS_DELETED' ) );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$this->addEntry ( 'response', $this->oError->throwError ( 'META_IN_TOUCH_WITH_COMPOSITE' ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->addEntry ( 'response', $this->oError->throwError ( 'MISSING_DELETE_RIGHT' ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->addEntry ( 'response', $this->oError->throwError ( 'META_NOT_FOUND' ) );\n\t\t\t}\n\t\t} else {\n\t\t\t$this->addEntry ( 'response', $this->oError->throwError ( 'OAUTH_ACCESS_ONLY' ) );\n\t\t}\n\t\treturn $this->getResponse ();\n\t}",
"function unregister_post_meta($post_type, $meta_key)\n {\n }",
"public function deletePostMeta() {\n delete_post_meta($this->id, $this->_post_meta_name);\n }",
"function wck_remove_meta(){\r\n\t\tcheck_ajax_referer( \"wck-delete-entry\" );\r\n\t\tif( !empty( $_POST['meta'] ) )\r\n\t\t\t$meta = sanitize_text_field( $_POST['meta'] );\r\n\t\telse \r\n\t\t\t$meta = '';\r\n\t\tif( !empty( $_POST['id'] ) )\r\n\t\t\t$id = absint( $_POST['id'] );\r\n\t\telse \r\n\t\t\t$id = '';\r\n\t\tif( isset( $_POST['element_id'] ) )\r\n\t\t\t$element_id = absint( $_POST['element_id'] );\r\n\t\telse \r\n\t\t\t$element_id = '';\r\n\r\n\t\t// Security checks\r\n\t\tif( true !== ( $error = self::wck_verify_user_capabilities( $this->args['context'], $meta, $id ) ) ) {\r\n\t\t\theader( 'Content-type: application/json' );\r\n\t\t\tdie( json_encode( $error ) );\r\n\t\t}\r\n\t\t\r\n\t\tif( $this->args['context'] == 'post_meta' )\r\n\t\t\t$results = get_post_meta($id, $meta, true);\r\n\t\telse if ( $this->args['context'] == 'option' )\r\n\t\t\t$results = get_option( apply_filters( 'wck_option_meta' , $meta, $element_id ) );\r\n\t\t\r\n\t\t$old_results = $results;\r\n\t\tunset($results[$element_id]);\r\n\t\t/* reset the keys for the array */\r\n\t\t$results = array_values($results);\r\n\r\n\t\t/* make sure this does not output anything so it won't break the json response below\r\n\t\twill keep it do_action for compatibility reasons\r\n\t\t */\r\n\t\tob_start();\r\n\t\t\tdo_action( 'wck_before_remove_meta', $meta, $id, $element_id );\r\n\t\t$wck_before_remove_meta = ob_get_clean(); //don't output it\r\n\t\t\r\n\t\tif( $this->args['context'] == 'post_meta' )\r\n\t\t\tupdate_post_meta($id, $meta, $results);\r\n\t\telse if ( $this->args['context'] == 'option' )\r\n\t\t\tupdate_option( apply_filters( 'wck_option_meta' , $meta, $results, $element_id ), wp_unslash( $results ) );\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t/* TODO: optimize so that it updates from the deleted element forward */\r\n\t\t/* if unserialize_fields is true delete the coresponding post metas */\r\n\t\tif( $this->args['unserialize_fields'] && $this->args['context'] == 'post_meta' ){\t\t\t\r\n\t\t\t\r\n\t\t\t$meta_suffix = 1;\t\t\t\r\n\r\n\t\t\tif( !empty( $results ) ){\r\n\t\t\t\tforeach( $results as $result ){\r\n\t\t\t\t\tforeach ( $result as $name => $value){\r\n\t\t\t\t\t\tupdate_post_meta($id, $meta.'_'.$name.'_'.$meta_suffix, $value);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$meta_suffix++;\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif( count( $results ) == 0 )\r\n\t\t\t\t$results = $old_results;\r\n\t\t\t\r\n\t\t\tif( !empty( $results ) ){\r\n\t\t\t\tforeach( $results as $result ){\t\t\t\t\r\n\t\t\t\t\tforeach ( $result as $name => $value){\r\n\t\t\t\t\t\tdelete_post_meta( $id, $meta.'_'.$name.'_'.$meta_suffix );\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$entry_list = $this->wck_refresh_list( $meta, $id );\r\n\t\t$add_form = $this->wck_add_form( $meta, $id );\r\n\r\n\t\theader( 'Content-type: application/json' );\r\n\t\tdie( json_encode( array( 'entry_list' => $entry_list, 'add_form' => $add_form ) ) );\r\n\t}",
"protected function deleteMeta() {\n Meta::deleteAll([\n 'owner' => $this->tableName(),\n 'owner_id' => $this->{static::meta_id_field()}\n ]);\n }",
"function delete_site_meta($site_id, $meta_key, $meta_value = '')\n {\n }",
"function delete_student_meta( $student_id, $meta_key, $meta_value = '' ) {\n return delete_metadata( 'student', $student_id, $meta_key, $meta_value );\n }",
"function delete_meta($mid)\n {\n }",
"public function remove_packlink_meta_data() {\n\t\t$query = \"DELETE FROM `{$this->db->postmeta}` WHERE `meta_key` LIKE \\\"%_packlink_%\\\"\";\n\n\t\t$this->db->query( $query );\n\t}",
"public function removeMetaTag($name)\n\t{\n\t\tif($this->metaTags->offsetExists($name))\n\t\t\t$this->metaTags->offsetUnset($name);\n\n\t\tif($this->pageInitialized)\n\t\t{\n\t\t\t$meta = $this->document->xpath('.//meta[@name=\"' . $name . '\" or @http-equiv=\"' . $name . '\" or @property=\"' . $name . '\"]');\n\n\t\t\tif($meta->length == 1)\n\t\t\t\t$meta->item(0)->remove();\n\t\t}\n\t}",
"function remove_meta_box($id, $screen, $context)\n {\n }",
"function delete_post_meta($term_id, $taxonomy, $meta_key, $meta_value = '') {\n\n return delete_metadata('post', $post_id, $meta_key, $meta_value);\n}",
"public function deleteMeta($key, $value = null)\n {\n // dump($this->ID, $key, $value);\n return delete_user_meta($this->ID, $key, $value);\n }",
"public function delete_meta( $key, $value = '', $delete_all = false );",
"public function deleted(MetaTag $metaTag)\n {\n // Removing Entries from the Cache\n $this->clearCache($metaTag);\n }",
"function delete_term_meta($term_id, $meta_key, $meta_value = '')\n {\n }",
"public function clearMetas(): void\n {\n $this->metas()->delete();\n }",
"function remove_yoast_metabox_reservations(){\n\tremove_meta_box('wpseo_meta', 'hub_notification', 'normal');\n}",
"public function delMetadata() {}",
"public function delMetadata() {}",
"public function delMetadata() {}",
"public function forgetMeta(string $key): void\n {\n $this->metas()->where('key', $key)->delete();\n }",
"function unregister_term_meta($taxonomy, $meta_key)\n {\n }",
"function remove_postcustom() {\n\tremove_meta_box( 'postcustom', null, 'normal' );\n}",
"protected function deleteMeta()\n {\n $sql = sprintf(\n 'DELETE FROM %sfaqattachment WHERE id = %d',\n PMF_Db::getTablePrefix(),\n $this->id\n );\n\n $this->db->query($sql);\n }",
"function delete_metadata($meta_type, $object_id, $meta_key, $meta_value = '', $delete_all = \\false)\n {\n }",
"function unregister_meta_key($object_type, $meta_key, $object_subtype = '')\n {\n }",
"public function unregister_meta_boxes()\n {\n }",
"function delete_term_meta_by_key($term_meta_key, $taxonomy) {\n\n return delete_metadata( 'post', null, $term_meta_key, '', true );\n}",
"function delete_comment_meta($comment_id, $meta_key, $meta_value = '')\n {\n }",
"public static function delete_meta( $object_id, $meta_key, $meta_value = '' ) {\n\n\t\tdelete_term_meta( $object_id, $meta_key, $meta_value );\n\t}",
"private function delete_post_meta( $post_id, $meta_key ) {\n\t\t\n\t\tif ( '' !== get_post_meta( $post_id, $meta_key, true ) ) {\n\t\t\tdelete_post_meta( $post_id, $meta_key );\n\t\t}\n\t\t\n\t}",
"function delete_usermeta($user_id, $meta_key, $meta_value = '')\n {\n }",
"public function remove_meta( $key ) {\n\t\tunset( $this->data['meta'][ $key ] );\n\n\t\treturn $this;\n\t}",
"function delete_user_meta($user_id, $meta_key, $meta_value = '')\n {\n }",
"function delete_value($post_id, $meta_key, $field)\n {\n }",
"function remove_generator_meta() {\n\t\tremove_action('wp_head', 'wp_generator');\n\t}",
"function destroy()\n {\n $user_meta = get_user_meta(get_current_user_id(), self::USER_META_KEY, true);\n\n if ($user_meta) {\n unset($user_meta[ $this->id ]);\n return update_user_meta(get_current_user_id(), self::USER_META_KEY, $user_meta);\n } else {\n throw new Exception(\"Unable to destroy collection '$id'.\");\n }\n }",
"function remove( $post_id = 0 ) {\n\t\t\n\t\t// unset meta\n\t\tunset( $this->meta[ $post_id ] );\n\t\t\n\t\t// reset post_id\n\t\tif( $post_id === $this->post_id ) {\n\t\t\t$this->post_id = 0;\n\t\t}\n\t}",
"public function MetaDeletable() {\n\t\t\treturn true;\n\t\t}",
"public function removeMeta($key): int\n {\n $keys = (array) $key;\n\n /** @var HasMetadataInterface $this */\n return Meta::metable(self::class, $this->id)\n ->whereIn('key', $keys)\n ->delete();\n }",
"function remove_dashboard_meta() {\r\n remove_meta_box( 'dashboard_incoming_links', 'dashboard', 'normal' );\r\n\t\t\t\tremove_meta_box( 'dashboard_welcome', 'dashboard', 'normal' );\r\n remove_meta_box( 'dashboard_plugins', 'dashboard', 'normal' );\r\n remove_meta_box( 'dashboard_primary', 'dashboard', 'side' );\r\n remove_meta_box( 'dashboard_secondary', 'dashboard', 'normal' );\r\n remove_meta_box( 'dashboard_quick_press', 'dashboard', 'side' );\r\n remove_meta_box( 'dashboard_recent_drafts', 'dashboard', 'side' );\r\n remove_meta_box( 'dashboard_recent_comments', 'dashboard', 'normal' );\r\n remove_meta_box( 'dashboard_right_now', 'dashboard', 'normal' );\r\n remove_meta_box( 'dashboard_activity', 'dashboard', 'normal');//since 3.8\r\n}",
"function ssep_force_hide_meta() {\n\tglobal $post, $ss_blog;\n\n\t$hide_meta = ssep_hide_meta( $post->ID );\n\n\tif ( $hide_meta ) {\n\t\tremove_action( 'shoestrap_entry_meta', array( $ss_blog, 'meta_custom_render' ) );\n\t\tadd_filter( 'shoestrap_the_tags', '__return_null' );\n\t\tadd_filter( 'shoestrap_the_cats', '__return_null' );\n\t}\n}",
"function delete_metadata_by_mid($meta_type, $meta_id)\n {\n }",
"function delete_term_meta( $term_id, $meta_key, $meta_value = '' ) {\n\treturn delete_metadata( 'taxonomy', $term_id, $meta_key, $meta_value );\n}",
"function remove_dashboard_meta() {\nremove_meta_box( ‘dashboard_incoming_links’, ‘dashboard’, ‘normal’ );\nremove_meta_box( ‘dashboard_plugins’, ‘dashboard’, ‘normal’ );\nremove_meta_box( ‘dashboard_primary’, ‘dashboard’, ‘side’ );\nremove_meta_box( ‘dashboard_secondary’, ‘dashboard’, ‘normal’ );\nremove_meta_box( ‘dashboard_quick_press’, ‘dashboard’, ‘side’ );\nremove_meta_box( ‘dashboard_recent_drafts’, ‘dashboard’, ‘side’ );\nremove_meta_box( ‘dashboard_recent_comments’, ‘dashboard’, ‘normal’ );\nremove_meta_box( ‘dashboard_right_now’, ‘dashboard’, ‘normal’ );\nremove_meta_box( ‘dashboard_activity’, ‘dashboard’, ‘normal’);//since 3.8\n}",
"function podlove_no_enclosure_autodiscovery($meta_id, $post_id, $meta_key, $meta_value)\n{\n global $wpdb;\n\n if ($meta_key != '_encloseme') {\n return;\n }\n\n $sql = \"\n\t\tDELETE FROM\n\t\t\t{$wpdb->postmeta} \n\t\tWHERE\n\t\t\tpost_id = '{$post_id}'\n\t\t\tAND meta_key = '_encloseme'\n\t\t\tAND meta_id = '{$meta_id}'\n\t\t\";\n\n $wpdb->query($sql);\n}",
"function d4tw_remove_dash_meta() {\r\n remove_meta_box( 'dashboard_incoming_links', 'dashboard', 'normal' );\r\n remove_meta_box( 'dashboard_plugins', 'dashboard', 'normal' );\r\n remove_meta_box( 'dashboard_primary', 'dashboard', 'side' );\r\n remove_meta_box( 'dashboard_secondary', 'dashboard', 'normal' );\r\n remove_meta_box( 'dashboard_recent_drafts', 'dashboard', 'side' );\r\n remove_meta_box( 'dashboard_recent_comments', 'dashboard', 'normal' );\r\n remove_meta_box( 'dashboard_right_now', 'dashboard', 'normal' );\r\n remove_meta_box( 'dashboard_activity', 'dashboard', 'normal');//since 3.8\r\n}",
"function my_remove_meta_boxes() {\n\tremove_meta_box('tagsdiv-awards_sponsor_type', 'awards_sponsors', 'side');\n}",
"public function purgeMeta(): int\n {\n /** @var HasMetadataInterface $this */\n return Meta::metable(static::class, $this->id)\n ->delete();\n }",
"function wp_ajax_delete_meta()\n {\n }",
"function delete(){\r\n\t\tglobal $wpdb;\r\n\t\t$sql = $wpdb->prepare(\"DELETE FROM \". $wpdb->prefix.EM_BOOKINGS_TABLE . \" WHERE booking_id=%d\", $this->id);\r\n\t\treturn ( $wpdb->query( $sql ) !== false );\r\n\t}",
"function remove_single_post() {\n remove_action('thematic_singlepost', 'thematic_single_post');\n}",
"function custom_remove() { \n remove_meta_box('add-sfwd-certificates', 'nav-menus', 'side');\n remove_meta_box('add-sfwd-assignment', 'nav-menus', 'side'); \n}",
"function remove_yoast_acesso_camera() {\r\n remove_meta_box( 'wpseo_meta' , 'acesso_camera' , 'normal' ); \r\n}",
"public function delete_meta()\n {\n # process the request which it must be post and ajax request\n if (request()->isPost() && request()->isAjax()) {\n \n $objectId = request()->getPost('object-id', 'int');\n $object = request()->getPost('object', 'alphanum');\n \n $this->setJsonResponse();\n\n $object = PostMeta::findFirstByMeta_id($objectId);\n\n if(!$object) {\n $this->jsonMessages['messages'][] = [\n 'type' => 'warning',\n 'content' => 'Object not found!'\n ];\n return $this->jsonMessages;\n }\n $object->delete();\n\n \n $this->jsonMessages['messages'][] = [\n 'type' => 'success',\n 'content' => 'Object has been deleted!'\n ];\n return $this->jsonMessages;\n \n\n }\n }",
"function wpbs_delete_booking($booking_id)\n{\n\n return wp_booking_system()->db['bookings']->delete($booking_id);\n\n}",
"public function afterDelete() {\n $this->deleteMeta();\n parent::afterDelete();\n }",
"public function delete () {\n\t\tglobal $wpdb;\n\n\t\t$wpdb->query($wpdb->prepare(\"\n\t\tDELETE FROM $wpdb->postmeta WHERE meta_key='syndication_feed_id'\n\t\tAND meta_value = '%s'\n\t\t\", $this->id));\n\n\t\t$wpdb->query($wpdb->prepare(\"\n\t\tDELETE FROM $wpdb->links WHERE link_id = %d\n\t\t\", (int) $this->id));\n\n\t\t$this->id = NULL;\n\t}",
"public function remove_meta_box() {\n\t\tremove_meta_box( $this->tax_name . 'div', 'ctrs-projects', 'side' );\n\t}",
"function acf_delete_metadata($post_id = 0, $name = '', $hidden = \\false)\n{\n}",
"protected function MetaAfterDelete() {\n\t\t}",
"function extamus_remove_dashboard_meta() {\n\tif ( ! current_user_can( 'administrator' ) ) {\n\t\tremove_meta_box( 'dashboard_incoming_links', 'dashboard', 'normal' );\n\t\tremove_meta_box( 'dashboard_plugins', 'dashboard', 'normal' );\n\t\tremove_meta_box( 'dashboard_primary', 'dashboard', 'normal' );\n\t\tremove_meta_box( 'dashboard_secondary', 'dashboard', 'normal' );\n\t\tremove_meta_box( 'dashboard_quick_press', 'dashboard', 'side' );\n\t\tremove_meta_box( 'dashboard_recent_drafts', 'dashboard', 'side' );\n\t\tremove_meta_box( 'dashboard_recent_comments', 'dashboard', 'normal' );\n\t\tremove_meta_box( 'dashboard_right_now', 'dashboard', 'normal' );\n\t\tremove_meta_box( 'dashboard_activity', 'dashboard', 'normal');\n\t}\n}",
"function remove_dashboard_meta() {\n\n\t//Completely remove various dashboard widgets (remember they can also be HIDDEN from admin)\n\tremove_meta_box( 'dashboard_quick_press', 'dashboard', 'side' ); //Quick Press widget\n\tremove_meta_box( 'dashboard_recent_drafts', 'dashboard', 'side' ); //Recent Drafts\n\tremove_meta_box( 'dashboard_primary', 'dashboard', 'side' ); //WordPress.com Blog\n\tremove_meta_box( 'dashboard_secondary', 'dashboard', 'side' ); //Other WordPress News\n\tremove_meta_box( 'dashboard_incoming_links','dashboard', 'normal' ); //Incoming Links\n\tremove_meta_box( 'dashboard_plugins', 'dashboard', 'normal' ); \n\tremove_meta_box( 'dashboard_activity', 'dashboard', 'normal' ); \n\tremove_meta_box( 'dashboard_right_now', 'dashboard', 'normal' ); \n\tremove_action('welcome_panel', 'wp_welcome_panel'); \n}",
"function delete_post_type_event(){\n\tunregister_post_type( 'event' );\n}",
"function clear_unknown_post_metas()\n {\n global $wpdb;\n\n $query = \"SELECT count(*) FROM {$wpdb->postmeta} WHERE ( meta_key LIKE 'prli%' OR meta_key LIKE 'pretty-link%' OR meta_key LIKE '_prli%' OR meta_key LIKE '_pretty-link%' ) AND post_id=0\";\n $count = $wpdb->get_var($query);\n\n if($count)\n {\n $query = \"DELETE FROM {$wpdb->postmeta} WHERE ( meta_key LIKE 'prli%' OR meta_key LIKE 'pretty-link%' OR meta_key LIKE '_prli%' OR meta_key LIKE '_pretty-link%' ) AND post_id=0\";\n $wpdb->query($query);\n }\n }",
"function delete_term_meta( $term_id, $meta_key, $meta_value = '' ) {\r\n\r\n if ( current_theme_supports( 'extended-taxonomies' ) ) {\r\n return delete_post_meta( get_post_for_extended_term( $term_id )->ID, $meta_key, $meta_value );\r\n }\r\n\r\n return delete_metadata( 'taxonomy', $term_id, $meta_key, $meta_value );\r\n }",
"function delete_post_term_meta( int $post_id, int $term_id, string $meta_key, $meta_value = '' ): bool {\n\t\treturn \\wpinc\\meta\\post_term_meta\\delete_post_term_meta( $post_id, $term_id, $meta_key, $meta_value );\n\t}",
"function admin_speedup_remove_post_meta_box() {\n\tglobal $post_type;\n\tif ( is_admin() && post_type_supports( $post_type, 'custom-fields' )) {\n\t\tremove_meta_box( 'postcustom', $post_type, 'normal' );\n\t}\n}",
"public function remove_meta_data_by_object(ActiveRecord $ActiveRecord): void\n {\n //it is expected to be called - do nothing\n }",
"function board_agenda_front_genesis_meta() {\n\t\tremove_action( 'genesis_loop', 'genesis_do_loop' );\n\n\t\t//* Remove the post content (requires HTML5 theme support)\n\t\tremove_action( 'genesis_entry_content', 'genesis_do_post_content' );\n\n\t\t//add_action( 'genesis_entry_content', 'sanders_front_content' );\n\t\tadd_action( 'genesis_loop', 'board_agenda_resource_centre' );\n\n\t\tadd_action('genesis_before_footer','board_agenda_front_latest_insight',1);\n\n}",
"function board_agenda_front_genesis_meta() {\n\t\tremove_action( 'genesis_loop', 'genesis_do_loop' );\n\n\t\t//* Remove the post content (requires HTML5 theme support)\n\t\tremove_action( 'genesis_entry_content', 'genesis_do_post_content' );\n\n\t\t//add_action( 'genesis_entry_content', 'sanders_front_content' );\n\t\tadd_action( 'genesis_loop', 'board_agenda_resource_centre' );\n\n\t\tadd_action('genesis_before_footer','board_agenda_front_latest_insight',1);\n\n}",
"function get_the_image_delete_cache_by_meta( $meta_id, $post_id ) {\n\twp_cache_delete( $post_id, 'get_the_image' );\n}",
"public static function removeData( $post_id )\n\t{\n\t\tglobal $wpdb;\n\n\t\t$table_name = $wpdb->prefix . 'helpful';\n\t\t$wpdb->delete( $table_name, [ 'post_id' => $post_id ] );\n\t\tdelete_post_meta( $post_id, 'helpful-pro' );\n\t\tdelete_post_meta( $post_id, 'helpful-contra' );\n\t\tdelete_post_meta( $post_id, 'helpful_remove_data', 'yes' );\n\n\t\tHelpful_Helper_Optimize::clear_cache();\n\t}",
"public static function removeData( $post_id ) {\n\t\tglobal $wpdb;\n\n\t\t$table_name = $wpdb->prefix . 'helpful';\n\t\t$wpdb->delete( $table_name, [ 'post_id' => $post_id ] );\n\t\tdelete_post_meta( $post_id, 'helpful-pro' );\n\t\tdelete_post_meta( $post_id, 'helpful-contra' );\n\t\tdelete_post_meta( $post_id, 'helpful_remove_data', 'yes' );\n\n\t\tHelpful_Helper_Optimize::clear_cache();\n\t}",
"function wyz_delete_business_post() {\n\t$nonce = filter_input( INPUT_POST, 'nonce' );\n\n\tif ( ! wp_verify_nonce( $nonce, 'wyz_ajax_custom_nonce' ) ) {\n\t\twp_die( 'busted' );\n\t}\n\n\tglobal $current_user;\n\twp_get_current_user();\n\n\t$_post_id = intval( $_POST['post-id'] );\n\t$_bus_id = intval( $_POST['bus-id'] );\n\t$_user_id = $current_user->ID;\n\t$post = get_post($_post_id);\n\tif ( $_user_id != $post->post_author && ! user_can( $_user_id, 'manage_options' ) ) {\n\t\twp_die( false );\n\t}\n\n\t$bus_posts = get_post_meta( $_bus_id, 'wyz_business_posts', true );\n\tif ( is_array( $bus_posts ) && ! empty( $bus_posts ) ) {\n\t\tforeach ( $bus_posts as $key => $value ) {\n\t\t\tif ( $value == $_post_id ) {\n\t\t\t\tunset( $bus_posts[ $key ] );\n\t\t\t\t$bus_posts = array_values( $bus_posts );\n\t\t\t\tupdate_post_meta( $_bus_id, 'wyz_business_posts', $bus_posts );\n\t\t\t\twp_trash_post( $_post_id );\n\t\t\t\twp_die( true );\n\t\t\t}\n\t\t}\n\t}\n\twp_die( false );\n}",
"private function sl_delete_metadata_by_mid($meta_id){\n\n\t\tif (!$result_delete = delete_metadata_by_mid( 'post', $meta_id )){\n\n \t\tsl_debbug('## Error. Deleting item with meta_id '.$meta_id, 'mediameta');\n\t\t\t\n\t\t}\n\n\t}",
"public function removeMeta($id)\n {\n unset($this->meta[$id]);\n return $this;\n }",
"function deleteCategoryMeta($cat_id) {\n\t\t$course_meta = new CourseMeta($cat_id);\n\t\t$course_meta->delete();\n\t}",
"public function remove_meta_boxes(){\r\n remove_meta_box('slugdiv', 'cycloneslider', 'normal');\r\n }",
"public function remove_meta_box() {\r\n\r\n\t\tif( ! is_wp_error( $this->tax_obj ) && isset($this->tax_obj->object_type) ) foreach ( $this->tax_obj->object_type as $post_type ):\r\n\t\t\t$id = ! is_taxonomy_hierarchical( $this->taxonomy ) ? 'tagsdiv-'.$this->taxonomy : $this->taxonomy .'div' ;\r\n\t \t\tremove_meta_box( $id, $post_type, 'side' );\r\n\t \tendforeach;\r\n\t}",
"public function destroy(Booking $booking)\n {\n //\n }",
"public function destroy(Booking $booking)\n {\n //\n }",
"public function destroy(Booking $booking)\n {\n //\n }",
"function acf_reset_postdata( $post_id = 0 ) {\n\treturn acf_get_instance('ACF_Local_Meta')->remove( $post_id );\n}",
"public function remove_post_custom_fields() {\n\n\t\tremove_meta_box('postcustom' , 'post' , 'normal');\n\n\t}",
"function tf_delete_post_meta($post_id, $meta_key, $meta_value = '') {\r\n // make sure meta is added to the post, not a revision\r\n if ( $the_post = wp_is_post_revision($post_id) )\r\n $post_id = $the_post;\r\n\r\n $meta_type = 'post';\r\n $object_id = $post_id;\r\n $delete_all = false;\r\n\r\n if ( !$meta_type || !$meta_key )\r\n return false;\r\n\r\n if ( (!$object_id = absint($object_id)) && !$delete_all )\r\n return false;\r\n\r\n if ( ! $table = _get_meta_table($meta_type) )\r\n return false;\r\n\r\n global $wpdb;\r\n\r\n $type_column = esc_sql($meta_type . '_id');\r\n $id_column = 'user' == $meta_type ? 'umeta_id' : 'meta_id';\r\n // expected_slashed ($meta_key)\r\n // $meta_key = stripslashes($meta_key); // this was the trouble !\r\n // $meta_value = stripslashes_deep($meta_value); // this was the trouble !\r\n\r\n $check = apply_filters( \"delete_{$meta_type}_metadata\", null, $object_id, $meta_key, $meta_value, $delete_all );\r\n if ( null !== $check )\r\n return (bool) $check;\r\n\r\n $_meta_value = $meta_value;\r\n $meta_value = maybe_serialize( $meta_value );\r\n\r\n $query = $wpdb->prepare( \"SELECT $id_column FROM $table WHERE meta_key = %s\", $meta_key );\r\n\r\n if ( !$delete_all )\r\n $query .= $wpdb->prepare(\" AND $type_column = %d\", $object_id );\r\n\r\n if ( $meta_value )\r\n $query .= $wpdb->prepare(\" AND meta_value = %s\", $meta_value );\r\n\r\n $meta_ids = $wpdb->get_col( $query );\r\n if ( !count( $meta_ids ) )\r\n return false;\r\n\r\n if ( $delete_all )\r\n $object_ids = $wpdb->get_col( $wpdb->prepare( \"SELECT $type_column FROM $table WHERE meta_key = %s\", $meta_key ) );\r\n\r\n do_action( \"delete_{$meta_type}_meta\", $meta_ids, $object_id, $meta_key, $_meta_value );\r\n\r\n // Old-style action.\r\n if ( 'post' == $meta_type )\r\n do_action( 'delete_postmeta', $meta_ids );\r\n\r\n $query = \"DELETE FROM $table WHERE $id_column IN( \" . implode( ',', $meta_ids ) . \" )\";\r\n\r\n $count = $wpdb->query($query);\r\n\r\n if ( !$count )\r\n return false;\r\n\r\n if ( $delete_all ) {\r\n foreach ( (array) $object_ids as $o_id ) {\r\n wp_cache_delete($o_id, $meta_type . '_meta');\r\n }\r\n } else {\r\n wp_cache_delete($object_id, $meta_type . '_meta');\r\n }\r\n\r\n do_action( \"deleted_{$meta_type}_meta\", $meta_ids, $object_id, $meta_key, $_meta_value );\r\n\r\n // Old-style action.\r\n if ( 'post' == $meta_type )\r\n do_action( 'deleted_postmeta', $meta_ids );\r\n\r\n return true;\r\n }",
"public function remove_metas( $id ) {\n\t\tdelete_post_meta( $id, 'wpcd_wpapp_goaccess_installed' );\n\t\tdelete_post_meta( $id, 'wpcd_wpapp_goaccess_domain' );\n\t\tdelete_post_meta( $id, 'wpcd_wpapp_goaccess_ssl' );\n\t\tdelete_post_meta( $id, 'wpcd_wpapp_goaccess_user' );\n\t\tdelete_post_meta( $id, 'wpcd_wpapp_goaccess_pass' );\n\t}",
"public function remove_meta_data(string $class, array $primary_index): void\n {\n //it is expected to be called - do nothing\n }",
"private function clearCache($metaTag)\n {\n Cache::flush();\n }",
"function humcore_remove_meta_boxes() {\n\n\tremove_meta_box( 'humcore_deposit_subjectdiv', 'humcore_deposit', 'side' );\n\tremove_meta_box( 'tagsdiv-humcore_deposit_tag', 'humcore_deposit', 'side' );\n\n}",
"public function handleDelete($key)\n {\n $val = $this->page->meta[$key];\n $this->page->deleteMeta($key);\n\n $this->presenter->flashMessage(\"Postavka je izbrisana\");\n //$this->invalidateControl('editpage_metalist');\n\n $this->invalidateControl();\n if (!$this->presenter->isAjax()) {\n $this->redirect('this#toc-meta');\n }\n }",
"public function destroy(SeoMetaTag $seoMetaTag)\n {\n //\n }"
] | [
"0.6817855",
"0.6588423",
"0.65615815",
"0.6523105",
"0.6522162",
"0.6520677",
"0.6477579",
"0.6446941",
"0.64313036",
"0.6418483",
"0.63549185",
"0.63247377",
"0.6246762",
"0.62242144",
"0.62033534",
"0.61713517",
"0.6099392",
"0.602397",
"0.59930724",
"0.59737945",
"0.59490275",
"0.59477997",
"0.594743",
"0.5929076",
"0.5920593",
"0.591106",
"0.591106",
"0.591106",
"0.5903773",
"0.58920413",
"0.58733183",
"0.58671033",
"0.5850664",
"0.5846675",
"0.58197725",
"0.5799167",
"0.57865196",
"0.57850057",
"0.57802397",
"0.57740235",
"0.5759723",
"0.57556176",
"0.5747314",
"0.5737306",
"0.57164896",
"0.5693644",
"0.5656962",
"0.56391436",
"0.5628903",
"0.5627524",
"0.5610905",
"0.5603435",
"0.56028",
"0.55708194",
"0.5554681",
"0.5550021",
"0.5528302",
"0.55256724",
"0.5518611",
"0.5510772",
"0.5499412",
"0.5487978",
"0.548442",
"0.5476106",
"0.54692155",
"0.54671985",
"0.54644835",
"0.54586697",
"0.54463714",
"0.5443488",
"0.54349947",
"0.543489",
"0.54159355",
"0.5409214",
"0.53968257",
"0.53863686",
"0.53836733",
"0.53702086",
"0.53702086",
"0.53654116",
"0.5358287",
"0.53462404",
"0.53415895",
"0.53224736",
"0.53170675",
"0.5315046",
"0.5314922",
"0.5312276",
"0.5300945",
"0.5300945",
"0.5300945",
"0.5300801",
"0.5296716",
"0.5286312",
"0.5281955",
"0.52810395",
"0.52708167",
"0.52627665",
"0.5256872",
"0.5253284"
] | 0.7063796 | 0 |
Check if a booking with that hash number exists | function wpbs_get_booking_by_hash($hash)
{
$bookings = wpbs_get_bookings(array('invoice_hash' => $hash));
if (empty($bookings)) {
return false;
}
$booking = array_shift($bookings);
return $booking;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function hashExists($hash);",
"function checkNextReserve($book_no)\n\t{\n\t\t$q = $this->db->query(\"SELECT book_no FROM reserves WHERE book_no LIKE '{$book_no}'\");\n\t\treturn $q->num_rows();\n\t}",
"private function isBooked() {\n // count all bookings from program\n $statement = 'SELECT COUNT(*) FROM booking WHERE program_id = :program_id AND user_id = :user_id;';\n try {\n $statement = $this->db->prepare($statement);\n $statement->execute(array(\n 'user_id' => $this->getUser($this->data['cnp']),\n 'program_id' => $this->data['program']\n ));\n $result = $statement->fetchColumn();\n if ($result) {\n exit('You are already booked');\n }\n } catch (\\PDOException $e) {\n exit($e->getMessage());\n }\n \n return FALSE;\n }",
"function barcodeNumberExists($number) {\n return ProductUnit::where('barcode',$number)->exists();\n }",
"public function hasBooking(): bool\n {\n return $this->bookings()->first() !== null;\n }",
"public function checkBookingDuplicity($data)\n {\n $booking = Booking::where('date', $data['date'])\n ->where('service_id', $data['service_id'])\n ->where('resource_id', $data['resource_id'])\n ->where('start_hour',$data['start_hour'])\n ->first();\n if (isset($booking)) {\n throw new Exception('Error. Duplicate booking');\n }\n }",
"function cp_CheckTransaction($hash)\n{\n $hash = mysql_real_escape_string($hash);\n $query = \"SELECT `id` from `op_transactions` WHERE `hash`='\" . $hash . \"'\";\n $data = simple_query($query);\n if (!empty($data)) {\n return false;\n }\n return true;\n}",
"public function isNotExists()\n {\n return $this->getCode() === '91' && $this->isHashMatch();\n }",
"function doesBookExist($bookName)\n{\n\tglobal $UTILS_TABLE_NAME;\n\n\t// Construct & execute MySQL query to detect duplicate.\n\t// Look in table $tableName for entries called $bookName.\n\t$sql = \"SELECT * FROM $UTILS_TABLE_NAME WHERE book_name = '$bookName'\";\n\t$queryResult = mysql_query($sql);\n\n\t// Return whether the results are nonempty.\n\treturn (mysql_num_rows($queryResult) > 0);\n}",
"function ticket_exists($ticket_id){\n\t\t$EM_Tickets = $this->get_tickets();\n\t\tforeach( $EM_Tickets->tickets as $EM_Ticket){\n\t\t\tif($EM_Ticket->ticket_id == $ticket_id){\n\t\t\t\treturn apply_filters('em_bookings_ticket_exists',true, $EM_Ticket, $this);\n\t\t\t}\n\t\t}\n\t\treturn apply_filters('em_bookings_ticket_exists',false, false,$this);\n\t}",
"function check_hash_key($hash_key)\n\t\t{\n\t\t\t$statement = $this->conn_id->prepare(\"select user_id,is_active from users where hash_key = :hash_key\");\n\t\t\t$statement->execute(array(':hash_key' => $hash_key));\n\t\t\t$row = $statement->fetch();\n\t\t\tif (isset($row['user_id']))\n\t\t\t{\n\t\t\t\tif ( $row['is_active'] == 1 )\n\t\t\t\t{\n\t\t\t\t\t// Already a verified user\n\t\t\t\t\treturn 1;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif ( $this->verify_success($row['user_id']) == TRUE )\n\t\t\t\t\t{\n\t\t\t\t\t\t// Now you are a verified user\n\t\t\t\t\t\treturn 1;\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// Still not verified\n\t\t\t\t\t\treturn 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Supplied hash key doesn't exist\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t}",
"function cpay_CheckTransaction($hash) {\r\n $hash = loginDB_real_escape_string($hash);\r\n $query = \"SELECT `id` from `op_transactions` WHERE `hash`='\" . $hash . \"'\";\r\n $data = simple_query($query);\r\n if (empty($data)) {\r\n return (true);\r\n } else {\r\n return (false);\r\n }\r\n}",
"public function hasGuid(){\n return $this->_has(1);\n }",
"function spectra_address_exists ($address)\n\t{\n\t\t$response = $GLOBALS[\"db\"][\"obj\"]->query (\"SELECT COUNT(*) AS `found` FROM `\".$GLOBALS[\"tables\"][\"ledger\"].\"` WHERE `address` = '\".$address.\"'\");\n\t\t$result = $response->fetch_assoc ();\n\t\t\n\t\tif (!isset ($result[\"found\"]) || $result[\"found\"] == 0)\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\t}",
"function reservationExistsAt($date, $table, $hour): int\r\n {\r\n $results = $this->readTable('t_reservation');\r\n foreach ($results as $result) {\r\n if (($result['resDate'] == $date) && ($result['resTable'] == $table) && ($result['resHour'] == $hour)) {\r\n return (int)$result['idReservation'];\r\n }\r\n }\r\n return -1;\r\n }",
"public function hasNextgoodsid(){\n return $this->_has(36);\n }",
"protected static function check_hash($hashNumber)\n\t{\n\t\t$check = 0;\n\t\t$flag = 0;\n\n\t\t$hashString = sprintf('%u', $hashNumber) ;\n\t\t$length = strlen($hashString);\n\n\t\tfor($i = $length - 1; $i >= 0; $i --)\n\t\t{\n\t\t\t$r = $hashString{$i};\n\n\t\t\tif(1 === ($flag % 2))\n\t\t\t{ \n\t\t\t\t$r += $r; \n\t\t\t\t$r = (int)($r / 10) + ($r % 10);\n\t\t\t}\n\n\t\t\t$check += $r;\n\t\t\t$flag ++; \n\t\t}\n\n\t\t$check %= 10;\n\n\t\tif(0 !== $check)\n\t\t{\n\t\t\t$check = 10 - $check;\n\n\t\t\tif(1 === ($flag % 2) )\n\t\t\t{\n\t\t\t\tif(1 === ($check % 2))\n\t\t\t\t{\n\t\t\t\t\t$check += 9;\n\t\t\t\t}\n\n\t\t\t\t$check >>= 1;\n\t\t\t}\n\t\t}\n\n\t\treturn '7'.$check.$hashString;\n\t}",
"function wisataone_X1_is_order_exist($id_booking) {\n global $wpdb, $wisataone_X1_tblname;\n $wp_track_table = $wpdb->prefix . $wisataone_X1_tblname;\n\n $res = $wpdb->get_results(\n \"\n SELECT *\n FROM {$wp_track_table}\n WHERE {$wp_track_table}.id_order = {$id_booking}\n LIMIT 1\n \"\n );\n\n if ($res) {\n return $res[0];\n }\n\n return null;\n}",
"private function isAvailable($program) {\n \n $user_id = $this->getUser($this->data['cnp']);\n \n $statement = 'SELECT program_id FROM booking WHERE user_id = ?;';\n try {\n $statement = $this->db->prepare($statement);\n $statement->execute(array($user_id));\n $results = $statement->fetchAll(\\PDO::FETCH_ASSOC);\n // check if other bookings have same date\n if (!empty($results)) {\n foreach ($results as $result) {\n if ($result['program_id'] == $program->id) {\n // if same program, do nothing\n continue;\n }\n if (!$this->programExists($result['program_id'])) {\n // check if program was deleted\n continue;\n }\n // load other programs\n $result = $this->getProgram($result['program_id']);\n // validate date\n if (!$this->checkDate($program->start_date, $program->end_date, $result->start_date, $result->end_date)) {\n exit('You are already booked for this period');\n }\n }\n return TRUE;\n }\n } catch (\\PDOException $e) {\n exit($e->getMessage());\n }\n return FALSE;\n }",
"public function check_for_existing_song($song_hash){\n\n $sql = $this->db->prepare(\"\n SELECT song_id FROM songs\n WHERE song_hash = :song_hash\n \");\n\n $sql->bindParam(':song_hash', $song_hash, PDO::PARAM_STR);\n $sql->execute();\n\n return $sql->fetch();\n }",
"function exists(){\n\t\t$sql = 'SELECT barcode FROM barcodes\n\t\t\t\tWHERE barcode = \"'.$this->code.'\"';\n\t\t$this->DB->query($sql);\n\t\tif(!$this->DB->isEmpty())\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->error = 'The barcode <strong>'.$this->code.'</strong> was not properly pre-registered. Please put this wristband aside, and distribute a new one.';\n\t\t\treturn false;\n\t\t}\n\t}",
"public function hallticketexist($smuid) {\n $is_exist = $this->commodel->isduplicate('student_transfer','st_hallticketno',$smuid);\n\t//print_r($is_exist);\n if ($is_exist)\n {\n\t\t$this->form_validation->set_message('hallticketexist','Hall Ticket Number' .\" \".$smuid. \" \".'is already exist check your hall ticket number again.');\n return false;\n }\n else {\n return true;\n }\n }",
"public function book_not_exists($title){\n $select_query = \"SELECT `id`, `title`, `description`, `department`, `faculty`, `author`, `publisher`, `date` FROM `books` WHERE `title`='$title'\";\n //check if book exists \n $run_select_query = $this->conn->query($select_query);\n if($run_select_query){\n //check if book already exists \n if(mysqli_num_rows($run_select_query) == 0){\n \n return true;\n }else{\n return false;\n }\n }\n }",
"function isBookExists($book, $connection) {\n $q = mysqli_query($connection, 'SELECT * \n FROM books\n WHERE book_title = \"' . $book . '\"'\n );\n\n if (!$q) {\n echo 'Възникна грешка!';\n echo mysqli_error($connection);\n exit;\n } else {\n if ($q->num_rows == 0) {\n return false;\n } else {\n return mysqli_fetch_assoc($q)['book_id'];\n }\n }\n}",
"function wpbs_get_booking($booking)\n{\n\n return wp_booking_system()->db['bookings']->get_object($booking);\n\n}",
"public function IsBookable()\n\t{\treturn $this->details['tqty'] > $this->details['tbooked'];\n\t}",
"function is_deal_booked_by_user($mobile,$deal_id){\n //check this deal is not booked by this user already\n $count = Db::rowCount(\"booked_deals\",array(\n \"mobile\" => $mobile,\n \"deal_id\" => $deal_id\n ),array(\"=\",\"=\"));\n return $count >= 1 ? true : false;\n}",
"function checkIfCodeExists() {\n $voucher = new Voucher();\n $voucher->where('code', $this->getCode());\n return $voucher->count() > 0;\n }",
"function checkBooklistID($booklist_id) {\n $query = 'select * from `'. $this->_table1 . '` where booklist_id = ' . $booklist_id . ';';\n\n if ($this->query($query)) return true;\n else return false;\n }",
"function CheckKey($hash,$name){\n\t\tglobal $secretKey; \n\t\t$checkHash = md5($name.$secretKey);\n\t\tif(strcmp($checkHash,$hash) == 0){\n\t\t\treturn 'pass'; //hash matches\n\t\t}else{\n\t\t\treturn 'fail'; //hash failed\n\t\t}\n\t}",
"public function check_existence($id)\n {\n $nr= DB::select(\"Select count(1) a from books where id = \".$id);\n\n if($nr[0]->a==1)\n $msg=\"The book exists\";\n else\n $msg=\"The book does not exist\";\n\n return response($msg,201) ;\n }",
"public function isIdNubmerExist($id_number)\r\n\t{\r\n\t\t$select=$this->select();\r\n\t\t$select->from($this,'id_number')\r\n\t\t\t->where(\"id_number=?\",$id_number);\r\n\t\t$row=$this->fetchRow($select);\r\n\t\tif(!$row) return false;\r\n\t\treturn true;\r\n\t}",
"function check_hash($n){\n\tif(!$n) return;\n\t$hashpos = strpos($n, \"#\");\n\n\tif($hashpos === false){\n\t\t$output = \"#\" . $n;\n\t}else if($hashpos == 0){\n\t\t$output = $n;\n\t}\n\treturn $output;\n}",
"public function hashExists($hash)\n\t{\n\t\treturn array_key_exists($hash, $this->hashTable);\n\t}",
"public function has(string $entryIdentifier): bool;",
"function cr_donate_GA_cancellation_url_is_valid($email, $gavinID, $hash) {\n $valid_hash = md5(\"gift_aid_sr14_dasp_{$gavinID}_{$email}\");\n return $hash === $valid_hash;\n}",
"private function checkIsExists(): bool\n {\n $where = [\n $this->table. '.vendorId' => $this->vendorId,\n $this->table. '.campaign' => $this->campaign,\n ];\n\n if (!is_null($this->id)) {\n $where[$this->table. '.id !='] = $this->id;\n }\n\n $id = $this->readImproved([\n 'what' => [$this->table. '.id'],\n 'where' => $where\n ]);\n\n return !is_null($id);\n }",
"function nvp_CheckTransaction($hash) {\r\n $hash= loginDB_real_escape_string($hash);\r\n $query=\"SELECT `id` from `op_transactions` WHERE `hash`='\".$hash.\"'\";\r\n $data= simple_query($query);\r\n if (!empty($data)) {\r\n return ($data['id']);\r\n } else {\r\n return (false);\r\n }\r\n}",
"static public function isValidApikeyHash($hash, $secureSalt)\n {\n global $vbulletin;\n $hash = rawurldecode($hash);\n \n // $randomSalt - random\n // $key = md5( md5($apikey.$secureSalt) . $randomSalt )\n // $hash = \"$key:$randomSalt\"\n \n if (!$hash OR !$secureSalt OR !$vbulletin->options['aitmagentovb_apikey']) return false;\n \n $hashArr = explode(':', $hash);\n if (count($hashArr) == 2)\n {\n $thisKey = $hashArr[0];\n $randomSalt = $hashArr[1];\n $apiKey = $vbulletin->options['aitmagentovb_apikey'];\n $realKey = md5( md5($apiKey . $secureSalt) . $randomSalt);\n if ($realKey == $thisKey)\n {\n $sql = '\n SELECT \n *,\n IF(`validthru` < NOW(), 1, 0) AS is_expired\n FROM `'.TABLE_PREFIX.'aitmagentovb_hash`\n WHERE `hash` = \"'.$hash.'\"\n '; \n // it's safe enough for non-escape usage of $hash here\n $hashRow = $vbulletin->db->query_first($sql);\n if ($hashRow AND $hashRow['hashid']) \n {\n $vbulletin->db->query_write('\n DELETE FROM `'.TABLE_PREFIX.'aitmagentovb_hash` \n WHERE `hashid`='.$hashRow['hashid']\n );\n \n if (!$hashRow['is_expired'] AND 'mage' == $hashRow['created_by'])\n {\n return true;\n }\n }\n }\n }\n \n return false;\n }",
"function Check()\n {\n $this->_RegenerateId();\n return (isset($_SESSION['ss_fprint1']) && $_SESSION['ss_fprint1'] == $this->_Fingerprint());\n }",
"function booking_on_hold($book_id)\r\n\t{\r\n\r\n\t}",
"public function check_exists(int $apartment_num)\n\t{\n\t\t$db = $this->db_connection->get_connection();\n\n\t\t$sql = 'SELECT num FROM apartments WHERE num = :num';\n\n\t\t$query = $db->prepare($sql);\n\n\t\t$query->bindValue(':num', $apartment_num, \\PDO::PARAM_INT);\n\n\t\tif ($query->execute()) {\n\t\t\treturn $query->fetch(\\PDO::FETCH_ASSOC);\n\t\t} else {\n\t\t\thttp_response_code(500);\n\t\t\t$this->validator->check_response('ajax');\n\t\t}\n\t}",
"function checkBookings() {\n\t\t// Load Transitions Pool\n\t\t$this->initTransitions();\n\t\t\n\t\t$sim = false;\n\t\twhile(!$sim) {\n\t\t\t$ts = clone $this->transitions;\n\t\t\t$ts->reverse();\n\t\t\t\n\t\t\t// New Simulation\n\t\t\t$rs = new ReservationSimulator();\n\t\t\twhile($_res = $ts->pop())\n\t\t\t\t$rs->addTransition($_res);\n\t\t\t$sim = $rs->simulate();\n\t\t\t\n\t\t\t// pop the last transition on failure recheck bookings\n\t\t\tif(!$sim) $this->dismissedTrans->push($this->transitions->pop());\n\t\t}\n\t\t\n\t\treturn $this->finish();\n\t\t\n\n\t\twhile($o = $this->dismissedTrans->pop())\n\t\t\t_debug($o->getId());\n\t\t\t\n\t}",
"public function checkHash($hash)\n\t{\n\t\treturn $this->hash && $this->hash == $hash;\n\t}",
"private function barcode_exists($barcode){\n $search = '{\"schemas\": [\"urn:ietf:params:scim:api:messages:2.0:SearchRequest\"], '.\n '\"filter\": \"External_ID eq \\\"'.$barcode.'\\\"\"}';\n $this->search_patron($search);\n return ($this->search[\"totalResults\"] == 0) ? FALSE : TRUE;\n }",
"public function hasShopid(){\n return $this->_has(11);\n }",
"public function valid_compte_hashValidation($hash){ \n\n\t\t$sql = \"UPDATE utilisateur SET ut_compte_valide = '1' WHERE ut_hash_validation = ?\";\n\t\t$res = $this->executerRequete($sql,array($hash));\n\t\t\treturn ($res->rowCount() == 1); // si 1 alors mise a jour ok\n\n\t\t}",
"public function hasId(){\n return $this->_has(17);\n }",
"function if_user_has_booking($user_id){\n global $db;\n $sql = \"SELECT * FROM booking WHERE user_id = '$user_id';\";\n $result = $db->query($sql);\n return $result;\n}",
"function IfExists($holidaycode) {\r\n $conn = conn();\r\n $sql = \"SELECT * FROM `specialdates` WHERE RateCode='$holidaycode'\";\r\n $stmt = $conn->prepare($sql);\r\n $stmt->execute();\r\n $result = $stmt->fetchAll();\r\n if (!empty($result)) {\r\n return 1;\r\n }\r\n return 0;\r\n $conn = NULL;\r\n }",
"public function hasBoothfee(){\n return $this->_has(6);\n }",
"public static function is_booking($id)\n {\n if ('booking' == BA_Lib::get_product_type($id)) {\n return true;\n }\n return false;\n }",
"function product_exists($pid){\n\t$cart = $_SESSION['custCart_ID']; // the SESSION and COOKIE customer cart items array\n\t$pid=intval($pid);\n\t$max=count($_SESSION[$cart]);\n\t$flag=0;\n\tfor($i=0;$i<$max;$i++){\n\t\tif($pid==$_SESSION[$cart][$i]['bookid']){\n\t\t\t$flag=1;\n\t\t\t// break;\n\t\t}\n\t}\n\treturn $flag;\n}",
"function letterExists($LetterNo, $year) {\n\t\t$t = LETTERS;\t\t\n\t\t$FQuery = \"select LetterID from $t where LetterNo='$LetterNo' and LYear = $year and LetterStatus <> 'DELETED'\";\n\t\t$rs=$this->adodb->Execute($FQuery);\n\t\treturn $rs->RecordCount();\n\t}",
"private function checkHash( $hash )\n {\n // The first 64 characters of the hash is the salt\n $salt = substr($hash, 0, 64);\n \n // create a new hash by append the password to the salt string\n $hashToCheck = $salt . $this->password;\n \n // Hash the password a bunch of times\n for ( $i = 0; $i < 100000; $i ++ ) {\n $hashToCheck = hash('sha256', $hashToCheck);\n }\n \n $hashToCheck = $salt . $hashToCheck;\n \n // check the local hash with the database hash\n if( $hash == $hashToCheck )\n return true;\n \n // return false if no match\n return false;\n }",
"private function validate_hashkey($hash_key, $api_key, $payment_id)\n {\n return md5($api_key . $payment_id) === $hash_key;\n }",
"public function hallticketnoexist($smuid) {\n $is_exist = $this->commodel->isduplicate('student_admission_cancel','sac_hallticketno',$smuid);\n\t//print_r($is_exist);\n if ($is_exist)\n {\n\t\t$this->form_validation->set_message('hallticketnoexist','This Hall Ticket Number' .\" \".$smuid. \" \".'Student Admission Is Cancelled.');\n return false;\n }\n else {\n return true;\n }\n }",
"function afaire_ticket_existe($bidon) {\n\t$existe = false;\n\t// Test si la table existe\n\t$table = sql_showtable('spip_afaire', true);\n\tif ($table) {\n\t\t// Nombre total de afaire\n\t\t$from = array('spip_afaire AS t1');\n\t\t$where = array();\n\t\t$result = sql_countsel($from, $where);\n\t\t// Nombre de afaire termines pour le jalon\n\t\tif ($result >= 1)\n\t\t\t$existe = true;\n\t}\n\treturn $existe;\n}",
"function check_link_hash($token, $link_name)\n{\n\treturn $token === generate_link_hash($link_name);\n}",
"private static function CheckHash($Hashnum)\n\t{\n\t\t$CheckByte = 0;\n\t\t$Flag = 0;\n\t\t$HashStr = sprintf('%u', $Hashnum);\n\t\t$length = strlen($HashStr);\n\t\tfor ($i = $length - 1; $i >= 0; $i --)\n\t\t{\n\t\t\t$Re = $HashStr{$i};\n\t\t\tif (1 === ($Flag % 2))\n\t\t\t{\n\t\t\t\t$Re += $Re;\n\t\t\t\t$Re = (int)($Re / 10) + ($Re % 10);\n\t\t\t}\n\t\t\t$CheckByte += $Re;\n\t\t\t$Flag ++;\n\t\t}\n\t\t$CheckByte %= 10;\n\t\tif (0 !== $CheckByte)\n\t\t{\n\t\t\t$CheckByte = 10 - $CheckByte;\n\t\t\tif (1 === ($Flag % 2) )\n\t\t\t{\n\t\t\t\tif (1 === ($CheckByte % 2))\n\t\t\t\t{\n\t\t\t\t\t$CheckByte += 9;\n\t\t\t\t}\n\t\t\t\t$CheckByte >>= 1;\n\t\t\t}\n\t\t}\n\t\treturn '7'.$CheckByte.$HashStr;\n\t}",
"private function checkIsExists(): bool\n {\n $id = $this->readImproved([\n 'what' => [$this->table. '.id'],\n 'where' => [\n $this->table. '.listId' => $this->listId,\n $this->table. '.campaignId' => $this->campaignId,\n ]\n ]);\n\n return !is_null($id);\n }",
"function insertNewBooking($bookingnum, $custid, $pkgId) {\n $query = \"INSERT INTO `bookings` (BookingDate, BookingNo, TravelerCount, CustomerId, PackageId) VALUES ('\".date(\"Y-m-d H:i:s\").\"', '$bookingnum', '1', '$custid', '$pkgId')\";\n $result = Database::insertQuery($query); \n if ($result) {\n return true;\n } else {\n return false;\n }\n }",
"public function checkHash(&$aResponse)\n {\n // checks hash2 and newly generated hash - returns false if both are differed\n if ($aResponse['hash2'] != $this->_generateHash($aResponse))\n return false;\n\n $this->_getDecodeData($aResponse, array( 'auth_code', 'product', 'tariff', 'amount', 'test_mode', 'uniqid' ));\n }",
"public function isHash($data)\r\n {\r\n $pattern = '%(?:\\b|:|\\s)([A-Za-z0-9\\\\\\\\.]{13}|[A-Fa-f0-9]{8}|[A-Fa-f0-9]{16}|[A-Fa-f0-9]{32}|[A-Fa-f0-9]{40}|[A-Fa-f0-9]{64}|[a-f0-9]{15}|[a-f0-9]{40}|\\$\\d\\$([^$]*\\$)?[/.A-Za-z0-9]{8,64})(?:\\b|:|\\s)%im';\r\n if (preg_match($pattern, $data, $matches)) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }",
"public function findAppointmentSlot($slotdetailid,$bookdate){\r\n $appointment = new UserAppoinment();\r\n $findSlotBook = $appointment->findSlotBooking($slotdetailid,$bookdate);\r\n return $findSlotBook;\r\n \r\n }",
"function textbook_exists($db, $id)\n{\n\t$sql = 'SELECT * FROM textbooks where id=:id';\n\t$st = $db->prepare($sql);\n\t$st->execute(array(':id'=>$id));\n\t$us = $st->fetchAll();\n\treturn (count($us) >=1);\n}",
"private function verifyByLuhnAlgorithm($number){ }",
"function validateGatePass($txtGatePass){\n\trequire 'connection.php';\n\n\t$sql = \"SELECT * FROM tbl_gatepass\";\n\t$validateGatePass = $conn->query($sql);\n\t$exist = false;\n\n\twhile($row = $validateGatePass->fetch_assoc()) {\n\t\tif ($row[\"gatepass\"] == $txtGatePass) {\n\t\t\techo \"<script type='text/javascript'>\n\t\t\talert('Data is already Exist!');\n\t\t\t</script>\";\n\n\t\t\t$exist=true;\n\t\t}\n\t}\n\t// ADD SUPPLIER NAME\n\tif (!$exist) {\n\t\taddGatepass($txtGatePass);\n\t}\n}",
"function isPhoneExists($cellphone)\n {\n \n $query=$this->db->query(\"SELECT * FROM xl_account WHERE cellphone='{$cellphone}' AND register_user=1\");\n\n if ($query->num_rows()>0) {\n #if exist return true\n return TRUE;\n }\n\n return FALSE; \n }",
"public function verifyUserbyHash($hash){\r\n $this->db->query('SELECT * FROM users WHERE reset=:hash');\r\n $this->db->bind(':hash', $hash);\r\n\r\n if($row = $this->db->fetcher()){\r\n if($row['active'] == 1){\r\n return true;\r\n }else{\r\n return false;\r\n }\r\n }\r\n else\r\n return false;\r\n}",
"function has_booking( $user_id = false ){\n\t\tif( $user_id === false ){\n\t\t\t$user_id = get_current_user_id();\n\t\t}\n\t\tif( is_numeric($user_id) && $user_id > 0 ){\n\t\t\tforeach ($this->load() as $EM_Booking){\n\t\t\t\tif( $EM_Booking->person->ID == $user_id && !in_array($EM_Booking->booking_status, array(2,3)) ){\n\t\t\t\t\treturn apply_filters('em_bookings_has_booking', $EM_Booking, $this);\n\t\t\t\t}\n\t\t\t}\t\n\t\t}\n\t\treturn apply_filters('em_bookings_has_booking', false, $this);\n\t}",
"public static function exists($adinumber=\"\") {\n global $database;\n \n $sql = \"SELECT * FROM \".static::$table_name.\" \";\n $sql .= \"WHERE adinumber = '{$adinumber}' \";\n $sql .= \"LIMIT 1\";\n $result_array = self::find_by_sql($sql);\n return !empty($result_array) ? true : false;\n }",
"function verify_user($conn, $id, $hash){\n\t$sql = \"SELECT id from Session\n\tWHERE id=$id and hash='$hash'\";\n\n\t$result = $conn->query($sql);\n\n\treturn ($result->num_rows > 0);\n}",
"public function hasCardNumber() : bool;",
"function check_book_available($hour, $begin, $end, $check){\n if($check == \"begin_check\"){\n if( $hour < $begin || $hour >= $end ){\n return true;\n }\n else{\n return false;\n }\n }\n /* CHECK END SELECTION */\n else if($check == \"end_check\"){\n if( $hour <= $begin || $hour > $end ){\n return true;\n }\n else{\n return false;\n }\n }\n}",
"public static function isExist($token)\n {\n return self::find()->andWhere(['token_hash' => md5($token)])->exists();\n }",
"public function getUserByHash($hash=''){\n\n if($hash!='')\n {\n \n //consulta validade do link HASH\n $sql = new Sql();\n $res = $sql->select('SELECT * FROM pwd_recovery WHERE \n hash_recovery = :hash_recovery AND\n DATE_ADD(dt_register, INTERVAL 1 HOUR) >= NOW() LIMIT 0,1',\n array(':hash_recovery'=>$hash));\n \n \n //caso nada encontrado então ou o HASH é inválido ou o tempo limite expirou\n if(count($res)==0){\n //sinaliza como não alterado pois o hash é invalido\n $_result = 0;\n }\n else\n {\n //recebe ID USUARIO que sera necessario para o update da senha \n $recoveryData = $res[0];\n $_result = $recoveryData['id_usuario']; \n } \n return $_result;\n \n }\n else\n {\n return false;\n }\n\n }",
"function isReceiptExist()\n\t{\n\t\tglobal $db;\n\n\t\t$query = 'SELECT receipt_id FROM '.receipt_table.' WHERE receipt_id = '.$this->receipt_id;\n\t\t$db->query($query);\n\t\t$result = $db->query($query);\n\n\t\tif(!$result)\n\t\t{\n\t\t\t$err_info = $db->errorInfo();\n\t\t\techo $err_info[2];\n\t\t\terror_log('Function : isReceiptExist, Class : receipt, '.$err_info[2]);\n\t\t\texit;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$arr = $result->fetch(PDO::FETCH_ASSOC);\n\t\t\t$receipt_id = $arr['receipt_id'];\n\t\t}\n\t\treturn $receipt_id;\n\t}",
"function hasDuplicate($g,$r,$p){\n\t//create query\n\t$query = \"SELECT `b_id` FROM `bet` WHERE `g_id`=$g AND `b_round`=$r AND `p_id`=$p\";\n\t$result = @mysql_query($query);\n\tif(mysql_error()) handleError(\"query 0\");\n\t\n\tif(mysql_num_rows($result) > 0){\n\t\treturn true;\n\t}else{\n\t\treturn false;\n\t}\n}",
"public function checkIfOrderExist($orderId);",
"private function hasSeats($program) {\n // count all bookings from program\n $statement = 'SELECT COUNT(*) FROM booking WHERE program_id = ?;';\n try {\n $statement = $this->db->prepare($statement);\n $statement->execute(array($program->id));\n $result = $statement->fetchColumn();\n if ($result >= $program->max_user) {\n exit('Program is fully booked');\n }\n } catch (\\PDOException $e) {\n exit($e->getMessage());\n }\n \n return TRUE;\n }",
"function verify_hash($hash) // Colorize: green\n { // Colorize: green\n return isset($hash) // Colorize: green\n && // Colorize: green\n is_string($hash) // Colorize: green\n && // Colorize: green\n preg_match(MD5_HASH_REGEXP, $hash); // Colorize: green\n }",
"function check_hash($userid,$hash,$code,$pretest)\n {\n $this->stmt = $this->db->count('activation');\n // set where values\n $this->stmt->where('userid','i',$userid);\n\t\t$this->stmt->where('hash','i',$hash);\n\t\tif((int)$pretest > 0){\n\t\t\t$this->stmt->where('code','i',$code);\n\t\t}\n\t\treturn parent::get();\n }",
"public function hasLotserials() {\n\t\t$q = SalesHistoryLotserialQuery::create();\n\t\t$q->filterByOrdernumber($this->oehhnbr);\n\t\treturn boolval($q->count());\n\t}",
"public function checkIfExists(){\n $query = \"SELECT EXISTS(SELECT * FROM `Locations` \n WHERE `AccStrAdd` = :stradd AND `AccZip` = :zip AND `AccAptNum` = :aptnum)\";\n try {\n $stmt = $this->dbh->prepare($query);\n $stmt->bindParam(\":stradd\", $this->accStrAdd);\n $stmt->bindParam(\":zip\", $this->accZip);\n $stmt->bindParam(\":aptnum\",$this->accAptNum);\n $stmt->execute();\n } catch (Exception $e){\n error_log(\"Error: \" . $e->getMessage());\n }\n\n $row = $stmt->fetch(PDO::FETCH_NUM);\n\n if($row[0] == \"1\"){\n return true;\n } else {\n return false;\n }\n }",
"protected function _exists($key,$typ,$uname){\r\n if($this->bag[0]->count($this->bag[1],array('key'=>$key,'type'=>$typ,'uname'=>$uname))!=1) return FALSE;\r\n return $this->bag[0]->load_field($this->bag[1],'id',array('key'=>$key,'type'=>$typ,'uname'=>$uname));\r\n }",
"function hash_check($value, $name = 'user') {\n return self::data_get($name) === $value;\n }",
"public function checkContentHash() {}",
"function delete(){\r\n\t\tglobal $wpdb;\r\n\t\t$sql = $wpdb->prepare(\"DELETE FROM \". $wpdb->prefix.EM_BOOKINGS_TABLE . \" WHERE booking_id=%d\", $this->id);\r\n\t\treturn ( $wpdb->query( $sql ) !== false );\r\n\t}",
"private function event_exists($slug) {\n return (isset($this->events[$slug]));\n }",
"private function checkEventNotBookedByCreator(){\n $event = Event::find($this->id);\n\n return($event->host != Auth::id());\n }",
"public function hasId(){\r\n return $this->_has(5);\r\n }",
"protected function isHash($hash): bool\n {\n return $this->redis->exists($this->generateHashKey($hash));\n }",
"function check_borrower_status($obj, $borrower){\n\t$result = $obj->db->query($obj->Query_reader->get_query_by_code('check_borrower', array('borrower' => $borrower)));\n\tif($result->num_rows() > 0)\n\t\treturn $result->num_rows();\n\telse\n\t\treturn 0;\n}",
"private function beenSent($hash, $time)\n {\n foreach($this->errors as $key => $val)\n {\n if($key == $hash && $val + $time > time())\n return TRUE;\n }\n return FALSE;\n }",
"public function hasNum(){\n return $this->_has(17);\n }",
"public function eventExists(Event $event){\r\n //echo $event->getType();\r\n $stmt = $this->db->prepare(\"SELECT COUNT(*) as count FROM event WHERE type = ? AND name = ? AND date = ? AND observations = ? AND guests = ?\");\r\n $stmt->execute(array($event->getType(), $event->getName(), $event->getDate(), $event->getObservations(), $event->getGuests()));\r\n $data = $stmt->fetch(PDO::FETCH_ASSOC);\r\n\r\n if($data['count'] == 0){\r\n $exists = false;\r\n }else{\r\n $exists = true;\r\n }\r\n return $exists;\r\n }",
"static function makeConfirmationHash () {\n while (true) {\n $hash = Common::randHash();\n $result = Database::queryAsObject(\"select hash from t_confirm where hash = '$hash'\");\n if ($result == null)\n return $hash;\n }\n }",
"function exists($key, $key2 = null)\n {\n $this->rest->initialize(array('server' => REST_SERVER));\n $this->rest->option(CURLOPT_PORT, REST_PORT);\n $result = $this->rest->get('recipe/maintenance/item/id/' . $key . '-' . $key2);\n return ! empty($result);\n }",
"function CheckCartridgeExists($band){\r\n\r\n $q = \"SELECT ComponentTypes.Description, FE_Components.keyId\r\n FROM ComponentTypes, FE_Components, FE_ConfigLink\r\n WHERE FE_Components.Band = $band\r\n AND FE_ConfigLink.fkFE_Components = FE_Components.keyId\r\n AND FE_ConfigLink.fkFE_Config = $this->FEConfiguration\r\n AND FE_Components.fkFE_ComponentType = ComponentTypes.keyId\r\n AND (FE_Components.fkFE_ComponentType = 20\r\n OR FE_Components.fkFE_ComponentType = 133\r\n OR FE_Components.fkFE_ComponentType = 11\r\n OR FE_Components.fkFE_ComponentType = 134\r\n OR FE_Components.fkFE_ComponentType = 16)\r\n GROUP BY FE_Components.keyId;\";\r\n\r\n $r = @mysql_query($q,$this->dbconnection);\r\n $numrows = @mysql_num_rows($r);\r\n if ($numrows > 0){\r\n return 1;\r\n }\r\n if ($numrows == 0){\r\n return 0;\r\n }\r\n }"
] | [
"0.65199524",
"0.62317127",
"0.60568327",
"0.5945336",
"0.5848142",
"0.5742169",
"0.5720801",
"0.5694954",
"0.56876147",
"0.56856644",
"0.5681887",
"0.560934",
"0.55948025",
"0.5587978",
"0.5565473",
"0.55646443",
"0.5513759",
"0.55018055",
"0.54998964",
"0.5484474",
"0.5480349",
"0.5458789",
"0.54582375",
"0.54410964",
"0.54191875",
"0.54045075",
"0.54036283",
"0.5371456",
"0.5368023",
"0.53651446",
"0.5351189",
"0.53234375",
"0.5318326",
"0.5300693",
"0.53002447",
"0.52878225",
"0.52788764",
"0.52768254",
"0.5264429",
"0.5254838",
"0.5248655",
"0.52485037",
"0.5236925",
"0.5230092",
"0.52070683",
"0.519544",
"0.51938736",
"0.5176159",
"0.51630855",
"0.51595944",
"0.5152605",
"0.5128772",
"0.51262534",
"0.5115945",
"0.51109856",
"0.5107248",
"0.51032025",
"0.50988185",
"0.5095733",
"0.50907916",
"0.50812334",
"0.50572455",
"0.505277",
"0.50498724",
"0.50465",
"0.504372",
"0.5042825",
"0.5041259",
"0.5039247",
"0.5032281",
"0.5030627",
"0.5028779",
"0.5026755",
"0.5015999",
"0.50113547",
"0.50027186",
"0.500036",
"0.49887043",
"0.49780923",
"0.4972933",
"0.4969342",
"0.49655738",
"0.4962443",
"0.49435312",
"0.49391162",
"0.49322435",
"0.49300423",
"0.4929498",
"0.49288917",
"0.49251994",
"0.49230212",
"0.4914142",
"0.49129736",
"0.4911294",
"0.4909069",
"0.49077564",
"0.4904113",
"0.49017993",
"0.48980558",
"0.4891232"
] | 0.6886352 | 0 |
Display a listing of the resource. | public function index()
{
if(Input::has('o')){
$order = Input::get('o');
switch ($order) {
case 'v':
$orderBy = "fake_views";
$sortName = "Most Viewed";
break;
case 'r':
$orderBy = "rating";
$sortName = "Top Rated";
break;
case 'f':
$orderBy = "favorites";
$sortName = "Most Popular";
break;
default:
$orderBy = "publish_date";
$sortName = "Newest";
break;
}
} else {
$order = "";
$orderBy = "publish_date";
$sortName = "Newest";
}
$network = $this->network;
$theme = $network->theme;
$theme = check_for_tour_theme($theme);
Theme::setActive($theme);
$data = $this->data;
$data['page_title'] = $network->name;
$data['sliders'] = Content::ofNetwork($this->network->id)->published()->featured(1)->take(config('yppmembers.homepage_sliders'))->orderBy(\DB::raw("RAND()"))->get();
$data['contents'] = Content::ofNetwork($this->network->id)->published()->featured(0)->take(config('yppmembers.homepage_contents'))->orderBy($orderBy,'desc')->paginate( config('yppmembers.per_page') );
$data['mostviews'] = Content::ofNetwork($this->network->id)->published()->featured(0)->take(config('yppmembers.homepage_mostviews'))->orderBy('views','desc')->get();
$data['toprateds'] = Content::ofNetwork($this->network->id)->published()->featured(0)->take(config('yppmembers.homepage_toprateds'))->orderBy('rating','desc')->get();
$data['most_used_tags'] = Tag::ofNetwork($this->network->id)->mostUsedInNetwork($this->network->id)->take(config('yppmembers.homepage_most_used_tags'))->get();
$data['dvds'] = Dvd::ofNetwork($this->network->id)->take(config('yppmembers.homepage_dvds'))->orderBy('publish_date','desc')->get();
$tags = Tag::ofNetwork($network->id)->mostUsedInNetwork($network->id)->paginate( config('yppmembers.per_page') );
$ids = array(0);
foreach($tags as $tag)
{
$tag_data = $tag->getTopThumb($ids, $this->network->id);
$tag->top_thumb = $tag_data['thumb'];
$ids[] = $tag_data['id'];
}
$data['tags'] = $tags;
$data['sortname'] = $sortName;
return Theme::view('video.index',$data);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }",
"public function listing();",
"function index() {\n\t\t$this->show_list();\n\t}",
"public function actionList() {\n $this->_getList();\n }",
"public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }",
"public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }",
"public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }",
"function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}",
"public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }",
"public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }",
"public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}",
"function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}",
"public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }",
"public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}",
"public function actionRestList() {\n\t $this->doRestList();\n\t}",
"public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}",
"public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }",
"public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }",
"public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}",
"public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}",
"public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }",
"public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }",
"public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }",
"public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }",
"public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}",
"public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }",
"public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}",
"public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }",
"public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}",
"public function index()\n {\n $this->list_view();\n }",
"public function index()\n {\n $this->list_view();\n }",
"public function index()\n {\n $this->list_view();\n }",
"public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }",
"public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }",
"public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}",
"public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }",
"public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }",
"public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }",
"public function index()\n {\n return Resources::collection(Checking::paginate());\n }",
"public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }",
"public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }",
"public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }",
"public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }",
"public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }",
"public function view(){\n\t\t$this->buildListing();\n\t}",
"public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }",
"public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }",
"public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }",
"public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }",
"public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }",
"public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }",
"public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }",
"public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }",
"public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }",
"public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}",
"public function listAction() {}",
"public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }",
"public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }",
"public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }",
"public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }",
"public function executeList()\n {\n $this->setTemplate('list');\n }",
"public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }",
"function listing() {\r\n\r\n }",
"public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }",
"public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }",
"public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}",
"public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }",
"public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }",
"public function _index(){\n\t $this->_list();\n\t}",
"public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}",
"function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}",
"public function index()\n {\n $this->booklist();\n }",
"public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }",
"public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }",
"public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }",
"public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }",
"public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }",
"public function indexAction() {\n $this->_forward('list');\n }",
"public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }",
"public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }",
"public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}",
"public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }",
"public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }",
"public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }",
"public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }",
"public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }",
"public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }",
"public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}",
"public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }",
"public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }",
"public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }",
"public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}",
"public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }",
"public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }",
"public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }",
"public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }",
"public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }",
"public function index()\n {\n return view('admin.resources.index');\n }",
"public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}"
] | [
"0.7446777",
"0.736227",
"0.73005503",
"0.72478926",
"0.71631265",
"0.71489686",
"0.7131636",
"0.7105969",
"0.71029514",
"0.7101372",
"0.70508176",
"0.6995128",
"0.69890636",
"0.6934895",
"0.6900203",
"0.6899281",
"0.6891734",
"0.6887235",
"0.68670005",
"0.6849741",
"0.6830523",
"0.6802689",
"0.6797",
"0.67957735",
"0.67871135",
"0.6760129",
"0.67427456",
"0.6730486",
"0.67272323",
"0.67255723",
"0.67255723",
"0.67255723",
"0.67177945",
"0.6707866",
"0.6706713",
"0.6704375",
"0.6664782",
"0.6662871",
"0.6660302",
"0.6659404",
"0.6656656",
"0.6653517",
"0.6647965",
"0.6620322",
"0.66185474",
"0.6618499",
"0.6606105",
"0.6600617",
"0.65996987",
"0.6594775",
"0.6587389",
"0.6585109",
"0.6581641",
"0.6581017",
"0.6577157",
"0.65747666",
"0.6572513",
"0.65721947",
"0.6570553",
"0.65646994",
"0.6563556",
"0.6554194",
"0.65529937",
"0.65460825",
"0.65368485",
"0.653429",
"0.65328294",
"0.6526759",
"0.6526695",
"0.6526284",
"0.65191334",
"0.65183175",
"0.65174305",
"0.651703",
"0.65141153",
"0.6507088",
"0.65061647",
"0.6504046",
"0.64942145",
"0.6491893",
"0.64883405",
"0.6486392",
"0.6485077",
"0.64846045",
"0.6478858",
"0.64756656",
"0.64726377",
"0.6471126",
"0.64701074",
"0.6467418",
"0.6462195",
"0.64618355",
"0.6459199",
"0.6457831",
"0.6454631",
"0.64533997",
"0.6451915",
"0.6450861",
"0.6449301",
"0.64492667",
"0.64469045"
] | 0.0 | -1 |
Show the form for creating a new resource. | public function create()
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return view('admin.resources.create');\n }",
"public function create(){\n\n return view('resource.create');\n }",
"public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}",
"public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }",
"public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }",
"public function create()\n {\n return view ('forms.create');\n }",
"public function create ()\n {\n return view('forms.create');\n }",
"public function create()\n\t{\n\t\treturn view('faith.form');\n\t}",
"public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }",
"public function create()\n {\n return view(\"request_form.form\");\n }",
"public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }",
"public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle école'\n\t\t) ) );\n\t}",
"public function create()\n {\n return view($this->forms . '.create');\n }",
"public function create()\n {\n return view('restful.add');\n }",
"public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }",
"public function create()\n {\n return view('admin.createform');\n }",
"public function create()\n {\n return view('admin.forms.create');\n }",
"public function create()\n {\n return view('backend.student.form');\n }",
"public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }",
"public function create()\n {\n return view('client.form');\n }",
"public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }",
"public function create()\n {\n return view('Form');\n }",
"public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }",
"public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}",
"public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }",
"public function create()\n {\n return view('backend.schoolboard.addform');\n }",
"public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}",
"public function create()\n {\n //\n return view('form');\n }",
"public function create()\n {\n return view('rests.create');\n }",
"public function create()\n {\n return $this->showForm();\n }",
"public function create()\n {\n return $this->showForm();\n }",
"public function create()\n {\n return view(\"Add\");\n }",
"public function create(){\n return view('form.create');\n }",
"public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }",
"public function create()\n {\n\n return view('control panel.student.add');\n\n }",
"public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}",
"public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }",
"public function create()\n {\n return $this->cView(\"form\");\n }",
"public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }",
"public function create()\n {\n return view(\"dresses.form\");\n }",
"public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}",
"public function createAction()\n {\n// $this->view->form = $form;\n }",
"public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }",
"public function create()\n {\n return view('fish.form');\n }",
"public function create()\n {\n return view('users.forms.create');\n }",
"public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }",
"public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}",
"public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }",
"public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }",
"public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }",
"public function create()\n {\n return view('essentials::create');\n }",
"public function create()\n {\n return view('student.add');\n }",
"public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}",
"public function create()\n {\n return view('url.form');\n }",
"public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }",
"public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}",
"public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }",
"public function create()\n {\n return view('libro.create');\n }",
"public function create()\n {\n return view('libro.create');\n }",
"public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n return view('crud/add'); }",
"public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}",
"public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n return view(\"List.form\");\n }",
"public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}",
"public function create()\n {\n //load create form\n return view('products.create');\n }",
"public function create()\n {\n return view('article.addform');\n }",
"public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }",
"public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}",
"public function create()\n {\n return view('saldo.form');\n }",
"public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}",
"public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }",
"public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }",
"public function create()\n {\n return view('admin.inverty.add');\n }",
"public function create()\n {\n return view('Libro.create');\n }",
"public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }",
"public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }",
"public function create()\n {\n return view(\"familiasPrograma.create\");\n }",
"public function create()\n {\n return view('admin.car.create');\n }",
"public function create()\n {\n return view('admin.car.create');\n }",
"public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}",
"public function create()\n {\n return view(\"create\");\n }",
"public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}",
"public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }",
"public function create()\n {\n return view('forming');\n }",
"public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }",
"public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }",
"public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }",
"public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }",
"public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }",
"public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}",
"public function create()\n {\n return view('student::students.student.create');\n }",
"public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}"
] | [
"0.75948673",
"0.75948673",
"0.75863165",
"0.7577412",
"0.75727344",
"0.7500887",
"0.7434847",
"0.7433956",
"0.73892003",
"0.73531085",
"0.73364776",
"0.73125",
"0.7296102",
"0.7281891",
"0.72741455",
"0.72424185",
"0.7229325",
"0.7226713",
"0.7187349",
"0.7179176",
"0.7174283",
"0.7150356",
"0.71444064",
"0.71442676",
"0.713498",
"0.71283126",
"0.7123691",
"0.71158516",
"0.71158516",
"0.71158516",
"0.7112176",
"0.7094388",
"0.7085711",
"0.708025",
"0.70800644",
"0.70571953",
"0.70571953",
"0.70556754",
"0.70396435",
"0.7039549",
"0.7036275",
"0.703468",
"0.70305896",
"0.7027638",
"0.70265305",
"0.70199823",
"0.7018007",
"0.7004984",
"0.7003889",
"0.7000935",
"0.69973785",
"0.6994679",
"0.6993764",
"0.6989918",
"0.6986989",
"0.6966502",
"0.69656384",
"0.69564354",
"0.69518244",
"0.6951109",
"0.6947306",
"0.69444615",
"0.69423944",
"0.6941156",
"0.6937871",
"0.6937871",
"0.6936686",
"0.69345254",
"0.69318026",
"0.692827",
"0.69263744",
"0.69242257",
"0.6918349",
"0.6915889",
"0.6912884",
"0.691146",
"0.69103104",
"0.69085974",
"0.69040126",
"0.69014287",
"0.69012105",
"0.6900397",
"0.68951064",
"0.6893521",
"0.68932164",
"0.6891899",
"0.6891616",
"0.6891616",
"0.6889246",
"0.68880934",
"0.6887128",
"0.6884732",
"0.68822503",
"0.68809193",
"0.6875949",
"0.68739206",
"0.68739134",
"0.6870358",
"0.6869779",
"0.68696856",
"0.686877"
] | 0.0 | -1 |
Store a newly created resource in storage. | public function store(Request $request)
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function store($data, Resource $resource);",
"public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }",
"public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }",
"public function createStorage();",
"public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }",
"public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }",
"public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }",
"function storeAndNew() {\n $this->store();\n }",
"public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }",
"public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }",
"public function store()\n\t{\n\t\t\n\t\t//\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}"
] | [
"0.72865677",
"0.7145327",
"0.71325725",
"0.6640912",
"0.66209733",
"0.65685713",
"0.652643",
"0.65095705",
"0.64490104",
"0.637569",
"0.63736665",
"0.63657933",
"0.63657933",
"0.63657933",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437"
] | 0.0 | -1 |
Display the specified resource. | public function show($id)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function show(Resource $resource)\n {\n // not available for now\n }",
"public function show(Resource $resource)\n {\n //\n }",
"function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }",
"private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }",
"function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}",
"public function show(ResourceSubject $resourceSubject)\n {\n //\n }",
"public function show(ResourceManagement $resourcesManagement)\n {\n //\n }",
"public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function retrieve(Resource $resource);",
"public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }",
"public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function show(Dispenser $dispenser)\n {\n //\n }",
"public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }",
"public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}",
"public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }",
"public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }",
"function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}",
"public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }",
"public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }",
"public function get(Resource $resource);",
"public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }",
"public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }",
"function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}",
"public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }",
"function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}",
"public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function show(rc $rc)\n {\n //\n }",
"public function show(Resolucion $resolucion)\n {\n //\n }",
"public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show(Resena $resena)\n {\n }",
"public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }",
"public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }",
"public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}",
"public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }",
"public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }",
"public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }",
"public function display()\n\t{\n\t\tparent::display();\n\t}",
"public function get_resource();",
"public function show()\n\t{\n\t\t\n\t}",
"function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}",
"public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }",
"public function display($title = null)\n {\n echo $this->fetch($title);\n }",
"public function display(){}",
"public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}",
"public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}",
"public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }",
"#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}",
"public function display() {\n echo $this->render();\n }",
"public function show($id)\n\t{\n\t//\n\t}",
"public function show($id)\n\t{\n\t//\n\t}",
"function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }",
"public function show($id)\n {\n //\n $this->_show($id);\n }",
"public function show()\n\t{\n\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {}",
"static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}",
"public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}",
"public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }",
"public abstract function display();",
"abstract public function resource($resource);",
"public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}",
"public function show( $id ) {\n\t\t//\n\t}",
"public function show( $id ) {\n\t\t//\n\t}",
"public function show(Response $response)\n {\n //\n }",
"public function show()\n {\n return auth()->user()->getResource();\n }",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}"
] | [
"0.8233718",
"0.8190437",
"0.6828712",
"0.64986944",
"0.6495974",
"0.6469629",
"0.6462615",
"0.6363665",
"0.6311607",
"0.62817234",
"0.6218966",
"0.6189695",
"0.61804265",
"0.6171014",
"0.61371076",
"0.61207956",
"0.61067593",
"0.6105954",
"0.6094066",
"0.6082806",
"0.6045245",
"0.60389996",
"0.6016584",
"0.598783",
"0.5961788",
"0.59606946",
"0.5954321",
"0.59295714",
"0.59182066",
"0.5904556",
"0.59036547",
"0.59036547",
"0.59036547",
"0.5891874",
"0.58688277",
"0.5868107",
"0.58676815",
"0.5851883",
"0.58144855",
"0.58124036",
"0.58112013",
"0.5803467",
"0.58012545",
"0.5791527",
"0.57901084",
"0.5781528",
"0.5779676",
"0.5757105",
"0.5756208",
"0.57561266",
"0.57453394",
"0.57435393",
"0.57422745",
"0.5736634",
"0.5736634",
"0.5730559",
"0.57259274",
"0.5724891",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5718969",
"0.5713412",
"0.57091093",
"0.5706405",
"0.57057405",
"0.5704541",
"0.5704152",
"0.57026845",
"0.57026845",
"0.56981397",
"0.5693083",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962"
] | 0.0 | -1 |
Show the form for editing the specified resource. | public function edit($id)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }",
"public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }",
"public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }",
"public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function edit()\n {\n return view('hirmvc::edit');\n }",
"public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}",
"public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }",
"public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}",
"public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }",
"public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }",
"private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }",
"public function edit($id)\n {\n return $this->showForm('update', $id);\n }",
"public function edit($id)\n {\n return $this->showForm('update', $id);\n }",
"public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }",
"public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }",
"public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}",
"public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }",
"public function edit($model, $form);",
"function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}",
"public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}",
"public function edit()\n { \n return view('admin.control.edit');\n }",
"public function edit(Form $form)\n {\n //\n }",
"public function edit()\n {\n return view('common::edit');\n }",
"public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }",
"public function edit()\n {\n return view('admin::edit');\n }",
"public function edit()\n {\n return view('admin::edit');\n }",
"public function edit()\r\n {\r\n return view('petro::edit');\r\n }",
"public function edit($id)\n {\n // show form edit user info\n }",
"public function edit()\n {\n return view('escrow::edit');\n }",
"public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }",
"public function edit()\n {\n return view('commonmodule::edit');\n }",
"public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}",
"public function edit()\n {\n return view('catalog::edit');\n }",
"public function edit()\n {\n return view('catalog::edit');\n }",
"public function edit(form $form)\n {\n //\n }",
"public function actionEdit($id) { }",
"public function edit()\n {\n return view('admincp::edit');\n }",
"public function edit()\n {\n return view('scaffold::edit');\n }",
"public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }",
"public function edit()\n {\n return view('Person.edit');\n }",
"public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }",
"public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}",
"public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }",
"public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}",
"public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }",
"public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }",
"public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }",
"function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}",
"public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }",
"public function edit($id)\n {\n return $this->showForm($id);\n }",
"public function edit($id)\n {\n return $this->showForm($id);\n }",
"protected function _edit(){\n\t\treturn $this->_editForm();\n\t}",
"public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }",
"public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }",
"public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}",
"public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}",
"public function edit($id)\n {\n return view('models::edit');\n }",
"public function edit()\n {\n return view('home::edit');\n }",
"public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }",
"public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }",
"public function edit()\n {\n return view('user::edit');\n }",
"public function edit()\n {\n return view('user::edit');\n }",
"public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }",
"public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }",
"public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit($id)\n {\n return view('consultas::edit');\n }",
"public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }",
"public function edit()\n {\n return view('dashboard::edit');\n }",
"public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }",
"public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }",
"public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }",
"public function edit() {\n return view('routes::edit');\n }",
"public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }",
"public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }",
"public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit($id)\n {\n return view('cataloguemodule::edit');\n }",
"public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }",
"public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }",
"public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }",
"public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }",
"public function edit()\n {\n return view('website::edit');\n }",
"public function edit()\n {\n return view('inventory::edit');\n }",
"public function edit()\n {\n return view('initializer::edit');\n }",
"public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }",
"public function edit($id)\n {\n return view('backend::edit');\n }",
"public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }",
"public function edit($id)\n {\n return view('crm::edit');\n }",
"public function edit($id)\n {\n return view('crm::edit');\n }",
"public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }",
"public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}",
"public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }",
"public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}",
"public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }",
"public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }",
"public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }",
"public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }",
"public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }",
"public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}"
] | [
"0.78550774",
"0.7692893",
"0.7273195",
"0.7242132",
"0.7170847",
"0.70622855",
"0.7053459",
"0.6982539",
"0.69467914",
"0.6945275",
"0.6941114",
"0.6928077",
"0.69019294",
"0.68976134",
"0.68976134",
"0.6877213",
"0.68636996",
"0.68592185",
"0.68566656",
"0.6844697",
"0.68336326",
"0.6811471",
"0.68060875",
"0.68047357",
"0.68018645",
"0.6795623",
"0.6791791",
"0.6791791",
"0.6787701",
"0.67837197",
"0.67791027",
"0.677645",
"0.6768301",
"0.6760122",
"0.67458534",
"0.67458534",
"0.67443407",
"0.67425704",
"0.6739898",
"0.6735328",
"0.6725465",
"0.6712817",
"0.6693891",
"0.6692419",
"0.6688581",
"0.66879624",
"0.6687282",
"0.6684741",
"0.6682786",
"0.6668777",
"0.6668427",
"0.6665287",
"0.6665287",
"0.66610634",
"0.6660843",
"0.66589665",
"0.66567147",
"0.66545695",
"0.66527975",
"0.6642529",
"0.6633056",
"0.6630304",
"0.6627662",
"0.6627662",
"0.66192114",
"0.6619003",
"0.66153085",
"0.6614968",
"0.6609744",
"0.66086483",
"0.66060555",
"0.6596137",
"0.65950733",
"0.6594648",
"0.65902114",
"0.6589043",
"0.6587102",
"0.65799844",
"0.65799403",
"0.65799177",
"0.657708",
"0.65760696",
"0.65739626",
"0.656931",
"0.6567826",
"0.65663105",
"0.65660435",
"0.65615267",
"0.6561447",
"0.6561447",
"0.65576506",
"0.655686",
"0.6556527",
"0.6555543",
"0.6555445",
"0.65552044",
"0.65543956",
"0.65543705",
"0.6548264",
"0.65475875",
"0.65447706"
] | 0.0 | -1 |
Update the specified resource in storage. | public function update(Request $request, $id)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }",
"public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }",
"public function update(Request $request, Resource $resource)\n {\n //\n }",
"public function updateStream($resource);",
"public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }",
"protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }",
"public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }",
"public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }",
"public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}",
"public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }",
"public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }",
"protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }",
"public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }",
"public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }",
"public function update($path);",
"public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }",
"public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }",
"public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }",
"public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}",
"public function updateStream($path, $resource, Config $config)\n {\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }",
"public function update($data) {}",
"public function update($data) {}",
"public function putStream($resource);",
"public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }",
"public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }",
"public function update($entity);",
"public function update($entity);",
"public function setResource($resource);",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }",
"public function isUpdateResource();",
"public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }",
"public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }",
"public function store($data, Resource $resource);",
"public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }",
"public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }",
"public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }",
"public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }",
"public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }",
"public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }",
"public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }",
"public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }",
"public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }",
"public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }",
"public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }",
"public function update(Qstore $request, $id)\n {\n //\n }",
"public function update(IEntity $entity);",
"protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }",
"public function update($request, $id);",
"function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}",
"public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }",
"public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }",
"protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }",
"abstract public function put($data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function testUpdateSupplierUsingPUT()\n {\n }",
"public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }",
"public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }",
"public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }",
"public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }",
"public abstract function update($object);",
"public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }",
"public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }",
"public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }",
"public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }",
"public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }",
"public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }",
"public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }",
"public function update($entity)\n {\n \n }",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }",
"public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }",
"public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }",
"public function update($id, $input);",
"public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }",
"public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}",
"public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }",
"public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }",
"public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }",
"public function update($id);",
"public function update($id);",
"private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }",
"public function put($path, $data = null);",
"public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }",
"public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }",
"public function update(Entity $entity);",
"public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }",
"public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}",
"public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }",
"public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }",
"public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }",
"public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }",
"public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }"
] | [
"0.7425105",
"0.70612276",
"0.70558053",
"0.6896673",
"0.6582159",
"0.64491373",
"0.6346954",
"0.62114537",
"0.6145042",
"0.6119944",
"0.61128503",
"0.6099993",
"0.6087866",
"0.6052593",
"0.6018941",
"0.60060275",
"0.59715486",
"0.5946516",
"0.59400934",
"0.59377414",
"0.5890722",
"0.5860816",
"0.5855127",
"0.5855127",
"0.58513457",
"0.5815068",
"0.5806887",
"0.57525045",
"0.57525045",
"0.57337505",
"0.5723295",
"0.5714311",
"0.5694472",
"0.5691319",
"0.56879413",
"0.5669989",
"0.56565005",
"0.56505877",
"0.5646085",
"0.5636683",
"0.5633498",
"0.5633378",
"0.5632906",
"0.5628826",
"0.56196684",
"0.5609126",
"0.5601397",
"0.55944353",
"0.5582592",
"0.5581908",
"0.55813426",
"0.5575312",
"0.55717176",
"0.55661047",
"0.55624634",
"0.55614686",
"0.55608666",
"0.55599797",
"0.55599797",
"0.55599797",
"0.55599797",
"0.55599797",
"0.55573726",
"0.5556878",
"0.5554201",
"0.5553069",
"0.55530256",
"0.5543788",
"0.55435944",
"0.55412996",
"0.55393505",
"0.55368495",
"0.5535236",
"0.5534954",
"0.55237365",
"0.5520468",
"0.55163723",
"0.55125296",
"0.5511168",
"0.5508345",
"0.55072427",
"0.5502385",
"0.5502337",
"0.5501029",
"0.54995877",
"0.54979175",
"0.54949397",
"0.54949397",
"0.54946727",
"0.5494196",
"0.54941916",
"0.54925025",
"0.5491807",
"0.5483321",
"0.5479606",
"0.5479408",
"0.5478678",
"0.54667485",
"0.5463411",
"0.5460588",
"0.5458525"
] | 0.0 | -1 |
Remove the specified resource from storage. | public function destroy($id)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }",
"public function destroy(Resource $resource)\n {\n //\n }",
"public function removeResource($resourceID)\n\t\t{\n\t\t}",
"public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }",
"public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }",
"public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }",
"public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }",
"protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }",
"public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }",
"public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }",
"public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }",
"public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}",
"public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}",
"public function delete(): void\n {\n unlink($this->getPath());\n }",
"public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }",
"public function remove($path);",
"function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}",
"public function delete(): void\n {\n unlink($this->path);\n }",
"private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }",
"public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }",
"public function remove() {}",
"public function remove() {}",
"public function remove();",
"public function remove();",
"public function remove();",
"public function remove();",
"function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}",
"public function deleteImage(){\n\n\n Storage::delete($this->image);\n }",
"public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }",
"public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}",
"public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }",
"public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }",
"public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}",
"public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }",
"public function deleteImage(){\n \tStorage::delete($this->image);\n }",
"public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }",
"public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }",
"public function destroy($id)\n {\n Myfile::find($id)->delete();\n }",
"public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }",
"public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }",
"public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }",
"public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }",
"public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }",
"public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }",
"public function delete($path);",
"public function delete($path);",
"public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }",
"public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }",
"public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }",
"public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }",
"public function delete($path, $data = null);",
"public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }",
"public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }",
"public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }",
"public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }",
"public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }",
"public function del($path){\n\t\treturn $this->remove($path);\n\t}",
"public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }",
"public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}",
"public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }",
"public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }",
"public function revoke($resource, $permission = null);",
"public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }",
"function delete($path);",
"public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}",
"public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }",
"public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }",
"public function remove($filePath){\n return Storage::delete($filePath);\n }",
"public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }",
"public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }",
"public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }",
"public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }",
"function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }",
"public function remove($id);",
"public function remove($id);",
"public function deleted(Storage $storage)\n {\n //\n }",
"public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }",
"public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }",
"public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }",
"public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }",
"function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}",
"public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }",
"public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}",
"public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }",
"public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }"
] | [
"0.6672584",
"0.6659381",
"0.6635911",
"0.6632799",
"0.6626075",
"0.65424126",
"0.65416265",
"0.64648265",
"0.62882507",
"0.6175931",
"0.6129922",
"0.60893893",
"0.6054415",
"0.60428125",
"0.60064924",
"0.59337646",
"0.5930772",
"0.59199584",
"0.5919811",
"0.5904504",
"0.5897263",
"0.58962846",
"0.58951396",
"0.58951396",
"0.58951396",
"0.58951396",
"0.5880124",
"0.58690923",
"0.5863659",
"0.5809161",
"0.57735413",
"0.5760811",
"0.5753559",
"0.57492644",
"0.5741712",
"0.57334286",
"0.5726379",
"0.57144034",
"0.57096",
"0.5707689",
"0.5705895",
"0.5705634",
"0.5703902",
"0.5696585",
"0.5684331",
"0.5684331",
"0.56780374",
"0.5677111",
"0.5657287",
"0.5648262",
"0.5648085",
"0.5648012",
"0.5640759",
"0.5637738",
"0.5629985",
"0.5619264",
"0.56167465",
"0.5606877",
"0.56021434",
"0.5601949",
"0.55992156",
"0.5598557",
"0.55897516",
"0.5581397",
"0.5566926",
"0.5566796",
"0.55642897",
"0.55641",
"0.5556583",
"0.5556536",
"0.5550097",
"0.5543172",
"0.55422723",
"0.5540013",
"0.5540013",
"0.55371785",
"0.55365825",
"0.55300397",
"0.552969",
"0.55275744",
"0.55272335",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.5525997",
"0.5525624",
"0.5523911",
"0.5521122",
"0.5517412"
] | 0.0 | -1 |
Create a new message instance. | public function __construct(
$nama, $kode, $password, $tanggalMulaiUjian, $tanggalSelesaiUjian, $realFileKartuUjian, $fileNameKartuUjian, $durasi, $kodeJadwalUjian
) {
$this->nama = $nama;
$this->kode = $kode;
$this->kodeJadwalUjian = $kodeJadwalUjian;
$this->durasi = $durasi;
$this->password = $password;
$this->realFileKartuUjian = $realFileKartuUjian;
$this->fileNameKartuUjian = $fileNameKartuUjian;
$this->tanggalMulaiUjian = $tanggalMulaiUjian;
$this->tanggalSelesaiUjian = $tanggalSelesaiUjian;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function createMessage()\n {\n $message = new Message(new Swift_Message);\n\n\n // If a global from address has been specified we will set it on every message\n // instances so the developer does not have to repeat themselves every time\n // they create a new message. We will just go ahead and push the address.\n if (isset($this->from['address'])) {\n $message->from($this->from['address'], $this->from['name']);\n }\n\n return $message;\n }",
"protected function createMessage() {\n $config = $this->messageConfig;\n if (!array_key_exists('class', $config)) {\n $config['class'] = $this->messageClass;\n }\n $config['smser'] = $this;\n return Yii::createObject($config);\n }",
"protected static function newMessage()\n {\n self::$message = \\Swift_Message::newInstance();\n }",
"public function create()\n {\n //\n $this->message->sendMessage();\n }",
"private function newMessage()\n {\n /* @var $config ModuleOptions */\n $config = $this->serviceLocator->get('EscoMail\\Options');\n\n $this->message = new Message();\n $this->message->setFrom($config->getMailSendFrom(), $config->getMailSendFromName());\n\n return $this->message;\n }",
"protected function createMessage()\n\t{\n\t\t$config = $this->messageConfig;\n\t\tif (!array_key_exists('class', $config)) {\n\t\t\t$config['class'] = $this->messageClass;\n\t\t}\n\t\t$config['mailer'] = $this;\n\n\t\treturn Yii::createObject($config);\n\t}",
"public function createMessage(): MessageInterface;",
"public function create(string $message = ''): BusMessageInterface;",
"public function createInstance()\n {\n $mock = $this->mock(static::TEST_SUBJECT_CLASSNAME)\n ->getMessage();\n\n return $mock->new();\n }",
"public static function createInstance()\n {\n return new MailMessage('[email protected]');\n }",
"public static function init( $_id )\n {\n $message = new Message();\n $message->get( $_id );\n return $message;\n }",
"public function createMessage(string $typeName): MessageInterface;",
"public function createMailMessage();",
"static public function factory($messageType = 3) {\n\t\treturn new self($messageType);\n\t}",
"public function createMessage(array $parameters = []);",
"public function user_message_create() {\n\t\t$this->onDebug ( __METHOD__, 1 );\n\t\tif ($this->valide_userid () == false) {\n\t\t\treturn $this;\n\t\t}\n\t\t$message_created = $this->getObjetO365Wsclient ()\n\t\t\t->jsonPostMethod ( '/users/' . $this->getUserId () . '/messages', $this->getEmailContent () );\n\t\t$this->onDebug ( $message_created, 2 );\n\t\tif (isset ( $message_created->id ) && ! empty ( $message_created->id )) {\n\t\t\treturn $this->setO356MessageRef ( $message_created )\n\t\t\t\t->setMessageId ( $message_created->id );\n\t\t}\n\t\treturn $this->onError ( 'Pas d\\'ID durant la creation du message de O365', $message_created, 1 );\n\t}",
"private function newMessage(array $data)\n {\n\n $message = Message::create([\n 'channel_id' => $data['channel_id'],\n 'user_id' => Auth::guard()->user()->id,\n 'message' => $data['message']\n ]);\n if ($message) {\n $this->notifyChannelUsers($data['channel_id']);\n }\n return $message;\n }",
"public function initMessage() {}",
"public function __construct(Message $message)\n {\n $this->message = $message;\n }",
"public function __construct(Message $message)\n {\n $this->message = $message;\n }",
"public function __construct(Message $message)\n {\n $this->message = $message;\n }",
"public function __construct(Message $message)\n {\n $this->message = $message;\n }",
"public function __construct(Message $message)\n {\n $this->message = $message;\n }",
"private function createMessageObject(string $type, string $message): Notification\n {\n $msg = new Notification();\n\n $msg->setType($type);\n $msg->setMessage($message);\n\n $this->handler->add($msg);\n\n return $msg;\n }",
"protected static function newFactory()\n {\n return MessageFactory::new();\n }",
"public function message(mixed $data = null)\n {\n $message = new Message((string) $data);\n\n return $message;\n }",
"public static function createFromString($raw)\n {\n $message = new self(array('raw' => $raw));\n return $message;\n }",
"public static function create(string $text = null): GoogleChatMessage\n {\n $message = new static;\n\n if ($text) {\n $message->text($text);\n }\n\n return $message;\n }",
"public function create() {\n\t\t$user = $this->current_user();\n\t\t$message = $this->discussion->create_message($this->message_data() + ['creator' => ['id' => $user->_id, 'name' => $user->name]]);\n\n\t\tif ($this->discussion->push_message($message)) {\n\t\t\treturn $this->redirect(['Discussions::show', 'id' => $this->discussion->_id, 'project_id' => $this->discussion->project_id]);\n\t\t}\n\n\t\treturn compact('message');\n\t}",
"public static function createFromArray($fields) \n\t{\n\t\t$message = new Message();\n\t\tself::populate($message,$fields);\n\t\treturn $message;\n\t}",
"public function addMessage()\n {\n if(null === $this->obj_message) {\n $this->obj_message = new Message();\n }\n return $this->obj_message;\n }",
"public function createMimeMessage();",
"public function testCreateMethodReturnsNewInstance(): void\n {\n $message = DiscordMessage::create();\n $this->assertInstanceOf(DiscordMessage::class, $message);\n }",
"function createMessage($email) {\n $message = new Google_Service_Gmail_Message();\n $message->setRaw(base64_encode($email));\n return $message;\n}",
"protected function createMessage(Swift_Message $message)\n {\n $mimeEntity = new Swift_Message('', $message->getBody(), $message->getContentType(), $message->getCharset());\n $mimeEntity->setChildren($message->getChildren());\n\n $messageHeaders = $mimeEntity->getHeaders();\n $messageHeaders->remove('Message-ID');\n $messageHeaders->remove('Date');\n $messageHeaders->remove('Subject');\n $messageHeaders->remove('MIME-Version');\n $messageHeaders->remove('To');\n $messageHeaders->remove('From');\n\n return $mimeEntity;\n }",
"public function __construct($message)\n {\n // $this->message = $message;\n }",
"function createMessage($object) {\n\tglobal $USER;\n\t\n\t$message = new \\core\\message\\message();\n\t$message->component = 'local_littlehelpers';\n\t$message->name = 'paragraph52notification';\n\t$message->userfrom = $USER;\n\t\n\t// Get user\n\t$message->userto = core_user::get_user($object->useridto);\n\t\n\t// force email sending\n\t$message->userto->emailstop = 0;\n\t\n\t$message->subject = $object->subject;\n\t$message->fullmessage = $object->fullmessage;\n\t$message->fullmessageformat = FORMAT_MARKDOWN;\n\t$message->fullmessagehtml = $object->fullmessagehtml;\n\t$message->smallmessage = $object->smallmessage;\n\t$message->notification = '0';\n\t\n\t$message->contexturl = 'https://moodle.tu-darmstadt.de/local/littlehelpers/paragraph52';\n\t$message->contexturlname = 'Paragraph52';\n\t$message->replyto = \"[email protected]\";\n\n\treturn $message;\n}",
"public function __construct($message)\r\n {\r\n $this->message = $message;\r\n\r\n }",
"public function createMessage($content, $options = array('content_type' => 'application/json', 'delivery_mode' => 2))\n {\n if (!empty($options['content_type']) && $options['content_type'] == 'application/json')\n $content = json_encode($content);\n return new AMQPMessage($content, $options);\n }",
"public function __construct($message) {\n $this->message= $message;\n }",
"public function __construct($msg)\n {\n $this->message = $msg;\n }",
"public function __construct(Message $message)\n {\n parent::__construct($message);\n }",
"public function __construct($messageDefinition)\n {\n $this->messageDefintion = $messageDefinition;\n }",
"public function testCreateMessage()\n {\n $config = new Configuration();\n// $config->setHost(\"http://127.0.0.1:8080\");\n $apiInstance = new DaDaPushMessageApi(\n // If you want use custom http client, pass your client which implements `GuzzleHttp\\ClientInterface`.\n // This is optional, `GuzzleHttp\\Client` will be used as default.\n new \\GuzzleHttp\\Client(),\n $config\n );\n\n $actions = [\n new Action($data = array(\"name\" => \"view\", \"url\" => \"https://www.dadapush.com/\", \"type\" => \"link\"))\n ];\n\n $body = new MessagePushRequest($data = array(\"title\" => \"Good News!\",\n \"content\" => \"Good News! DaDaPush releasing new version\",\n \"need_push\" => true,\n \"actions\" => $actions\n ));\n\n $channel_token = 'ctb3lwO6AeiZOwqZgp8BE8980FdNgp0cp6MCf';\n\n $result = $apiInstance->createMessage($body, $channel_token);\n print_r($result);\n self::assertTrue($result->getCode()==0);\n }",
"public static function create( $msg, $code = null, array $data = null ) {\n\t\tif ( $msg instanceof IApiMessage ) {\n\t\t\treturn $msg;\n\t\t} elseif ( $msg instanceof RawMessage ) {\n\t\t\treturn new ApiRawMessage( $msg, $code, $data );\n\t\t} else {\n\t\t\treturn new ApiMessage( $msg, $code, $data );\n\t\t}\n\t}",
"public static function create($message, $type = '', $title = '', $icon = '')\n {\n return new self($message, $type, $title, $icon);\n }",
"public function newEntity(array $attributes = [])\n {\n return new MessageContent($attributes);\n }",
"public function create()\n {\n return view('materialadmin::message.create');\n }",
"public static function factory($raw_message = null, $class_name = null) {}",
"public function __construct($message = null) {}",
"public function __construct($message)\n {\n $this->message = $message;\n }",
"public function __construct($message)\n {\n $this->message = $message;\n }",
"public function __construct($message)\n {\n $this->message = $message;\n }",
"public function __construct($message)\n {\n $this->message = $message;\n }",
"public function __construct($message)\n {\n $this->message = $message;\n }",
"public function __construct($message)\n {\n $this->message = $message;\n }",
"public static function createFromFile($filename)\n {\n $message = new self(array('file' => $filename));\n\n return $message;\n }",
"public function create()\n\t{\n\t\treturn View::make('messages.create');\n\t}",
"public function actionCreate()\n {\n $model = new Message();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"private function createMessage(InputInterface $input)\n {\n $message = new \\Swift_Message(\n $input->getOption('subject'),\n $input->getOption('body'),\n $input->getOption('content-type'),\n $input->getOption('charset')\n );\n $message->setFrom($input->getOption('from'));\n $message->setTo($input->getOption('to'));\n\n return $message;\n }",
"public function test_message_can_be_created() {\n\n $this->assertInstanceOf(Message::class, $this->message);\n $this->assertDatabaseHasMessageWithPublicId($this->message->getPublicId());\n\n }",
"protected function getMessage()\n {\n //return new \\Swift_Message('Test subject', 'Test body.');\n }",
"public function testConstructorAndGetters() \r\n \t{\r\n \t\t// create a message with complete constructor args\r\n \t\t$message = new Message( Message::NORMAL, \r\n \t\t\t\t\t\t\t\t(object)array( 'testProp' => 'testval' ),\r\n \t\t\t\t\t\t\t\tsimplexml_load_string('<testMessage testAtt=\"Hello\" testAtt2=\"world\"/>'),\r\n \t\t\t\t\t\t\t\tMessage::PRIORITY_HIGH);\r\n \t\t\r\n \t\t// test assertions\r\n \t\t$this->assertTrue( $message instanceof Message, \"Expecting \\$message is Message\" );\r\n \t\t$this->assertTrue( $message->getType() == Message::NORMAL, \"Expecting \\$message->getType() == Message::NORMAL\" );\r\n \t\t$this->assertTrue( $message->getHeader()->testProp == 'testval', \"Expecting \\$message->getHeader()->testProp == 'testval'\" );\r\n \t\t$this->assertTrue( $message->getBody()->attributes()->testAtt == 'Hello', \"Expecting \\$message->getBody()->attributes()->testAtt == 'Hello'\" );\r\n \t\t$this->assertTrue( $message->getPriority() == Message::PRIORITY_HIGH, \"Expecting \\$message->getPriority() == Message::PRIORITY_HIGH\" );\r\n \t\t\r\n \t}",
"public function __construct($data)\n {\n $this->message = $data;\n }",
"public function __construct($data)\n {\n $this->message = $data;\n }",
"public static function getInstance($messageClass = '\\PEIP\\Message\\GenericMessage')\n {\n return new self($messageClass);\n }",
"public function __construct(NewMessageEvent $event)\n {\n $this->event = $event;\n }",
"public static function createFromFile(string $path) : CommitMessage\n {\n if (!file_exists($path)) {\n throw new \\RuntimeException('Commit message file not found');\n }\n return new CommitMessage(file_get_contents($path));\n }",
"public function testCreateWithoutId()\n {\n $faker = Factory::create();\n $messageAttributes = [\n 'body' => $faker->sentence(15),\n 'subject' => $faker->sentence(5),\n 'name' => $faker->name(),\n 'email' => $faker->email(),\n 'custom_info' => $faker->sentence(3)\n\n ];\n $response = $this->client->messages()->create($messageAttributes);\n $this->assertEquals($messageAttributes['body'], $response['message']['body']);\n $this->assertEquals($messageAttributes['subject'], $response['message']['subject']);\n\n return $response;\n }",
"public function create(Message $message): void\n {\n $this->items[$message->getEventName()][$message->getId()] = $message;\n }",
"public function __construct($message, $type)\n\t{\n\t\t$this->message = $message;\n\t\t$this->type = $type;\n\t}",
"public function __construct(MimeMessage $message = null) {\n $this->htmlBody = new MimePart();\n $this->htmlBody->type = Mime::TYPE_HTML;\n $this->htmlBody->charset = 'utf-8';\n $this->htmlBody->encoding = Mime::ENCODING_QUOTEDPRINTABLE;\n\n $this->textBody = new MimePart();\n $this->textBody->type = Mime::TYPE_TEXT;\n $this->textBody->charset = 'utf-8';\n $this->textBody->encoding = Mime::ENCODING_QUOTEDPRINTABLE;\n }",
"public function create(){}",
"public function actionCreate() {\n if (isset($_POST['Message'])) {\n $resp = array(\n 'color' => '#FF6600',\n 'background_color' => '#FFFFCC',\n 'position' => 'top',\n 'removebutton' => 0,\n 'translation' => $_POST['Message']['translation']\n );\n $model = new Message();\n $model->setAttributes($_POST['Message']);\n if ($model->save()) {\n $resp['message'] = Yii::t('translate', 'Message successfully saved');\n $resp['id'] = $model->id;\n } else {\n $errors = $this->errors($model);\n $resp['message'] = Yii::t('translate', '<p>Unable to save the message. Something went wrong!<p/>' . implode('<br/>', $errors));\n }\n echo $this->je($resp);\n Yii::app()->end();\n }\n $id = (int)Yii::app()->request->getParam('id');\n $lang = Yii::app()->request->getParam('lang');\n if ($id && $lang) {\n $model = MessageSource::model()->findByPk($id);\n if ($model) {\n $message = $model->loadMessage();\n $message->id = $model->id;\n $message->language = $lang;\n $this->renderPartial('form', array(\n 'model' => $message\n ));\n } else throw new CHttpException(400);\n } else throw new CHttpException(404, 'The requested page does not exist.');\n }",
"public static function create() {}",
"public static function create() {}",
"public static function create() {}",
"protected static function newFactory(): Factory\n {\n return MessageFactory::new();\n }",
"public function __construct(string $message)\n {\n $this->message = $message;\n }",
"public function create()\n {\n return view('message');\n }",
"public function newAction()\n {\n $entity = new Message();\n $form = $this->createForm(new MessageType(), $entity);\n\n return $this->render('CoreMarketingBundle:Message:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"protected function createDocument(\\TYPO3\\Jobqueue\\Common\\Queue\\Message $message) {\n\t\t$properties = ObjectAccess::getGettableProperties($message);\n\t\t$messageDocument = new Message($message->getPayload(), $message->getIdentifier());\n\n\t\tforeach ($properties as $propertyName => $propertyValue) {\n\t\t\tObjectAccess::setProperty($messageDocument, $propertyName, $propertyValue);\n\t\t}\n\n\t\treturn $messageDocument;\n\t}",
"public function __construct($message = '', $type = 'info') {\n $this->message = $message;\n }",
"protected function render(): Message\n {\n $headers = '';\n foreach ($this->buildHeaders() as $header => $value) {\n $headers .= \"{$header}: {$value}\" . self::CRLF;\n }\n $message = implode(self::CRLF, $this->buildMessage());\n\n return new Message($headers, $message);\n }",
"public function create()\n\t{\n\t\t$form = \\View::make('message.form');\n\t\t$form->project_id = \\Session::get('active_project');\n\t\t$form->action = array('action' => 'Toomdrix\\Pm\\MessageController@store', 'class'=>'form-signup');\n\t\treturn $form;\n\t}",
"public static function getInstance($context=null) {\n return new Messages($context);\n }",
"public function create_post() {\n\t\t$data['uid'] = $this->input->get('uid');\n\t\t$data['to'] = $this->input->get('to');\n\t\t$data['text'] = $this->input->get('text');\n\t\t$data['ts'] = now();\n\n\t\t$this->Messages_model->create($data);\n\t}",
"public function getGeneratedMessage()\n {\n # Force the template to render\n (string) $this->prepareTemplate();\n\n $m = $this->template->__message;\n\n if (!$m->getFrom()) {\n trigger_error(\"You should add 'from' information.\", E_USER_WARNING);\n }\n\n if (!$m->getSubject()) {\n trigger_error(\"You should add 'subject'.\", E_USER_WARNING);\n }\n\n if (!$m->getHeader('To')) {\n trigger_error(\"You should add recipients.\", E_USER_WARNING);\n }\n\n foreach ($this->attachments as $attachment) {\n list($filename, $content, $type) = $attachment;\n $m->addAttachment($filename, $content, $type);\n }\n\n return $m;\n }",
"public function __construct($message='1111222333',$type='2222')\n {\n $this->type = $type;\n $this->message = $message;\n }",
"public static function new()\n {\n if ( ! empty($_REQUEST['mgb_rating_message']) ) Database::insert([\n 'message' => $_REQUEST['mgb_rating_message'],\n 'author' => self::author(),\n 'state' => (!json_decode($_REQUEST['mgb_rating_moderation'])) ? true : false\n ]);\n }",
"public function create() {}",
"public function compose() {\n return $this->createMessage();\n }",
"public function create()\n {\n // die('here');\n return view('message.create');\n }",
"public function create()\n {\n return view('messages.create');\n }",
"public function create()\n {\n return view('messages.create');\n }",
"public function actionCreate()\n {\n $model = new Message();\n\n if ($model->load(Yii::$app->request->post())) {\n if ($model->save())\n return $this->redirect(['index']);\n } else {\n return $this->render('create', [\n 'model' => $model\n ]);\n }\n }",
"public static function getInstanceFromMessage(\\PEIP\\INF\\Message\\Message $message)\n {\n return new self(get_class($message));\n }",
"public function store(Request $request)\n {\n $this->validate($request, [\n 'body' => 'required|max:5000',\n 'user_id' => ['required', new NotSelfId(), 'exists:users,id'],\n ]);\n\n $message = Auth::user()->messages()->create([\n 'data' => [\n 'text' => request('body'),\n ],\n ]);\n\n Auth::user()->conversations()->attach($message, [\n 'contact_id' => $request->user_id,\n ]);\n\n if (!$this->isAuthUserBlockedToContact($request->user_id, Auth::user()->id)) {\n User::find($request->user_id)->conversations()->attach($message, [\n 'contact_id' => Auth::id(),\n ]);\n\n // broadcast the message to the other person\n event(new MessageCreated($message, $request->user_id, Auth::user()->id));\n }\n\n $message->owner = Auth::user();\n\n return new MessageResource($message);\n }",
"public function create()\n {\n return view('admin.messages.create');\n }",
"public function __construct($message) {\r\n parent::__construct($message);\r\n }",
"public function __construct($messageData)\n {\n $this->messageData = $messageData;\n }"
] | [
"0.81376195",
"0.7959614",
"0.77619994",
"0.7713793",
"0.76559645",
"0.7553059",
"0.7458076",
"0.71510184",
"0.6852663",
"0.68347865",
"0.67154217",
"0.6689976",
"0.6683088",
"0.6644564",
"0.6628052",
"0.6549025",
"0.6514292",
"0.6501647",
"0.645071",
"0.645071",
"0.645071",
"0.645071",
"0.645071",
"0.64457685",
"0.63510966",
"0.6340597",
"0.633213",
"0.6326836",
"0.6310014",
"0.6258695",
"0.6234698",
"0.62195796",
"0.62077796",
"0.620518",
"0.6204953",
"0.6198459",
"0.6177945",
"0.61717975",
"0.617064",
"0.6150332",
"0.61301666",
"0.6109668",
"0.61057645",
"0.60924155",
"0.6081678",
"0.60787344",
"0.60670817",
"0.6049224",
"0.60457045",
"0.60438704",
"0.6036989",
"0.6036989",
"0.6036989",
"0.6036989",
"0.6036989",
"0.6036989",
"0.6026595",
"0.6025895",
"0.6022185",
"0.6005734",
"0.6002389",
"0.6000802",
"0.59941816",
"0.59808266",
"0.59808266",
"0.59678143",
"0.5966462",
"0.59593695",
"0.594777",
"0.5938714",
"0.5910345",
"0.5893692",
"0.5880708",
"0.5878038",
"0.58748907",
"0.58748907",
"0.58748907",
"0.5873998",
"0.5869665",
"0.5864223",
"0.5860705",
"0.5858159",
"0.5854505",
"0.5845474",
"0.5842933",
"0.58327615",
"0.58256036",
"0.58199257",
"0.58134514",
"0.57909477",
"0.5787155",
"0.57835746",
"0.5783115",
"0.57801926",
"0.57801926",
"0.5779767",
"0.57784975",
"0.57596684",
"0.5748547",
"0.5746673",
"0.57461363"
] | 0.0 | -1 |
Display a listing of the resource. | public function index()
{
$data['allData'] = Supplier::all();
return view('backend.supplier.index',$data);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }",
"public function listing();",
"function index() {\n\t\t$this->show_list();\n\t}",
"public function actionList() {\n $this->_getList();\n }",
"public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }",
"public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }",
"public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }",
"function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}",
"public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }",
"public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }",
"public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}",
"function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}",
"public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }",
"public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}",
"public function actionRestList() {\n\t $this->doRestList();\n\t}",
"public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}",
"public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }",
"public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }",
"public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}",
"public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}",
"public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }",
"public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }",
"public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }",
"public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }",
"public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}",
"public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }",
"public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}",
"public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }",
"public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}",
"public function index()\n {\n $this->list_view();\n }",
"public function index()\n {\n $this->list_view();\n }",
"public function index()\n {\n $this->list_view();\n }",
"public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }",
"public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }",
"public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}",
"public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }",
"public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }",
"public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }",
"public function index()\n {\n return Resources::collection(Checking::paginate());\n }",
"public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }",
"public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }",
"public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }",
"public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }",
"public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }",
"public function view(){\n\t\t$this->buildListing();\n\t}",
"public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }",
"public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }",
"public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }",
"public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }",
"public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }",
"public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }",
"public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }",
"public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }",
"public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }",
"public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}",
"public function listAction() {}",
"public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }",
"public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }",
"public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }",
"public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }",
"public function executeList()\n {\n $this->setTemplate('list');\n }",
"public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }",
"function listing() {\r\n\r\n }",
"public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }",
"public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }",
"public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}",
"public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }",
"public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }",
"public function _index(){\n\t $this->_list();\n\t}",
"public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}",
"function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}",
"public function index()\n {\n $this->booklist();\n }",
"public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }",
"public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }",
"public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }",
"public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }",
"public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }",
"public function indexAction() {\n $this->_forward('list');\n }",
"public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }",
"public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }",
"public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}",
"public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }",
"public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }",
"public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }",
"public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }",
"public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }",
"public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }",
"public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}",
"public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }",
"public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }",
"public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }",
"public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}",
"public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }",
"public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }",
"public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }",
"public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }",
"public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }",
"public function index()\n {\n return view('admin.resources.index');\n }",
"public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}"
] | [
"0.7446777",
"0.736227",
"0.73005503",
"0.72478926",
"0.71631265",
"0.71489686",
"0.7131636",
"0.7105969",
"0.71029514",
"0.7101372",
"0.70508176",
"0.6995128",
"0.69890636",
"0.6934895",
"0.6900203",
"0.6899281",
"0.6891734",
"0.6887235",
"0.68670005",
"0.6849741",
"0.6830523",
"0.6802689",
"0.6797",
"0.67957735",
"0.67871135",
"0.6760129",
"0.67427456",
"0.6730486",
"0.67272323",
"0.67255723",
"0.67255723",
"0.67255723",
"0.67177945",
"0.6707866",
"0.6706713",
"0.6704375",
"0.6664782",
"0.6662871",
"0.6660302",
"0.6659404",
"0.6656656",
"0.6653517",
"0.6647965",
"0.6620322",
"0.66185474",
"0.6618499",
"0.6606105",
"0.6600617",
"0.65996987",
"0.6594775",
"0.6587389",
"0.6585109",
"0.6581641",
"0.6581017",
"0.6577157",
"0.65747666",
"0.6572513",
"0.65721947",
"0.6570553",
"0.65646994",
"0.6563556",
"0.6554194",
"0.65529937",
"0.65460825",
"0.65368485",
"0.653429",
"0.65328294",
"0.6526759",
"0.6526695",
"0.6526284",
"0.65191334",
"0.65183175",
"0.65174305",
"0.651703",
"0.65141153",
"0.6507088",
"0.65061647",
"0.6504046",
"0.64942145",
"0.6491893",
"0.64883405",
"0.6486392",
"0.6485077",
"0.64846045",
"0.6478858",
"0.64756656",
"0.64726377",
"0.6471126",
"0.64701074",
"0.6467418",
"0.6462195",
"0.64618355",
"0.6459199",
"0.6457831",
"0.6454631",
"0.64533997",
"0.6451915",
"0.6450861",
"0.6449301",
"0.64492667",
"0.64469045"
] | 0.0 | -1 |
Show the form for creating a new resource. | public function create()
{
return view('backend.supplier.add_supplier');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return view('admin.resources.create');\n }",
"public function create(){\n\n return view('resource.create');\n }",
"public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}",
"public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }",
"public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }",
"public function create()\n {\n return view ('forms.create');\n }",
"public function create ()\n {\n return view('forms.create');\n }",
"public function create()\n\t{\n\t\treturn view('faith.form');\n\t}",
"public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }",
"public function create()\n {\n return view(\"request_form.form\");\n }",
"public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }",
"public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle école'\n\t\t) ) );\n\t}",
"public function create()\n {\n return view($this->forms . '.create');\n }",
"public function create()\n {\n return view('restful.add');\n }",
"public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }",
"public function create()\n {\n return view('admin.createform');\n }",
"public function create()\n {\n return view('admin.forms.create');\n }",
"public function create()\n {\n return view('backend.student.form');\n }",
"public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }",
"public function create()\n {\n return view('client.form');\n }",
"public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }",
"public function create()\n {\n return view('Form');\n }",
"public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }",
"public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}",
"public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }",
"public function create()\n {\n return view('backend.schoolboard.addform');\n }",
"public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}",
"public function create()\n {\n //\n return view('form');\n }",
"public function create()\n {\n return view('rests.create');\n }",
"public function create()\n {\n return $this->showForm();\n }",
"public function create()\n {\n return $this->showForm();\n }",
"public function create()\n {\n return view(\"Add\");\n }",
"public function create(){\n return view('form.create');\n }",
"public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }",
"public function create()\n {\n\n return view('control panel.student.add');\n\n }",
"public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}",
"public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }",
"public function create()\n {\n return $this->cView(\"form\");\n }",
"public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }",
"public function create()\n {\n return view(\"dresses.form\");\n }",
"public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}",
"public function createAction()\n {\n// $this->view->form = $form;\n }",
"public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }",
"public function create()\n {\n return view('fish.form');\n }",
"public function create()\n {\n return view('users.forms.create');\n }",
"public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }",
"public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}",
"public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }",
"public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }",
"public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }",
"public function create()\n {\n return view('essentials::create');\n }",
"public function create()\n {\n return view('student.add');\n }",
"public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}",
"public function create()\n {\n return view('url.form');\n }",
"public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }",
"public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}",
"public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }",
"public function create()\n {\n return view('libro.create');\n }",
"public function create()\n {\n return view('libro.create');\n }",
"public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n return view('crud/add'); }",
"public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}",
"public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n return view(\"List.form\");\n }",
"public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}",
"public function create()\n {\n //load create form\n return view('products.create');\n }",
"public function create()\n {\n return view('article.addform');\n }",
"public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }",
"public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}",
"public function create()\n {\n return view('saldo.form');\n }",
"public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}",
"public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }",
"public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }",
"public function create()\n {\n return view('admin.inverty.add');\n }",
"public function create()\n {\n return view('Libro.create');\n }",
"public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }",
"public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }",
"public function create()\n {\n return view(\"familiasPrograma.create\");\n }",
"public function create()\n {\n return view('admin.car.create');\n }",
"public function create()\n {\n return view('admin.car.create');\n }",
"public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}",
"public function create()\n {\n return view(\"create\");\n }",
"public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}",
"public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }",
"public function create()\n {\n return view('forming');\n }",
"public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }",
"public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }",
"public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }",
"public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }",
"public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }",
"public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}",
"public function create()\n {\n return view('student::students.student.create');\n }",
"public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}"
] | [
"0.75948673",
"0.75948673",
"0.75863165",
"0.7577412",
"0.75727344",
"0.7500887",
"0.7434847",
"0.7433956",
"0.73892003",
"0.73531085",
"0.73364776",
"0.73125",
"0.7296102",
"0.7281891",
"0.72741455",
"0.72424185",
"0.7229325",
"0.7226713",
"0.7187349",
"0.7179176",
"0.7174283",
"0.7150356",
"0.71444064",
"0.71442676",
"0.713498",
"0.71283126",
"0.7123691",
"0.71158516",
"0.71158516",
"0.71158516",
"0.7112176",
"0.7094388",
"0.7085711",
"0.708025",
"0.70800644",
"0.70571953",
"0.70571953",
"0.70556754",
"0.70396435",
"0.7039549",
"0.7036275",
"0.703468",
"0.70305896",
"0.7027638",
"0.70265305",
"0.70199823",
"0.7018007",
"0.7004984",
"0.7003889",
"0.7000935",
"0.69973785",
"0.6994679",
"0.6993764",
"0.6989918",
"0.6986989",
"0.6966502",
"0.69656384",
"0.69564354",
"0.69518244",
"0.6951109",
"0.6947306",
"0.69444615",
"0.69423944",
"0.6941156",
"0.6937871",
"0.6937871",
"0.6936686",
"0.69345254",
"0.69318026",
"0.692827",
"0.69263744",
"0.69242257",
"0.6918349",
"0.6915889",
"0.6912884",
"0.691146",
"0.69103104",
"0.69085974",
"0.69040126",
"0.69014287",
"0.69012105",
"0.6900397",
"0.68951064",
"0.6893521",
"0.68932164",
"0.6891899",
"0.6891616",
"0.6891616",
"0.6889246",
"0.68880934",
"0.6887128",
"0.6884732",
"0.68822503",
"0.68809193",
"0.6875949",
"0.68739206",
"0.68739134",
"0.6870358",
"0.6869779",
"0.68696856",
"0.686877"
] | 0.0 | -1 |
Store a newly created resource in storage. | public function store(Request $request)
{
$data = New Supplier();
$data->name = $request->name;
$data->email = $request->email;
$data->mobile = $request->mobile;
$data->address = $request->address;
$data->created_by = Auth::user()->id;
$data->save();
return redirect()->route('view-supplier')->with('success','Supplier inserted successfully!');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function store($data, Resource $resource);",
"public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }",
"public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }",
"public function createStorage();",
"public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }",
"public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }",
"public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }",
"function storeAndNew() {\n $this->store();\n }",
"public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }",
"public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }",
"public function store()\n\t{\n\t\t\n\t\t//\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}"
] | [
"0.72865677",
"0.7145327",
"0.71325725",
"0.6640912",
"0.66209733",
"0.65685713",
"0.652643",
"0.65095705",
"0.64490104",
"0.637569",
"0.63736665",
"0.63657933",
"0.63657933",
"0.63657933",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437"
] | 0.0 | -1 |
Show the form for editing the specified resource. | public function edit($id)
{
$editData = Supplier::find($id);
return view('backend.supplier.edit_supplier',compact('editData'));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }",
"public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }",
"public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }",
"public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function edit()\n {\n return view('hirmvc::edit');\n }",
"public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}",
"public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }",
"public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}",
"public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }",
"public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }",
"private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }",
"public function edit($id)\n {\n return $this->showForm('update', $id);\n }",
"public function edit($id)\n {\n return $this->showForm('update', $id);\n }",
"public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }",
"public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }",
"public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}",
"public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }",
"public function edit($model, $form);",
"function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}",
"public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}",
"public function edit()\n { \n return view('admin.control.edit');\n }",
"public function edit(Form $form)\n {\n //\n }",
"public function edit()\n {\n return view('common::edit');\n }",
"public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }",
"public function edit()\n {\n return view('admin::edit');\n }",
"public function edit()\n {\n return view('admin::edit');\n }",
"public function edit()\r\n {\r\n return view('petro::edit');\r\n }",
"public function edit($id)\n {\n // show form edit user info\n }",
"public function edit()\n {\n return view('escrow::edit');\n }",
"public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }",
"public function edit()\n {\n return view('commonmodule::edit');\n }",
"public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}",
"public function edit()\n {\n return view('catalog::edit');\n }",
"public function edit()\n {\n return view('catalog::edit');\n }",
"public function edit(form $form)\n {\n //\n }",
"public function actionEdit($id) { }",
"public function edit()\n {\n return view('admincp::edit');\n }",
"public function edit()\n {\n return view('scaffold::edit');\n }",
"public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }",
"public function edit()\n {\n return view('Person.edit');\n }",
"public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }",
"public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}",
"public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }",
"public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}",
"public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }",
"public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }",
"public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }",
"function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}",
"public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }",
"public function edit($id)\n {\n return $this->showForm($id);\n }",
"public function edit($id)\n {\n return $this->showForm($id);\n }",
"protected function _edit(){\n\t\treturn $this->_editForm();\n\t}",
"public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }",
"public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }",
"public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}",
"public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}",
"public function edit($id)\n {\n return view('models::edit');\n }",
"public function edit()\n {\n return view('home::edit');\n }",
"public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }",
"public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }",
"public function edit()\n {\n return view('user::edit');\n }",
"public function edit()\n {\n return view('user::edit');\n }",
"public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }",
"public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }",
"public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit($id)\n {\n return view('consultas::edit');\n }",
"public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }",
"public function edit()\n {\n return view('dashboard::edit');\n }",
"public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }",
"public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }",
"public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }",
"public function edit() {\n return view('routes::edit');\n }",
"public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }",
"public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }",
"public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit($id)\n {\n return view('cataloguemodule::edit');\n }",
"public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }",
"public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }",
"public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }",
"public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }",
"public function edit()\n {\n return view('website::edit');\n }",
"public function edit()\n {\n return view('inventory::edit');\n }",
"public function edit()\n {\n return view('initializer::edit');\n }",
"public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }",
"public function edit($id)\n {\n return view('backend::edit');\n }",
"public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }",
"public function edit($id)\n {\n return view('crm::edit');\n }",
"public function edit($id)\n {\n return view('crm::edit');\n }",
"public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }",
"public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}",
"public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }",
"public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}",
"public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }",
"public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }",
"public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }",
"public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }",
"public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }",
"public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}"
] | [
"0.78550774",
"0.7692893",
"0.7273195",
"0.7242132",
"0.7170847",
"0.70622855",
"0.7053459",
"0.6982539",
"0.69467914",
"0.6945275",
"0.6941114",
"0.6928077",
"0.69019294",
"0.68976134",
"0.68976134",
"0.6877213",
"0.68636996",
"0.68592185",
"0.68566656",
"0.6844697",
"0.68336326",
"0.6811471",
"0.68060875",
"0.68047357",
"0.68018645",
"0.6795623",
"0.6791791",
"0.6791791",
"0.6787701",
"0.67837197",
"0.67791027",
"0.677645",
"0.6768301",
"0.6760122",
"0.67458534",
"0.67458534",
"0.67443407",
"0.67425704",
"0.6739898",
"0.6735328",
"0.6725465",
"0.6712817",
"0.6693891",
"0.6692419",
"0.6688581",
"0.66879624",
"0.6687282",
"0.6684741",
"0.6682786",
"0.6668777",
"0.6668427",
"0.6665287",
"0.6665287",
"0.66610634",
"0.6660843",
"0.66589665",
"0.66567147",
"0.66545695",
"0.66527975",
"0.6642529",
"0.6633056",
"0.6630304",
"0.6627662",
"0.6627662",
"0.66192114",
"0.6619003",
"0.66153085",
"0.6614968",
"0.6609744",
"0.66086483",
"0.66060555",
"0.6596137",
"0.65950733",
"0.6594648",
"0.65902114",
"0.6589043",
"0.6587102",
"0.65799844",
"0.65799403",
"0.65799177",
"0.657708",
"0.65760696",
"0.65739626",
"0.656931",
"0.6567826",
"0.65663105",
"0.65660435",
"0.65615267",
"0.6561447",
"0.6561447",
"0.65576506",
"0.655686",
"0.6556527",
"0.6555543",
"0.6555445",
"0.65552044",
"0.65543956",
"0.65543705",
"0.6548264",
"0.65475875",
"0.65447706"
] | 0.0 | -1 |
Update the specified resource in storage. | public function update(Request $request, $id)
{
$updateData = Supplier::find($id);
$updateData->name = $request->name;
$updateData->email = $request->email;
$updateData->mobile = $request->mobile;
$updateData->address = $request->address;
$updateData->updated_by = Auth::user()->id;
$updateData->update();
return redirect()->route('view-supplier')->with('success','Supplier updated successfully!');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }",
"public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }",
"public function update(Request $request, Resource $resource)\n {\n //\n }",
"public function updateStream($resource);",
"public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }",
"protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }",
"public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }",
"public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }",
"public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}",
"public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }",
"public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }",
"protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }",
"public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }",
"public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }",
"public function update($path);",
"public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }",
"public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }",
"public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }",
"public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}",
"public function updateStream($path, $resource, Config $config)\n {\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }",
"public function update($data) {}",
"public function update($data) {}",
"public function putStream($resource);",
"public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }",
"public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }",
"public function update($entity);",
"public function update($entity);",
"public function setResource($resource);",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }",
"public function isUpdateResource();",
"public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }",
"public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }",
"public function store($data, Resource $resource);",
"public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }",
"public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }",
"public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }",
"public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }",
"public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }",
"public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }",
"public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }",
"public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }",
"public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }",
"public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }",
"public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }",
"public function update(Qstore $request, $id)\n {\n //\n }",
"public function update(IEntity $entity);",
"protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }",
"public function update($request, $id);",
"function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}",
"public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }",
"public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }",
"protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }",
"abstract public function put($data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function testUpdateSupplierUsingPUT()\n {\n }",
"public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }",
"public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }",
"public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }",
"public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }",
"public abstract function update($object);",
"public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }",
"public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }",
"public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }",
"public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }",
"public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }",
"public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }",
"public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }",
"public function update($entity)\n {\n \n }",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }",
"public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }",
"public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }",
"public function update($id, $input);",
"public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }",
"public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}",
"public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }",
"public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }",
"public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }",
"public function update($id);",
"public function update($id);",
"private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }",
"public function put($path, $data = null);",
"public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }",
"public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }",
"public function update(Entity $entity);",
"public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }",
"public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}",
"public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }",
"public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }",
"public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }",
"public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }",
"public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }"
] | [
"0.7425105",
"0.70612276",
"0.70558053",
"0.6896673",
"0.6582159",
"0.64491373",
"0.6346954",
"0.62114537",
"0.6145042",
"0.6119944",
"0.61128503",
"0.6099993",
"0.6087866",
"0.6052593",
"0.6018941",
"0.60060275",
"0.59715486",
"0.5946516",
"0.59400934",
"0.59377414",
"0.5890722",
"0.5860816",
"0.5855127",
"0.5855127",
"0.58513457",
"0.5815068",
"0.5806887",
"0.57525045",
"0.57525045",
"0.57337505",
"0.5723295",
"0.5714311",
"0.5694472",
"0.5691319",
"0.56879413",
"0.5669989",
"0.56565005",
"0.56505877",
"0.5646085",
"0.5636683",
"0.5633498",
"0.5633378",
"0.5632906",
"0.5628826",
"0.56196684",
"0.5609126",
"0.5601397",
"0.55944353",
"0.5582592",
"0.5581908",
"0.55813426",
"0.5575312",
"0.55717176",
"0.55661047",
"0.55624634",
"0.55614686",
"0.55608666",
"0.55599797",
"0.55599797",
"0.55599797",
"0.55599797",
"0.55599797",
"0.55573726",
"0.5556878",
"0.5554201",
"0.5553069",
"0.55530256",
"0.5543788",
"0.55435944",
"0.55412996",
"0.55393505",
"0.55368495",
"0.5535236",
"0.5534954",
"0.55237365",
"0.5520468",
"0.55163723",
"0.55125296",
"0.5511168",
"0.5508345",
"0.55072427",
"0.5502385",
"0.5502337",
"0.5501029",
"0.54995877",
"0.54979175",
"0.54949397",
"0.54949397",
"0.54946727",
"0.5494196",
"0.54941916",
"0.54925025",
"0.5491807",
"0.5483321",
"0.5479606",
"0.5479408",
"0.5478678",
"0.54667485",
"0.5463411",
"0.5460588",
"0.5458525"
] | 0.0 | -1 |
Remove the specified resource from storage. | public function destroy($id)
{
$daleteData = Supplier::find($id);
$daleteData->delete();
return redirect()->back();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }",
"public function destroy(Resource $resource)\n {\n //\n }",
"public function removeResource($resourceID)\n\t\t{\n\t\t}",
"public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }",
"public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }",
"public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }",
"public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }",
"protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }",
"public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }",
"public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }",
"public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }",
"public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}",
"public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}",
"public function delete(): void\n {\n unlink($this->getPath());\n }",
"public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }",
"public function remove($path);",
"function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}",
"public function delete(): void\n {\n unlink($this->path);\n }",
"private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }",
"public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }",
"public function remove() {}",
"public function remove() {}",
"public function remove();",
"public function remove();",
"public function remove();",
"public function remove();",
"function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}",
"public function deleteImage(){\n\n\n Storage::delete($this->image);\n }",
"public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }",
"public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}",
"public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }",
"public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }",
"public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}",
"public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }",
"public function deleteImage(){\n \tStorage::delete($this->image);\n }",
"public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }",
"public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }",
"public function destroy($id)\n {\n Myfile::find($id)->delete();\n }",
"public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }",
"public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }",
"public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }",
"public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }",
"public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }",
"public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }",
"public function delete($path);",
"public function delete($path);",
"public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }",
"public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }",
"public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }",
"public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }",
"public function delete($path, $data = null);",
"public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }",
"public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }",
"public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }",
"public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }",
"public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }",
"public function del($path){\n\t\treturn $this->remove($path);\n\t}",
"public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }",
"public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}",
"public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }",
"public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }",
"public function revoke($resource, $permission = null);",
"public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }",
"function delete($path);",
"public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}",
"public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }",
"public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }",
"public function remove($filePath){\n return Storage::delete($filePath);\n }",
"public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }",
"public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }",
"public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }",
"public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }",
"function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }",
"public function remove($id);",
"public function remove($id);",
"public function deleted(Storage $storage)\n {\n //\n }",
"public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }",
"public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }",
"public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }",
"public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }",
"function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}",
"public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }",
"public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}",
"public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }",
"public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }"
] | [
"0.6672584",
"0.6659381",
"0.6635911",
"0.6632799",
"0.6626075",
"0.65424126",
"0.65416265",
"0.64648265",
"0.62882507",
"0.6175931",
"0.6129922",
"0.60893893",
"0.6054415",
"0.60428125",
"0.60064924",
"0.59337646",
"0.5930772",
"0.59199584",
"0.5919811",
"0.5904504",
"0.5897263",
"0.58962846",
"0.58951396",
"0.58951396",
"0.58951396",
"0.58951396",
"0.5880124",
"0.58690923",
"0.5863659",
"0.5809161",
"0.57735413",
"0.5760811",
"0.5753559",
"0.57492644",
"0.5741712",
"0.57334286",
"0.5726379",
"0.57144034",
"0.57096",
"0.5707689",
"0.5705895",
"0.5705634",
"0.5703902",
"0.5696585",
"0.5684331",
"0.5684331",
"0.56780374",
"0.5677111",
"0.5657287",
"0.5648262",
"0.5648085",
"0.5648012",
"0.5640759",
"0.5637738",
"0.5629985",
"0.5619264",
"0.56167465",
"0.5606877",
"0.56021434",
"0.5601949",
"0.55992156",
"0.5598557",
"0.55897516",
"0.5581397",
"0.5566926",
"0.5566796",
"0.55642897",
"0.55641",
"0.5556583",
"0.5556536",
"0.5550097",
"0.5543172",
"0.55422723",
"0.5540013",
"0.5540013",
"0.55371785",
"0.55365825",
"0.55300397",
"0.552969",
"0.55275744",
"0.55272335",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.5525997",
"0.5525624",
"0.5523911",
"0.5521122",
"0.5517412"
] | 0.0 | -1 |
get questions of the profession | public function profQuestions($id)
{
$response = Profession::with('questions')->findOrFail($id);
return response()->json($response, 200);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getQuestions()\n {\n return DB::table('questionbank_quizzes')\n ->where('quize_id','=',$this->id)\n ->orderBy('subject_id')\n ->get();\n }",
"function getQuestions()\n\t{\n\t\treturn $this->aQuestion;\n\t}",
"public function get_research_questions()\n\t{\n\t\treturn $this->research_questions;\n\t}",
"public function getQuestions()\n {\n return $this->questions;\n }",
"public function getQuestions()\n {\n return $this->questions;\n }",
"public function getAnswers();",
"function ipal_get_questions(){ \r\n \r\n\tglobal $ipal;\r\n\tglobal $DB;\r\n\tglobal $CFG;\r\n\t$q='';\t\r\n\t$pagearray2=array();\r\n\t // is there an quiz associated with an ipal?\r\n//\t$ipal_quiz=$DB->get_record('ipal_quiz',array('ipal_id'=>$ipal->id));\r\n\t\r\n\t// get quiz and put it into an array\r\n\t$quiz=$DB->get_record('ipal',array('id'=>$ipal->id));\r\n\t\r\n\t//Get the question ids\r\n\t$questions=explode(\",\",$quiz->questions);\r\n\t\r\n\t//get the questions and stuff them into an array\r\n\t\tforeach($questions as $q){\t\r\n\t\t\t\r\n\t\t $aquestions=$DB->get_record('question',array('id'=>$q));\r\n\t\t if(isset($aquestions->questiontext)){\r\n\t\t $pagearray2[]=array('id'=>$q, 'question'=>strip_tags($aquestions->questiontext), 'answers'=>ipal_get_answers($q));\r\n\t\t\t\t \r\n\t\t }\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t}\r\n \r\n\treturn($pagearray2);\r\n\t}",
"public function showQuestions()\n\t{\n\t\t$program = $this->schoolService->findProgramById($this->profile->program_id);\n\t\t$data = array(\n\t\t\t'answers' => $this->profileService->getAnswersForProfile($this->profile)->toArray(),\n\t\t\t'profile' => $this->profile,\n\t\t\t'program' => $program,\n\t\t\t'questionMax' => Config::get('profile.questions.max'),\n\t\t\t'questions' => $this->profileService->getQuestionsForType($program->type_id)->lists('label', 'id')\n\t\t);\n\n\t\treturn new QuestionView($data);\n\t}",
"public function get_questions() {\n return $this->questions;\n }",
"public function getQuestions() {\r\n\t\treturn $this->questions;\r\n\t}",
"function getQuestions($extra = null) {\n\t\treturn $this->getQuestionsRelatedByQuizId($extra);\n\t}",
"public function getProfessionList(){\n return $this->_get(20);\n }",
"public function getQuestions() {\r\n\t\t\treturn $this->_arrQuestions;\r\n\t\t}",
"public function getPreDefinedQuestions()\n {\n return [\n \"1\" => \"Select a Security Question\",\n \"2\" => \"What was your childhood nickname?\",\n \"3\" => \"What is the name of your favorite childhood friend?\",\n \"4\" => \"What was the name of your first stuffed animal?\",\n \"5\" => \"Where were you when you had your first kiss?\",\n \"6\" => \"What is the name of the company of your first job?\",\n \"7\" => \"What was your favorite place to visit as a child?\",\n \"8\" => \"What was your dream job as a child?\",\n \"9\" => \"What is your preferred musical genre?\",\n \"10\" => \"What is your favorite team?\",\n \"11\" => \"What is your father\\\"s middle name?\"\n ];\n }",
"function showQuestions()\n\t{\n\t\tif($this->TotalQuestions > 0)\n\t\t{#be certain there are questions\n\t\t\tforeach($this->aQuestion as $question)\n\t\t\t{#print data for each \n\t\t\t\techo $question->Number . ') '; # We're using new Number property instead of id - v2\n\t\t\t\techo $question->Text . ' ';\n\t\t\t\tif($question->Description != ''){echo '(' . $question->Description . ')';}\n\t\t\t\techo '<br />';\n\t\t\t\t$question->showAnswers() . '<br />'; #display array of answer objects\n\t\t\t}\n\t\t}else{\n\t\t\techo 'There are currently no questions for this survey.';\t\n\t\t}\n\t}",
"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 }",
"public function getQuestion()\n {\n // TODO: Implement getQuestion() method.\n }",
"function ipal_get_questions_student($qid){\r\n\r\n global $ipal;\r\n global $DB;\r\n global $CFG;\r\n\t\t$q='';\r\n\t\t$pagearray2=array();\r\n\t\t\r\n $aquestions=$DB->get_record('question',array('id'=>$qid));\r\n\t\t\tif($aquestions->questiontext != \"\"){ \r\n\r\n\t$pagearray2[]=array('id'=>$qid, 'question'=>$aquestions->questiontext, 'answers'=>ipal_get_answers_student($qid));\r\n\t\t\t\t\t\t\t}\r\n return($pagearray2);\r\n}",
"function list_questions($objet) {\n\t// Filter by state if exists\n\t\t$condition .= (!empty($objet['state'])) ? ' AND state = '.$objet['state'] : '' ;\n\t// Filter by municipality if exists\n\t\t$condition .= (!empty($objet['municipality'])) ? ' AND municipality = \\''.$objet['municipality'].'\\'' : '' ;\n\t\t\n\t\t$sql = \"SELECT\n\t\t\t\t\t*\n\t\t\t\tFROM\n\t\t\t\t\tquestions\n\t\t\t\tWHERE\n\t\t\t\t\t1 = 1\".\n\t\t\t\t$condition;\n\t\t// return $sql;\n\t\t$result = $this -> query_array($sql);\n\t\t\n\t\treturn $result;\n\t}",
"public function displayQuestions() {\n $listQuestions = array();\n $sql = 'SELECT `id`, `question`, `picture` FROM `' . self::PREFIX . 'question`';\n $result = $this->db->query($sql);\n $listQuestions = $result->fetchAll(PDO::FETCH_OBJ);\n return $listQuestions;\n }",
"public function question()\n {\n return $this->hasMany('App\\Models\\Question', 'quizzes_id');\n }",
"function getQuestions() { \n\ttry {\n\t\t$questions = ORM::for_table('questions')->find_many();\n\t\tif (!count($questions)) { \n\t\t\treturn 0;\n\t\t}\n\t\t$theQuestions = array();\n\t\tforeach ($questions as $question) { \n\t\t\t$theQuestion = array();\n\t\t\t$theQuestion['id'] = $question->id;\n\t\t\t$theQuestion['text'] = $question->text;\n\t\t\t$theQuestion['answer1'] = $question->answer1;\n\t\t\t$theQuestion['answer2'] = $question->answer2;\n\t\t\t$theQuestions[] = $theQuestion;\n\t\t}\n\t\treturn $theQuestions;\n\t} catch (Exception $e) { \n\t\treturn 0;\n\t}\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 }",
"private function extractQuestions(){\n $this->selectQuestions();\n $num=mysqli_num_rows($this->arrResultQuestions);\n for($i=0; $i<$num; $i++):\n $row=mysqli_fetch_object($this->arrResultQuestions);\n $misc=new misc();\n $fromWho=$misc->singleSelection('username', 'users', 'user_id', '=', $row->user_id);\n ?>\n <article class=\"homePageQuestions homePageArticle<?php echo $i; ?>\">\n <h3 class=\"homePageQuestionHeading\"><a href=\"?questionBody=<?php echo $row->post_id; ?>\"><?php echo $row->name; ?></a></h3>\n <span class=\"homePageQuestionAddFrom\"><span class=\"glyphicon glyphicon-user\"></span><a href=\"?user=<?php echo $row->user_id; ?>\"><?php echo $fromWho; ?></a></span>\n <span class=\"homePageQuestionAddTime\"><span class=\"glyphicon glyphicon-time\"></span><?php echo date('d.m.Y в H:i', $row->timeadded); ?></span>\n <span class=\"homePageQuestionAddTime\"><span class=\"glyphicon glyphicon-tag\"></span><?php echo $this->selectCategory($row->cat_id); ?></span>\n <span class=\"homePageQuestionVisits\"><?php echo $row->visits ?> Показвания</span>\n <?php\n $this->showingQuestionsFooter($row->lastanswered, $row->lastanswer, $row->post_id);\n ?>\n </article>\n <?php\n endfor;\n }",
"public function get_questions_extraction()\n\t{\n\t\treturn $this->questions_extraction;\n\t}",
"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 }",
"public function questions()\n {\n return $this->hasMany(Question::class);\n }",
"public function questions()\n {\n return $this->hasMany(Question::class);\n }",
"public function questions()\n {\n \treturn $this->hasMany(Question::class);\n }",
"public function questions() {\n $questions = DB::select('select Question, AnswerType, rowid from Questions WHERE AnswerType<>\"mcq-radio\" AND AnswerType<>\"mcq-dropDown\";');\n\n // Obtain a list of all questions that are mcq\n $MCQ = DB::select('select Question, AnswerType, rowid from Questions WHERE AnswerType=\"mcq-radio\" OR AnswerType=\"mcq-dropDown\";');\n $mcqOptions = DB::select('select Qid, mcqOption from mcqOptions');\n\n return view('userResponseArea', compact(['questions','MCQ', 'mcqOptions']));\n }",
"public function getQuestions()\n {\n if (!empty($this->questionsMetadata)) {\n foreach ($this->questions as $question) {\n /** @var Question $question */\n $data = $question->get_data();\n $metadata = $data->get_metadata();\n\n if (!isset($metadata)) {\n $qtype = $data->get_type();\n // HACK: longtextV2 doesn't have a corresponding entity, so force it to use the similar longtext one\n if ($qtype === 'longtextV2') {\n $qtype = 'longtext';\n }\n $metadataClass = '\\\\LearnosityQti\\\\Entities\\\\QuestionTypes\\\\'.$qtype.'_metadata';\n $metadata = new $metadataClass();\n $data->set_metadata($metadata);\n }\n\n $this->populateQuestionMetadata($metadata, $this->questionsMetadata);\n }\n }\n return array_merge(array_values($this->questions), $this->getRubricQuestions());\n }",
"protected function question_where(){\n return $array = array('exam_id'=>trim($this->input->post('exam_id')), \n 'category_id'=>trim($this->input->post('category_id')),\n 'body_id'=>trim($this->input->post('body_id')),\n 'subject_id'=>trim($this->input->post('subject_id')),\n 'period_id'=>trim($this->input->post('period_id')),\n 'question_number'=>trim($this->input->post('question_number')),\n );\n }",
"public function questions()\n {\n return $this->hasMany(\\App\\Question::class);\n }",
"function getQuestions($type = NULL){\n\t\trequire('quizrooDB.php');\n\t\t$query = sprintf(\"SELECT question_id FROM q_questions WHERE fk_quiz_id = %d\", $this->quiz_id);\n\t\t$getQuery = mysql_query($query, $quizroo) or die(mysql_error());\n\t\t$row_getQuery = mysql_fetch_assoc($getQuery);\n\t\t$totalRows_getQuery = mysql_num_rows($getQuery);\n\t\t\n\t\tif($type == \"count\"){\n\t\t\t// return the count\n\t\t\treturn $totalRows_getQuery;\n\t\t}else{\n\t\t\t// return the list\n\t\t\tif($totalRows_getQuery != 0){\n\t\t\t\t$results = \"\";\n\t\t\t\tdo{\n\t\t\t\t\t$results .= $row_getQuery['question_id'].\",\";\n\t\t\t\t}while($row_getQuery = mysql_fetch_assoc($getQuery));\n\t\t\t\treturn substr($results, 0, -1);\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}",
"public function getSalespersonAllQuestions() {\n return $this->_salespersonDatasource->getSalespersonAllQuestions();\n }",
"public function getQuestions() {\n\t\t$fields = $this->Fields();\n\t\t// remove EditableFormStep\n\t\t$fields = $fields->exclude('ClassName', 'EditableFormStep');\n\t\t// return fields\n\t\treturn $fields;\n\t}",
"function getQuestions(){\r\n\t\t$this->db->select('id,question,question_type');\r\n\t\t$this->db->from(TBL_MST_QUESTIONS);\r\n\t\t$this->db->where(array('is_active'=>true));\r\n\t\t$recordSet = $this->db->get();\r\n\t\t$data=$recordSet->result() ;\r\n\t\treturn $data;\r\n\t}",
"public function getAllQuiz(){\n\t\treturn $this->db->getAllQuiz();\n\t}",
"public function getquestion()\r\n {\r\n \r\n $con = new Connection();\r\n $conn = $con->getConnection();\r\n $ques = array();\r\n $i = 0;\r\n \r\n $query = \"SELECT `id`,`question_id`, `exam_id`,`subject_id`, `node_id`,`question`,`created_date` FROM `question`\";\r\n $result = mysqli_query($conn, $query);\r\n if (mysqli_num_rows($result) > 0) {\r\n while ($row = mysqli_fetch_assoc($result)) {\r\n $q = new question();\r\n //$ea->setId( $row ['id']);\r\n $q->setQuestion_id( $row ['question_id']);\r\n $q->setExam_id( $row ['exam_id']);\r\n $q->setSubject_id( $row ['subject_id']);\r\n $q->setNode_id( $row ['node_id']);\r\n $q->setQuestion( $row ['question']);\r\n \r\n }\r\n \r\n \r\n $ques[$i ++] = array(\r\n \"id\" => $row[\"question_id\"],\r\n \"ques\" => $q\r\n );\r\n \r\n }\r\n return $ques;\r\n \r\n }",
"function showQuestions()\n {\n if($this->TotalQuestions > 0)\n {#be certain there are questions\n foreach($this->aQuestion as $question)\n {#print data for each \n\n echo '\n\n <div class=\"panel panel-primary\">\n <div class=\"panel-heading\">\n <h3 class=\"panel-title\">' . $question->Text . '</h3>\n </div>\n <div class=\"panel-body\">\n <p>' . $question->Description . '</p>\n ' . $question->showAnswers() . ' \n </div>\n </div>\n\n ';\n\n }\n }else{\n echo \"There are currently no questions for this survey.\";\t\n } \n\t}",
"public function questions ( ) {\n $hooks = hooks::all();\n\n $title = \"Questions\";\n return view('pages.questions')->with([\n 'title' => $title,\n 'hooks' => $hooks\n ]);\n }",
"function getQuestionListByAssignedExpert($user_id) {\n\t$html = \"\";\n\n\tif (isUserExpert($user_id)){\n\t\t// User is expert, do query\n\n\t\t// We have to check the question_has_experts table contains this user_id\n\t\t$assigned_questions = getAssignedQuestions($user_id);\n\n\t\t// TODO Next step is to look up the project_ids for\n\t\t// every corresponding question in the assigned question list\n\t\t// Should return associative array with\n\t\t// TODO This is going to take time to make\n\n\t} else{\n\t\t// User is not an expert, return false or something.\n\t\texit();\n\t}\n\n\treturn $html;\n\n}",
"public function showResults(){\n $this->extractQuestions();\n }",
"public function questions()\n {\n return $this->hasMany('App\\Question');\n }",
"public function questions()\n {\n return $this->hasMany('App\\Question');\n }",
"public function indiquerChoix()\n {\n $categories = Categorie::all();\n $categoriesAge = CategorieAge::all();\n $ambiance = Ambiance::all();\n\n $questions = array('categoriesAge'=>$categoriesAge,'categories'=>$categories, 'ambiances'=>$ambiance);\n return json_encode($questions);\n }",
"public function getProfession()\n {\n return $this->profession;\n }",
"function get_Questions()\n\t{\n\t\ttry\n\t\t{\n\t\t\t$db = DB::getConnection();\n\t\t\t$st = $db->prepare( 'SELECT * FROM questions' );\n\t\t\t$st->execute( array( ) );\n\t\t}\n\t\tcatch( PDOException $e ) { exit( 'PDO error ' . $e->getMessage() ); }\n\n\t\t$arr = array();\n\t\twhile( $row = $st->fetch() )\n\t\t{\n\t\t\t$arr[] = new Question( $row['id'], $row['question']);\n\t\t}\n\n\t\treturn $arr;\n\t}",
"function getQuestionsQuery(Query $q = null) {\n\t\treturn $this->getForeignObjectsQuery('question', 'quiz_id','id', $q);\n\t}",
"public function getQuestionsAndAnswers()\n {\n $categoryId = $this->getRequest()->getParam('id', $this->getData('id'));\n if (!$categoryId) {\n $categoryId = Mage::getModel('faq/category')->getCollection()->getFirstItem()->getId();\n }\n $category = Mage::getModel('faq/category')->load($categoryId);\n $collection = $category->getFaqCollection();\n $collection->getSelect()->order('position ASC');\n return $collection;\n }",
"public function hasProfession(){\n return $this->_has(6);\n }",
"public function getAvailableProfessions() : array\n {\n return $this->professions;\n }",
"public static function getAllQuestionsAndAnswers(){\n $returnArray = array(\n 'Result' => 1,\n 'Reason' => \"\",\n 'QuestionResponses' => array()\n );\n\n $questionObjects = question::getAllQuestions();\n\n if(count($questionObjects) > 0){\n $responsesArray = self::buildQuestionsAndAnswersArray_Admin($questionObjects);\n $returnArray['QuestionResponses'] = $responsesArray;\n }\n else{\n $returnArray['Result'] = 0;\n $returnArray['Reason'] = \"No questions were found\";\n }\n\n return $returnArray;\n }",
"public function getVoterMeetingQuestions()\n {\n return $this->hasMany(VoterMeetingQuestion::className(), ['meeting_voter_id' => 'id']);\n }",
"private function _Questions ( ) {\n\t\t$Config = $this->Get ( 'Config' );\n\t\t$quests = $Config['questions'];\n\t\t$groups = $Config['question_groups'];\n\t\tforeach ( $groups as $g => $group ) {\n\t\t\t$Groups[$group] = new stdClass();\n\t\t\t$Groups[$group]->Label = $Config['question_group_labels'][$g];\n\t\t\tforeach ( $quests as $q => $quest ) {\n\t\t\t\tif ( $Config['question_group'][$q] != $g ) continue;\n\t\t\t\t$Groups[$group]->Questions[$quest] = new stdClass();\n\t\t\t\t$Groups[$group]->Questions[$quest]->Label = $Config['question_labels'][$q];\n\t\t\t\t$Groups[$group]->Questions[$quest]->Type = $Config['question_types'][$q];\n\t\t\t\t$Groups[$group]->Questions[$quest]->Field = $Config['question_fields'][$q];\n\t\t\t\t$Groups[$group]->Questions[$quest]->Social = $Config['question_social'][$q];\n\t\t\t\t$Groups[$group]->Questions[$quest]->Display = $Config['question_display'][$q];\n\t\t\t\tif ( $Config['question_options'][$q] )\n\t\t\t\t\t$Groups[$group]->Questions[$quest]->Options = explode ( '|', $Config['question_options'][$q] );\n\t\t\t}\n\t\t\tksort ( $Groups[$group]->Questions );\n\t\t}\n\t\tksort ( $Groups );\n\t\treturn ( $Groups );\n\t}",
"public function index(Quiz $quiz)\n {\n return $quiz->questions;\n }",
"public function getquestionbyidoption(){\n $select = $this->_db->select()\n\t ->from(array('CQ'=>CLAIM_QUESTIONS), array('*'))\n\t\t\t ->where(\"CQ.sub_question='\".$this->getData['question_id'].\"'\")\n\t\t\t ->where(\"CQ.sub_question_option='\".$this->getData['sub_question_option'].\"'\")\n\t\t\t ->where(\"CQ.status='Y'\"); \n\t$result = $this->getAdapter()->fetchAll($select);\n return $result;\n }",
"public function questions() {\n\n\t\t# Author has many Question\n return $this->hasMany('Question');\n \n }",
"public function questions()\n {\n return $this->hasMany(Question::class,'inquirer_id','id');\n }",
"private function question()\n\t{\n\t\t$this->qns['questionnaire']['questionnairecategories_id'] = $this->allinputs['questioncat'];\n\t\t$this->qns['questionnaire']['questionnairesubcategories_id'] = $this->allinputs['questionsubcat'];\n\t\t$this->qns['questionnaire']['label'] = $this->allinputs['question_label'];\n\n\n\t\t$this->qns['questionnaire']['question'] = $this->allinputs['question'];\n\t\t$this->qns['questionnaire']['has_sub_question'] = $this->allinputs['subquestion'];\n\n\t\tif( $this->qns['questionnaire']['has_sub_question'] == 0 )\n\t\t{\n\t\t\t$this->qns['answers']['answer_type'] = $this->allinputs['optiontype'];\n\t\t}\n\n\t\t$this->qns['questionnaire']['active'] = 1;\n\n\t\tif( $this->qns['questionnaire']['has_sub_question'] == 0 ){\n\t\t\t//This code must be skipped if sub_question is 1\n\t\t\t$optionCounter = 0;\n\t\t\tforeach ($this->allinputs as $key => $value) {\n\n\t\t\t\tif( str_is('option_*', $key) ){\n\t\t\t\t\t$optionCounter++;\n\t\t\t\t\t$this->qns['answers'][$optionCounter] = ( $this->qns['answers']['answer_type'] == 'opentext' ) ? 'Offered answer text' : $value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public function getQuestions()\n {\n if (isset($_GET[\"user_id\"]) && isset($_GET[\"action_id\"]) && isset($_GET[\"attempted\"]) && isset($_GET[\"oq\"] ) ) {\n\n $user_id = $this->input->get('user_id');\n $action_id = $this->input->get('action_id');\n $attempted = $this->input->get('attempted');\n $oq = $this->input->get('oq');\n\n $questions = $this->Question_model->getQuestions($user_id, $action_id, $attempted, $oq);\n\n //var_dump($questions);\n\n foreach ($questions as $key => $question) {\n\n $questions[$key]['answer_id'] = null;\n \n if($answer_question = $this->Answer_model->getAnswer($question['question_id'])){\n if ($answer_question['isRecorded'] == 1) {\n $questions[$key]['answer_id'] = $answer_question['answer_id'];\n }\n }\n\n if ($user_id == \"142566\") $questions[$key]['answer_id'] = 18;\n\n $questions[$key]['listen_before'] = false;\n if($this->Question_model->checkUserQuestion($user_id, $question['question_id']))\n $questions[$key]['listen_before'] = true;\n \n $questions[$key]['like'] = false;\n $questions[$key]['dislike'] = false;\n $questions[$key]['report'] = false;\n $questions[$key]['pref'] = false;\n \n if($response = $this->Question_model->checkUserResponse($user_id, $question['question_id'])) {\n $questions[$key]['pref'] = true;\n $questions[$key][$response['response']] = false;\n }\n }\n echo json_encode(array('result' => array('error' => false, 'length' => sizeof($questions), 'questions' => $questions)));\n return;\n }\n else echo json_encode(array('result' => array('error' => true, 'message' => 'wrong params')));\n }",
"public function getQuestionlab()\n {\n return $this->questionlab;\n }",
"public function getQuestionsEntities() : array;",
"public function hasProfession(){\n return $this->_has(20);\n }",
"function getQuestionListByProject($project_id) {\n\t$html = \"\";\n\t$results = DB::query(\"SELECT * FROM question WHERE question_project_id = \" . $project_id . \" \");\n\n\n\t// TODO build HTML according to screens\n\tforeach ($results as $row) {\n\t\t$question_title = $row[\"question_title\"];\n\t\t$html .= \"<p>\" . $question_title . \"</p>\";\n\t}\n\techo $html;\n}",
"function getQuestions($grouping='', $sorting='sorting', $randomize=0) {\n\t\tif(!$this->_questions) {\n\t\t\t$this->_questions = tx_wecassessment_question::findAll($this->getPID(), '', $grouping, $sorting, $randomize);\n\t\t} \n\n\t\treturn $this->_questions;\n\t}",
"public function get_question_list() {\n\t\ttry {\n\t\t\t$list = $this->soap->GetQuestionResultInfoList();\n\t\t} catch(SoapFault $e) {\n\t\t\tthrow new QMWiseException($e);\n\t\t}\n\t\tif(!is_array($list->QuestionResultInfoList->QuestionResultInfo)) return array($list->QuestionResultInfoList->QuestionResultInfo);\n\t\treturn $list->QuestionResultInfoList->QuestionResultInfo;\n\t}",
"public function questions()\n\t{\n\t\treturn $this->belongsTo('App\\Question');\n\t}",
"private function questionList()\n {\n \t$requiredQuestions = [];\n\n \tfor ($x = 1; $x <= count($this->questions); $x++) {\n \t\t$requiredQuestions[ config('constants.questionInputPrefix') . $x] = 'required';\n \t}\n\n \treturn $requiredQuestions;\n }",
"public function get_question() {\n\t\t\treturn $this->question;\n\t\t}",
"public function question()\n {\n $question = \\App\\Question::orderby('created_at', 'desc')->get();\n return view('question.get', [\n 'questions' => $question,\n ]);\n }",
"public function questions()\n {\n return $this->hasMany('App\\\\SurveyQuestion','survey_id');\n }",
"public function question()\n\t{\n\t\tif (getRole() == \"student\") {\n return view('permission');\n }elseif(getRole() == \"administrator\")\n {\n \t$inst_arr = $this->institution->getInstitutions();\n\t\t$subjects = $this->subject->getSubject();\n\t\t$category = $this->category->getCategory();\n\t\t$questions = $this->question->getQuestions();\n\t\t$questions_type=$this->question_type->getQuestionTypes();\n\t\t$passages=$this->passage->getPassage();\n\t\t$lessons = $this->lesson->getLesson();\n\t\t$list=Question::join('question_type','questions.question_type_id','=','question_type.id')\n\t\t\t\t->leftjoin('passage','questions.passage_id','=','passage.id')\n\t\t\t\t//->leftjoin('institution','questions.institute_id','=','institution.id')\n\t\t\t\t->select('questions.id as qid','questions.title as question_title','passage.title as passage_title','question_type.qst_type_text as question_type','questions.status as status')\n\t\t\t\t->orderby('qid')\n\t\t\t\t//->groupBy('institution')\n\t\t\t\t->get();\n\t\t//dd($list);\n\t\t\t}else{\n\t\t\t\t$inst_arr = $this->institution->getInstitutions();\n\t\t$subjects = $this->subject->getSubject();\n\t\t$category = $this->category->getCategory();\n\t\t$questions = $this->question->getQuestions();\n\t\t$questions_type=$this->question_type->getQuestionTypes();\n\t\t$passages=$this->passage->getPassage();\n\t\t$lessons = $this->lesson->getLesson();\n\t\t\t\t$list=Question::join('question_type','questions.question_type_id','=','question_type.id')\n\t\t\t\t->where(\"questions.institute_id\", Auth::user()->institution_id)\n\t\t\t\t->leftjoin('passage','questions.passage_id','=','passage.id')\n\t\t\t\t//->leftjoin('institution','questions.institute_id','=','institution.id')\n\t\t\t\t->select('questions.id as qid','questions.title as question_title','passage.title as passage_title','question_type.qst_type_text as question_type','questions.status as status')\n\t\t\t\t->orderby('qid')\n \t\t\t\t->get();\n\t\t//dd($list);\n\t\t\t\t \n\n\t\t\t}\n\t\treturn view('resources::question.list',compact('inst_arr', 'questions','subjects','category','lessons','questions_type','passages','list'));\n\t\n\t}",
"public function getQuestion() {\n return $this->question;\n }",
"public function getFaqQuestion () {\n\t$preValue = $this->preGetValue(\"faqQuestion\"); \n\tif($preValue !== null && !\\Pimcore::inAdmin()) { \n\t\treturn $preValue;\n\t}\n\t$data = $this->faqQuestion;\n\treturn $data;\n}",
"function get_question() {\n $ci = & get_instance();\n //load databse library\n $ci->load->database();\n //get data from database\n $ci->db->select(\"*\");\n $ci->db->from('tbl_question_master');\n $query = $ci->db->get();\n if ($query->num_rows() > 0) {\n $result = $query->result();\n return $result;\n } else {\n return false;\n }\n }",
"public function getRecommendations();",
"public function getQuestion()\n {\n return $this->questionModel;\n }",
"public function readque() {\n $que = DB::table('catagories')->get();\n return view('testquiz')->with('catagory',$que);\n }",
"public static function getChallenges($session) \n {\n \n KorisnikModel::updateWrapper($session->get('user')->summonerName);\n \n $uQModel = new UserQuestModel();\n $qModel = new QuestModel();\n $uQ = $uQModel->where('summonerName', $session->get('user')->summonerName)->findAll();\n $poroUser = count($uQModel->where('summonerName', $session->get('user')->summonerName)->where('completed', 1)->findAll());\n $poroTotal = count($qModel->findAll());\n\n $data = [\n 'poroUser' => $poroUser,\n 'poroTotal' => $poroTotal,\n 'quests' => []\n ];\n \n foreach ($uQ as $userQuest) {\n $quest = $qModel->find($userQuest->questId);\n $dataQuest = [\n 'id' => $userQuest->questId,\n 'title' => $quest->title,\n 'description' => $quest->description,\n 'image' => $quest->image,\n 'completed' => $userQuest->completed,\n 'attributes' => QuestAttributeModel::getAttributes($quest->questId)\n ];\n \n \n $questRequired = null;\n $preReqSatisfied = true;\n foreach($dataQuest['attributes'] as $atr){\n if($atr->attributeKey == 'Prerequisite Id'){\n $questRequired = intval($atr->attributeValue);\n $preReQuest = $uQModel->where('questId', $questRequired)->where('summonerName',$session->get('user')->summonerName)->find();\n if($preReQuest[0]->completed == 0){\n $preReqSatisfied = false;\n break;\n } \n } \n }\n \n if($preReqSatisfied == false){ \n continue;\n }\n // $dataQuest['attributes'];\n array_push($data['quests'], $dataQuest);\n }\n return $data;\n }",
"public function getQuestions()\r\n{\r\n $query_string = \"SELECT questionid, question, choice1, choice2, choice3, choice4, ans \";\r\n $query_string .= \"FROM questions \";\r\n $query_string .= \"WHERE quizid = :quizid\";\r\n\r\n return $query_string;\r\n}",
"function question()\r\n {\r\n return $this->Question;\r\n }",
"public function index()\n {\n $exams = Exam::all();\n $difficultyLevels = Difficulty::all();\n $exam1 = Exam::with('questions')->get();\n $questions = Question::with('option')->get();\n // dd($difficultyLevels);\n return view('add-question.index', compact('questions'));\n }",
"public function getLectureList() {\n \n $lecturer = \\DB::table('staffs')->where('designation','Teacher')\n ->orderby(\"Name\")\n ->pluck('name', 'emp_number');\n return $lecturer;\n \n \n }",
"public function optionalMode(): array\n { \n $rows = $this->conn()\n ->run(\"SELECT \n questions.id, \n questions.question, \n options.content, \n options.is_correct \n FROM questions \n RIGHT JOIN options \n ON options.question_id = questions.id \n LIMIT 40\")\n ->fetchAll(\\PDO::FETCH_ASSOC);\n \n $questions = [];\n\n foreach($rows as $row){ \n $questions[$row['id']]['question'] = $row['question'];\n $questions[$row['id']]['options'][] = [\n 'content' => $row['content'],\n 'is_correct' => $row['is_correct'],\n ];\n if($row['is_correct']){\n $questions[$row['id']]['answer'] = $row['content'];\n }\n }\n\n $response['data'] = array_values($questions);\n $response['total'] = count($response['data']);\n\n return $response; \n\n }",
"public function getQuestion()\r\n{\r\n $query_string = \"SELECT questionid, question, choice1, choice2, choice3, choice4, ans \";\r\n $query_string .= \"FROM questions \";\r\n $query_string .= \"WHERE questionid = :questionid\";\r\n\r\n return $query_string;\r\n}",
"public function getQualifications() {\n\t\t\n\t\t// In mancanza di un Model recupero le istanze della tabella intermedia CppQualifiations\n\t\t$QualificationsPivot = DB::table ( 'CppQualification' )->where ( 'id_cpp', $this->getIdCpp () )->get ();\n\t\t\n\t\t// Creo un array\n\t\t$temp = array ();\n\t\t$i = 0;\n\t\t\n\t\t// Ciclo sulle istanze di Qualifications e recupero il codice e la descrizione inserendoli in un array da passare al controller\n\t\tforeach ( $QualificationsPivot as $Qualification ) {\n\t\t\t$practictioner_qual = DB::table ( 'QualificationCode' )->where ( 'Code', $Qualification->Code )->first ();\n\t\t\t\n\t\t\t$temp [$i ++] = array (\n\t\t\t\t\t\"Code\" => $practictioner_qual->Code,\n\t\t\t\t\t\"Descrption\" => $practictioner_qual->Display \n\t\t\t);\n\t\t}\n\t\t\n\t\treturn $temp;\n\t}",
"public static function question($questions)\n {\n $choices = array();\n $answer = array();\n\n // To find the related records from question layout\n foreach ($questions as $question) {\n $choice = array();\n $related = $question->getRelatedSet('qus_QUSC');\n\n foreach ($related as $relatedField) {\n // To find and create array of correct answers\n if ($relatedField->getField('qus_QUSC::isCorrect_kqn')) {\n array_push($answer, $relatedField->getField('qus_QUSC::choiceValue_kqt'));\n }\n\n // To create the array of choices of a question\n array_push($choice, $relatedField->getField('qus_QUSC::choiceValue_kqt'));\n }\n\n // To create array of choices of all questions\n array_push($choices, $choice);\n }\n\n // return array of choices and answers of questions\n return array($choices, $answer);\n }",
"public function questions(){\n return $this->hasMany('Question');\n }",
"public function getProfession() {\n $profession = UserDataExtra::findOne(['user_id' => $this->id]);\n return ($profession) ? $profession->profession : '';\n }",
"public function questionaries(){\n return $this->hasMany(Questionary::class);\n }",
"public function getQuestion(): string\n {\n return $this->question;\n }",
"private function getAnswers($question){\n $answerModel = new Answer();\n $answers = $answerModel->where('id_qst',$question->id_qst)->findAll();\n $retMess = \"\";\n $this->answersId = [];\n foreach($answers as $answer){\n array_push($this->answersId,$answer->id_ans);\n $retMess .= \",\".$answer->text;\n }\n\n return $retMess;\n }",
"private function getQuestion($uuid = NULL , $weekSend = NULL)\n\t\t{\n\t\t\t$returnArr = array();\n\t\t\t$questionArr = $this->Student_survey_model->getQuestions('Survey' , $uuid , $weekSend);\n\t\t\treturn $questionArr;\n\t\t}",
"public function questions(){\n return $this->hasMany('App\\Models\\Question');\n }",
"public function exams() {\n return $this->_exams;\n }",
"function AppRelated_Questions($value)\n {\n $categories = DB::table('categories')\n ->where('apps_id', '=', $value)\n ->select('categories.id')\n ->get();\n\n\n foreach ($categories as $category) {\n $questions = DB::table('questions')->where('categories_id', '=', $category->id)->get();\n foreach ($questions as $question) {\n $all[] = (object)$question;\n }\n }\n if (isset($all)) {\n return $all;\n }return null;\n \n }",
"public function getQuestion() {\n\t\t\treturn $this->question;\n\t\t}",
"function getFAQ() \n {\n \n $query= \"SELECT f.*,fs.name as fname,pi.pi_title as ptitle,tp.name as tname\n FROM features AS f\n LEFT JOIN feature_statuses AS fs ON fs.id = f.f_status_id\n LEFT JOIN productincrements AS pi ON pi.pi_id = f.f_PI\n LEFT JOIN topics AS tp ON tp.id = f.f_topic_id\"; \n $result = $this->ds->select($query);\n //print '<pre>';print_r($result);\n return $result;\n }",
"public function Read(){\n if (isset($_SESSION['question'])) {\n unset($_SESSION['question']);\n\n }\n \n $model = Survey::getInstance();\n $questions = $model->get_questions();\n $answers = $model->get_answers();\n // var_dump($query);\n $this->smarty->assign('questions',$questions);\n $this->smarty->assign('answers',$answers);\n\n $this->smarty->show('survey');\n }"
] | [
"0.6646337",
"0.6645264",
"0.6597434",
"0.6459876",
"0.6459876",
"0.64455765",
"0.6444603",
"0.64229804",
"0.6393119",
"0.6390109",
"0.63793755",
"0.63462096",
"0.6325036",
"0.6317388",
"0.63144994",
"0.6308607",
"0.63046885",
"0.629278",
"0.62918615",
"0.6217348",
"0.6164616",
"0.6115851",
"0.6098033",
"0.6046465",
"0.60456526",
"0.60075706",
"0.60069436",
"0.60069436",
"0.59992903",
"0.5997367",
"0.5994146",
"0.5976532",
"0.5962775",
"0.59489834",
"0.59439254",
"0.5936552",
"0.5924228",
"0.5920425",
"0.5913082",
"0.5884833",
"0.58817226",
"0.58647853",
"0.5861941",
"0.58559054",
"0.58559054",
"0.5851769",
"0.5831731",
"0.5824934",
"0.58226866",
"0.5812129",
"0.5804441",
"0.577941",
"0.5776212",
"0.5772467",
"0.5765837",
"0.5724968",
"0.5715829",
"0.5712112",
"0.5709155",
"0.5706501",
"0.569377",
"0.56785226",
"0.5672374",
"0.5663316",
"0.56533253",
"0.5641114",
"0.5641011",
"0.5639269",
"0.56389815",
"0.56385636",
"0.5632941",
"0.561969",
"0.5616329",
"0.56111276",
"0.5609346",
"0.56082386",
"0.5607611",
"0.56010246",
"0.5586248",
"0.5582612",
"0.5578262",
"0.5576598",
"0.5574597",
"0.55704397",
"0.5566474",
"0.5558359",
"0.5557361",
"0.55401456",
"0.55320346",
"0.5521658",
"0.55158573",
"0.5496396",
"0.5495918",
"0.54865885",
"0.54735357",
"0.5472524",
"0.5467367",
"0.5467328",
"0.5460655",
"0.545154"
] | 0.5743996 | 55 |
Loads the fixtures files and return the loaded objects. | public function load(array $fixturesFiles, array $parameters = [], array $objects = [], PurgeMode $purgeMode = null): array; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function myLoadFixtures()\n {\n $em = $this->getDatabaseManager();\n\n // load fixtures\n $client = static::createClient();\n $classes = array(\n // classes implementing Doctrine\\Common\\DataFixtures\\FixtureInterface\n 'Demofony2\\AppBundle\\DataFixtures\\ORM\\FixturesLoader',\n );\n\n $this->loadFixtures($classes);\n }",
"protected function getFixtures()\n {\n return array(\n // __DIR__ . '/../../Resources/fixtures/majora_entitys.yml',\n );\n }",
"protected function getFixtures()\n {\n return array(\n __DIR__ . '/../../Resources/fixtures/BlogArticle.yml',\n );\n }",
"public function load()\n {\n $this\n ->objectManager\n ->createQuery('DELETE FROM ' . Member::class)\n ->execute()\n ;\n Fixtures::load(\n __DIR__ . '/../../fixtures/members.yml',\n $this->objectManager\n );\n }",
"public static function loadFixture()\n {\n //include __DIR__ .'/../_files/customer.php';\n include __DIR__ .'/../_files/order_fee_variation.php';\n\n }",
"public function _fixtures()\n\t{\n\t\treturn [\n\t\t\t'user' => [\n\t\t\t\t'class' => UserFixture::className(),\n\t\t\t\t'dataFile' => codecept_data_dir() . 'login_data.php'\n\t\t\t],\n\t\t\t'models' => [\n\t\t\t\t'class' => ModelsFixture::className(),\n\t\t\t\t'dataFile' => codecept_data_dir() . 'models.php'\n\t\t\t],\n\t\t\t'files' => [\n\t\t\t\t'class' => FilesFixture::className(),\n\t\t\t\t'dataFile' => codecept_data_dir() . 'files.php'\n\t\t\t]\n\n\t\t];\n\t}",
"public function setupFixtures()\n {\n if ($this->_fixtures === null) {\n $loadedFixtures = [];\n foreach ($this->fixtures() as $fixtureClass) {\n $loadedFixtures[$fixtureClass] = Yii::createObject($fixtureClass);\n }\n\n $this->_fixtures = $loadedFixtures;\n }\n }",
"public function _fixtures()\n {\n return [\n 'user' => [\n 'class' => AdminUserFixture::class,\n 'dataFile' => codecept_data_dir() . 'admin_user.php',\n ],\n 'auth' => [\n 'class' => AuthItemFixture::class,\n 'dataFile' => codecept_data_dir() . 'auth_data.php',\n ],\n 'auth_child' => [\n 'class' => AuthItemChildFixture::class,\n 'dataFile' => codecept_data_dir() . 'auth_child_data.php',\n ],\n 'authAssignment' => [\n 'class' => AuthAssignmentFixture::class,\n 'dataFile' => codecept_data_dir() . 'auth_assigment_data.php',\n ],\n 'category' => [\n 'class' => CategoryFixture::class,\n 'dataFile' => codecept_data_dir() . 'category_data.php',\n ],\n 'category_company_type' => [\n 'class' => CategoryCompanyTypeFixture::class,\n 'dataFile' => codecept_data_dir() . 'category_company_type_data.php',\n ],\n 'company_type' => [\n 'class' => CompanyTypeFixture::class,\n 'dataFile' => codecept_data_dir() . 'company_type_data.php',\n ],\n\n ];\n }",
"protected function getFixtures()\n {\n return array(\n __DIR__ . '/card.yml',\n );\n }",
"protected static function getDataFixtures()\n {\n return array(\n new LoadTestUser(),\n new LoadSuperUser(),\n );\n }",
"protected function createFixtures()\n {\n // Due to a dubious bug(?) in doctrine - product types need to be loaded first.\n $typeFixtures = new LoadProductTypes();\n $typeFixtures->load($this->entityManager);\n $this->productType = $this->getProductTypeRepository()->find(self::PRODUCT_TYPE_ID);\n $this->addonProductType = $this->getProductTypeRepository()->find(self::PRODUCT_TYPE_ADDON_ID);\n\n $countries = new LoadCountries();\n $countries->load($this->entityManager);\n\n $this->contactTestData = new ContactTestData($this->container);\n\n $loadCurrencies = new LoadCurrencies();\n $loadCurrencies->load($this->entityManager);\n\n $this->currency = $this->getCurrencyRepository()->findByCode($this->defaultCurrencyCode);\n\n $unitFixtures = new LoadUnits();\n $unitFixtures->load($this->entityManager);\n $this->orderUnit = $this->getProductUnitRepository()->find(self::ORDER_UNIT_ID);\n\n $this->contentUnit = $this->getProductUnitRepository()->find(self::CONTENT_UNIT_ID);\n\n $taxClasses = new LoadTaxClasses();\n $taxClasses->load($this->entityManager);\n $this->taxClass = $this->getTaxClassRepository()->find(self::TAX_CLASS_ID);\n\n $countryTaxes = new LoadCountryTaxes();\n $countryTaxes->load($this->entityManager);\n\n $collectionTypes = new LoadCollectionTypes();\n $collectionTypes->load($this->entityManager);\n\n $mediaTypes = new LoadMediaTypes();\n $mediaTypes->load($this->entityManager);\n\n $attributeTypes = new LoadAttributeTypes();\n $attributeTypes->load($this->entityManager);\n $this->attributeType = $this->getAttributeTypeRepository()->find(self::ATTRIBUTE_TYPE_ID);\n\n $statusFixtures = new LoadProductStatuses();\n $statusFixtures->load($this->entityManager);\n $this->productStatus = $this->getProductStatusRepository()->find(Status::ACTIVE);\n $this->productStatusChanged = $this->getProductStatusRepository()->find(Status::CHANGED);\n $this->productStatusImported = $this->getProductStatusRepository()->find(Status::IMPORTED);\n $this->productStatusSubmitted = $this->getProductStatusRepository()->find(Status::SUBMITTED);\n\n $deliveryStatusFixtures = new LoadDeliveryStatuses();\n $deliveryStatusFixtures->load($this->entityManager);\n }",
"protected function reloadDataFixtures()\n {\n $em = $this->getEntityManager();\n $loader = new Loader;\n foreach ($this->dataFixturePaths as $path) {\n $loader->loadFromDirectory($path);\n }\n $purger = new ORMPurger($em);\n $executor = new ORMExecutor($em, $purger);\n $executor->execute($loader->getFixtures());\n $this->fixturesReloaded = true;\n }",
"public function getAllFixtures() { \r\n $uri = $this->payload->_links->fixtures->href;\r\n $response = file_get_contents($uri, false, stream_context_create($this->reqPrefs)); \r\n \r\n return json_decode($response);\r\n }",
"public static function loadStockFixtures(): void\n {\n include __DIR__ . '/../../../_files/stockFixtures.php';\n }",
"protected function loadFixtures()\n {\n if (!$this->hasFixturesBundles()) {\n return $this;\n }\n\n $bundles = static::$kernel->getBundles();\n $formattedBundles = array_map(function ($bundle) use ($bundles) {\n return $bundles[$bundle]->getPath() . '/DataFixtures/ORM/';\n }, $this->loadFixturesBundles());\n\n self::$application->run(new ArrayInput([\n 'command' => 'doctrine:fixtures:load',\n '--no-interaction' => true,\n '--fixtures' => $formattedBundles,\n '--quiet' => true,\n ]));\n\n return $this;\n }",
"public static function loadUserFixtures()\n {\n include __DIR__ . '/../../../_files/adminUserFixtures.php';\n }",
"abstract protected function getFixtures();",
"public function testLoadAllFixtures(): void\n {\n $this->loadFixtures();\n $article = $this->getTableLocator()->get('Articles')->get(1);\n $this->assertSame(1, $article->id);\n $category = $this->getTableLocator()->get('Categories')->get(1);\n $this->assertSame(1, $category->id);\n }",
"public function loadObjects()\n {\n $obj1 = new ParseObject('TestObject');\n $obj2 = new ParseObject('TestObject');\n $obj3 = new ParseObject('TestObject');\n $obj4 = new ParseObject('TestObject');\n\n $obj1->set('score', 10);\n $obj2->set('score', 10);\n $obj3->set('score', 10);\n $obj4->set('score', 20);\n\n $obj1->set('name', 'foo');\n $obj2->set('name', 'foo');\n $obj3->set('name', 'bar');\n $obj4->set('name', 'dpl');\n\n $objects = [$obj1, $obj2, $obj3, $obj4];\n ParseObject::saveAll($objects);\n }",
"public function provideTestLoadsOfFiles()\n {\n AutoloaderTestHelper::deleteDirectory(\"testLoadsOfFiles\");\n $alTestHelper = new AutoloaderTestHelper($this);\n\n for ($i = 0; $i < 150; $i++) {\n $alTestHelper->makeClass(\"anyClass\", \"testLoadsOfFiles/flat\");\n\n }\n\n for ($i = 0; $i < 150; $i++) {\n $alTestHelper->makeClass(\n \"anyClass\", \"testLoadsOfFiles\" . str_repeat('/sub', $i)\n );\n\n }\n\n return array(\n array(\n new AutoloaderFileIterator_PriorityList(),\n \"testLoadsOfFiles/flat\"\n ),\n array(\n new AutoloaderFileIterator_Simple(),\n \"testLoadsOfFiles/flat\"\n ),\n array(\n new AutoloaderFileIterator_SimpleCached(),\n \"testLoadsOfFiles/flat\"\n ),\n array(\n new AutoloaderFileIterator_PriorityList(),\n \"testLoadsOfFiles/sub\"\n ),\n array(\n new AutoloaderFileIterator_Simple(),\n \"testLoadsOfFiles/sub\"\n ),\n array(\n new AutoloaderFileIterator_SimpleCached(),\n \"testLoadsOfFiles/sub\"\n )\n );\n }",
"public function _fixtures()\n {\n return [\n 'user' => [\n 'class' => BookFixture::class,\n 'dataFile' => codecept_data_dir() . 'book.php'\n ],\n ];\n }",
"public function load(ObjectManager $manager)\n {\n // Fixtures are split into separate files\n }",
"abstract public function loadAll();",
"public function testFixtureLoadOnDemand(): void\n {\n $this->loadFixtures('Categories');\n }",
"private function loadFiles()\n {\n $finder = new Finder();\n\n foreach (Config::get('routing_dirs') as $directory) {\n $finder\n ->files()\n ->name('*.yml')\n ->in($directory)\n ;\n\n foreach ($finder as $file) {\n $resource = $file->getRealPath();\n $this->routes = array_merge($this->routes, Yaml::parse(file_get_contents($resource)));\n }\n }\n }",
"public static function loadWebsiteFixtures()\n {\n include __DIR__ . '/../../../_files/websiteFixtures.php';\n }",
"public static function loadWebsiteFixtures()\n {\n include __DIR__ . '/../../../_files/websiteFixtures.php';\n }",
"private function load_children() {\n\t\tif (isset($this->_children)) return;\n\t\t$this->_children = array();\n\t\t$this->_testcases = array();\n\t\tif (!$this->exists()) return; // entity doesn't actually exist\n\t\tforeach (new DirectoryIterator($this->data_path()) as $child) {\n\t\t\t$filename = $child->getFilename();\n\t\t\tif ($child->isDot() || $filename[0] == '.') {\n\t\t\t\t// skip hidden files and ..\n\t\t\t} else if ($child->isDir()) {\n\t\t\t\t// subdirectory = child entity\n\t\t\t\t$this->_children[$filename] = new Entity($this, $filename);\n\t\t\t} else if (substr($filename,-3) == '.in') {\n\t\t\t\t// \".in\" file = testcase\n\t\t\t\t$this->_testcases []= substr($filename,0,-3);\n\t\t\t}\n\t\t}\n\t\tsort($this->_testcases);\n\t\t//ksort($this->_children);\n\t\tuasort($this->_children, 'compare_order');\n\t}",
"public static function loadInventoryFixtures(): void\n {\n include __DIR__ . '/../../../_files/source_items_on_default_source.php';\n }",
"public static function loadAll();",
"public static function loadWebsiteFixtures(): void\n {\n include __DIR__ . '/../../../_files/websiteFixtures.php';\n }",
"public static function loadWebsiteFixtures(): void\n {\n include __DIR__ . '/../../../_files/websiteFixtures.php';\n }",
"public function loadFixtures(array $fixtureNames): array\n {\n static $cachedFixtures = [];\n\n $fixtures = [];\n foreach ($fixtureNames as $fixtureName) {\n if (str_contains($fixtureName, '.')) {\n [$type, $pathName] = explode('.', $fixtureName, 2);\n $path = explode('/', $pathName);\n $name = array_pop($path);\n $additionalPath = implode('\\\\', $path);\n\n if ($type === 'core') {\n $baseNamespace = 'Cake';\n } elseif ($type === 'app') {\n $baseNamespace = Configure::read('App.namespace');\n } elseif ($type === 'plugin') {\n [$plugin, $name] = explode('.', $pathName);\n $baseNamespace = str_replace('/', '\\\\', $plugin);\n $additionalPath = null;\n } else {\n $baseNamespace = '';\n $name = $fixtureName;\n }\n\n if (strpos($name, '/') > 0) {\n $name = str_replace('/', '\\\\', $name);\n }\n\n $nameSegments = [\n $baseNamespace,\n 'Test\\Fixture',\n $additionalPath,\n $name . 'Fixture',\n ];\n /** @var class-string<\\Cake\\Datasource\\FixtureInterface> $className */\n $className = implode('\\\\', array_filter($nameSegments));\n } else {\n /** @var class-string<\\Cake\\Datasource\\FixtureInterface> $className */\n $className = $fixtureName;\n }\n\n if (isset($fixtures[$className])) {\n throw new UnexpectedValueException(sprintf('Found duplicate fixture `%s`.', $fixtureName));\n }\n\n if (!class_exists($className)) {\n throw new UnexpectedValueException(sprintf('Could not find fixture `%s`.', $fixtureName));\n }\n\n if (!isset($cachedFixtures[$className])) {\n $cachedFixtures[$className] = new $className();\n }\n\n $fixtures[$className] = $cachedFixtures[$className];\n }\n\n return $fixtures;\n }",
"public function _fixtures()\n {\n return [\n 'user' => [\n 'class' => UserFixture::className(),\n 'dataFile' => codecept_data_dir() . 'login_data.php',\n ],\n ];\n }",
"public function load() {\r\n\t\t$this->includes();\r\n\t\t$this->inits();\r\n\t}",
"public function testLoadWithCollection() {\n\t\t$options = $this->_loadOptions;\n\t\t$posts = Fixture::load('models/Posts', $options);\n\t\t$this->_testLoad($posts);\n\t}",
"protected function loadObjects() {\n if (!isset($this->objects)) {\n $this->obj_builder->toggleAutoload('on');\n $this->objects = $this->obj_builder->buildObjects();\n $this->obj_builder->toggleAutoload('off');\n }\n }",
"public function getLoadedFixtures()\r\n {\r\n $fixtures = [];\r\n\r\n foreach($this->repositories as $fixtureClassName => $fixtureList)\r\n {\r\n foreach($fixtureList as $fixture)\r\n {\r\n /** Merge fixtures from all currently loaded classes. */\r\n $fixtures = array_merge($fixtures, $fixture->getLoadedFixtures());\r\n }\r\n }\r\n\r\n return $fixtures;\r\n }",
"protected function load()\n {\n $this->translations = array();\n \n if ($this->language) {\n if ($this->cachepath) {\n if (file_exists($cache = $this->cachepath.'/'.$this->language.'.php')) {\n $this->translations = include($cache);\n }\n } else {\n if (!empty($this->filepaths)) {\n foreach ($this->filepaths as $filepath) {\n $this->loadFilePath($filepath);\n }\n }\n }\n }\n }",
"public function testLoad()\n {\n $fixture = new Mad_Test_Fixture_Base($this->_conn, 'unit_tests');\n $this->assertEquals('0', $this->_countRecords());\n\n $fixture->load();\n $this->assertEquals('6', $this->_countRecords());\n }",
"public function load(ObjectManager $manager)\n {\n /**\n * Ingredients fixtures\n */\n\n // Ingredients List\n// $ingredientsList = array(\n// 'Cereals' => ['シリアル', 'cereals.jpg', 0],\n// 'Dairy' => ['乳製品', 'dairy.jpg', 0],\n// 'Fruits' => ['果物', 'fruits.jpg', 0],\n// 'Meat' => ['肉', 'meat.jpg', 0],\n// 'Nuts, seeds & oils' => ['ナツ、油', 'nuts-seeds-oils.jpg', 0],\n// 'Other ingredients' => ['その他', 'other-ingredients.jpg', 0],\n// 'Seafood' => ['シーフード', 'seafood.jpg', 0],\n// 'Spices & herbs' => ['スパイス&ハーブ', 'spices-and-herbs.jpg', 0],\n// 'Sugar products' => ['砂糖', 'sugar-products.jpg', 0],\n// 'Vegetables' => ['野菜', 'vegetables.jpg', 0]\n// );\n//\n// foreach ($ingredientsList as $key => $ingredient) {\n// $ingredientDb = new Ingredient();\n// $ingredientDb->setName($key);\n// $ingredientDb->setNameJa($ingredient[0]);\n// $ingredientDb->setImage($ingredient[1]);\n// $ingredientDb->setParent($ingredient[2]);\n//\n// $manager->persist($ingredientDb);\n// $manager->flush();\n// }\n\n// $parentPath = \"web/images/ingredients\";\n// $parentDir = new DirectoryIterator(dirname($parentPath.\"/*\"));\n// $filetypes = array(\"jpg\", \"png\");\n//\n// foreach ($parentDir as $fileParentInfo) {\n// if (!$fileParentInfo->isDot() && $fileParentInfo->isFile()) {\n//\n// $fullName = str_replace('-',' ', ucfirst(substr($fileParentInfo->getFilename(), 0, -4)));\n// $ingredientDb = new Ingredient();\n// $ingredientDb->setName($fullName);\n//\n// $ingredientDb->setImage($fileParentInfo->getFilename());\n// $ingredientDb->setParent(0);\n// $manager->persist($ingredientDb);\n// $manager->flush();\n//\n// $childPath = $parentPath.'/'.$fullName.'/*';\n// $currentId = $ingredientDb->getId();\n// $childDir = new DirectoryIterator(dirname($childPath));\n//\n// foreach ($childDir as $fileinfo) {\n// if (!$fileinfo->isDot() && $fileinfo->isFile() && in_array(strtolower($fileinfo->getExtension()), $filetypes)) {\n// var_dump($fileinfo->getFilename());\n//\n// $childFullName = str_replace('-',' ', ucfirst(substr($fileinfo->getFilename(), 0, -4)));\n// $ingredientDb = new Ingredient();\n// $ingredientDb->setName($childFullName);\n// $ingredientDb->setImage($fullName.'/'.$fileinfo->getFilename());\n// $ingredientDb->setParent($currentId);\n//\n// $manager->persist($ingredientDb);\n// $manager->flush();\n//\n// }\n// }\n// }\n// }\n\n\n// $dir = new DirectoryIterator(dirname(\"web/images/ingredients/vegetables/*\"));\n//\n//\n//\n// foreach ($dir as $fileinfo) {\n// if (!$fileinfo->isDot() && $fileinfo->isFile() && in_array(strtolower($fileinfo->getExtension()), $filetypes)) {\n//\n// $fullName = str_replace('-',' ', ucfirst(substr($fileinfo->getFilename(), 0, -4)));\n// $ingredientDb = new Ingredient();\n// $ingredientDb->setName($fullName);\n//// $ingredientDb->setNameJa($ingredient[0]);\n// $ingredientDb->setImage($fileinfo->getFilename());\n// $ingredientDb->setParent(10);\n////\n// $manager->persist($ingredientDb);\n// $manager->flush();\n//\n// }\n// }\n\n }",
"public function _fixtures()\n {\n return [\n 'user' => [\n 'class' => TicketsFixture::className(),\n 'dataFile' => codecept_data_dir() . 'tickets.php'\n ]\n ];\n }",
"private function getFixturesFromRegistry() : array\n {\n $fixtureRegistry = $this->getObjectManager()->create(FixtureRegistry::class);\n $fixtures = [];\n foreach ($fixtureRegistry->getFixtures() as $fixtureClassName) {\n $fixtures[] = $this->getObjectManager()->create(\n $fixtureClassName,\n ['fixtureModel' => $this]\n );\n }\n return $fixtures;\n }",
"protected static function getFixtures()\n {\n return new ArrayCollection([\n new EavTypeFixture(),\n new EavAttributeFixture(),\n ]);\n }",
"public static function loadProductFixtures(): void\n {\n include __DIR__ . '/../../../_files/productFixtures.php';\n }",
"public function _fixtures()\n {\n return [\n\n 'base_date' => [\n 'class' => BaseDataFixture::class,\n 'dataFile' => codecept_data_dir() . 'base_data_data.php',\n ],\n\n ];\n }",
"public function load()\n {\n\n /*\n $folder = new LibFilesystemFolder(PATH_GW.'data/bdl/');\n $files = $folder->getPlainFiles();\n\n $this->data = array();\n\n // Load als xmi Files\n foreach ($files as $file)\n if (substr($file, -3 , strlen($file)) == \"xml\")\n $this->data[] = $file;\n */\n\n $data = array();\n\n include PATH_GW.'conf/map/bdl/projects/projects.php';\n\n $this->data = $data;\n\n ksort($this->data);\n\n }",
"private function loadSeedersAndCall(): void\n {\n $shipFiles = $this->getSeedersFromShip();\n $containersFiles = $this->getSeedersFromContainers();\n\n $files = array_merge($shipFiles, $containersFiles);\n\n foreach ($files as $file){\n $this->call($file);\n }\n }",
"protected function _load()\n {\n return array();\n }",
"public function loadAll()\n {\n $this->setAll(array());\n $d = dir($this->getPath());\n $this->load($d);\n $d->close();\n }",
"public function loadFixtures($fixtureClassName, $options = array())\r\n {\r\n /** @var \\Doctrine\\Common\\DataFixtures\\Loader */\r\n $loader = new Loader();\r\n\r\n $this->repositories[$fixtureClassName] = isset($this->repositories[$fixtureClassName]) ?\r\n $this->repositories[$fixtureClassName] :\r\n [];\r\n\r\n $this->generatedClasses[$fixtureClassName] = isset($this->generatedClasses[$fixtureClassName]) ?\r\n $this->generatedClasses[$fixtureClassName] :\r\n [];\r\n\r\n $fixtureClass = new $fixtureClassName($options);\r\n $this->repositories[$fixtureClassName][] = $fixtureClass;\r\n $loader->addFixture($fixtureClass);\r\n\r\n $em = $this->getEntityManager();\r\n\r\n $this->generatedClasses[$fixtureClassName][] = $loader->getFixtures();\r\n\r\n /** @var \\Doctrine\\Common\\DataFixtures\\Executor\\ORMExecutor */\r\n $executor = new ORMExecutor($em);\r\n $executor->execute([$fixtureClass], true);\r\n }",
"public function fixtures() \n {\n return [\n 'categories' => CategoryFixture::className(),\n ];\n }",
"public function setUp()\n\t{\n\t\tparent::setUp();\n if(is_array($this->fixtures)){\n foreach($this->fixtures as $fixtureName=>$modelClass)\n {\n $tableName=WF_Table::model($modelClass)->tableName();\n $this->resetTable($tableName);\n $rows=$this->loadFixtures($modelClass, $tableName);\n if(is_array($rows) && is_string($fixtureName))\n {\n $this->_rows[$fixtureName]=$rows;\n if(isset($modelClass))\n {\n foreach(array_keys($rows) as $alias)\n $this->_records[$fixtureName][$alias]=$modelClass;\n }\n }\n }\n }\n }",
"public function load()\n {\n $loader = new Loader($this->filePath, true);\n return $loader->load();\n }",
"public function loadContents() {}",
"public function loadContents() {}",
"public function loadContents() {}",
"public function loadContents() {}",
"public function loadFixtures($path) : void\n {\n /** @var EntityManager $em */\n $em = $this->getApplicationServiceLocator()->get(EntityManager::class);\n $em->getConnection()->exec('SET foreign_key_checks = 0');\n $loader = new Loader();\n $loader->loadFromDirectory($path);\n $purger = new ORMPurger($em);\n $purger->setPurgeMode(ORMPurger::PURGE_MODE_TRUNCATE);\n $executor = new ORMExecutor($em, $purger);\n $executor->execute($loader->getFixtures());\n $em->getConnection()->exec('SET foreign_key_checks = 1');\n }",
"public function haveFixtures($fixtures)\n {\n $this->store = new FixturesStore($fixtures);\n $this->store->loadFixtures();\n $this->loadedFixtures[] = $this->store;\n }",
"public function testLoad() {\n $this->_loader->getSource('FilesystemTest.php');\n $this->_loader->getSource('FilesystemTest.php');\n\n $this->_loader->appendDir(dirname(__FILE__) . '/../Loader');\n $this->_loader->prependDir(dirname(__FILE__) . '/../Loader');\n }",
"public function load()\n {\n $this->_retrievedFiles = $this->getRetrievedFiles();\n $this->_loadedClasses = [];\n\n $manifestRepository = $this->_registry->getManifestRepository();\n $providerRepository = $this->_registry->getProviderRepository();\n\n $loadedClasses = [];\n\n // loop through files and find the classes declared by loading the file\n foreach ($this->_retrievedFiles as $file) {\n if(is_dir($file)) {\n continue;\n }\n\n $classesLoadedBefore = get_declared_classes();\n $oldLevel = error_reporting(E_ALL | ~E_STRICT); // remove strict so that other packages wont throw warnings\n // should we lint the files here? i think so\n include_once $file;\n error_reporting($oldLevel); // restore old error level\n $classesLoadedAfter = get_declared_classes();\n $loadedClasses = array_merge($loadedClasses, array_diff($classesLoadedAfter, $classesLoadedBefore));\n }\n\n // loop through the loaded classes and ensure that\n foreach ($loadedClasses as $loadedClass) {\n\n // reflect class to see if its something we want to load\n $reflectionClass = new ReflectionClass($loadedClass);\n if ($reflectionClass->implementsInterface('Zend_Tool_Framework_Manifest_Interface')\n && !$reflectionClass->isAbstract())\n {\n $manifestRepository->addManifest($reflectionClass->newInstance());\n $this->_loadedClasses[] = $loadedClass;\n }\n\n if ($reflectionClass->implementsInterface('Zend_Tool_Framework_Provider_Interface')\n && !$reflectionClass->isAbstract()\n && !$providerRepository->hasProvider($reflectionClass->getName(), false))\n {\n $providerRepository->addProvider($reflectionClass->newInstance());\n $this->_loadedClasses[] = $loadedClass;\n }\n\n }\n\n return $this->_loadedClasses;\n }",
"public function load() {\n\t\t$this->copyFromTemplateIfNeeded();\n\t\trequire $this->filePath;\n\t\t$this->vars = $vars;\n\t}",
"public function load() { }",
"function load() {\n\n $directory = array();\n\n $dm = $this->get('doctrine.odm.mongodb.document_manager');\n\n $families = $dm->createQueryBuilder('Ecc12PRHomeBundle:Family')\n ->sort('name', 'asc')\n ->getQuery()\n ->execute();\n\n foreach($families as $family) {\n $family_id = $family->getId();\n $directory[$family_id] = array(\n 'id' => $family->getId(),\n 'name' => $family->getName(),\n 'address_1' => $family->getAddress1(),\n 'address_2' => $family->getAddress2(),\n 'city' => $family->getCity(),\n 'state' => $family->getState(),\n 'zipcode' => $family->getZipcode(),\n 'country' => $family->getCountry(),\n 'phone' => $family->getPhone(),\n 'email' => $family->getEmail(),\n 'people' => array()\n );\n\n if($in_mode == \"detail\") {\n foreach($family->getPeople() as $person) {\n $person = array(\n 'id' => $person->getId(),\n 'first_name' => $person->getFirstName(),\n 'last_name' => $person->getLastName(),\n 'sort' => $person->getSort(),\n 'type' => $person->getType(),\n 'relationship' => $person->getRelationship(),\n 'email' => $person->getEmail(),\n 'phone' => $person->getPhone(),\n 'birthday' => $person->getBirthday()?\n $person->getBirthday()->format('c'):false,\n 'anniversary' => $person->getAnniversary()?\n $person->getAnniversary()->format('c'):false,\n );\n $directory[$family_id]['people'][\n \"$person[sort]_$person[first_name]$person[last_name]\"] = $person;\n }\n }\n }\n\n\n\n }",
"public function load(ObjectManager $manager)\n {\n $entities = Fixtures::load($this->getFixtures(), $manager);\n }",
"public function loadResources() {}",
"public function load()\n {\n $files = $this->finder->files()->in($this->shimsDirectory);\n\n foreach ($files as $file) {\n $this->loadFile($file);\n }\n }",
"protected function loadFixtures($fixtures)\n {\n $loader = new Loader();\n if (is_array($fixtures) || $fixtures instanceof \\Iterator) {\n foreach ($fixtures as $fixture) {\n $loader->addFixture($fixture);\n }\n $this->push($loader);\n return;\n } elseif ($fixtures instanceof FixtureInterface) {\n $loader->addFixture($fixtures);\n $this->push($loader);\n return;\n } elseif ($fixtures === null) {\n $this->push($loader);\n return;\n }\n\n throw new \\InvalidArgumentException(\n sprintf(\n '%s expects first parameter to be a FixtureInterface or array. %s given.',\n __METHOD__,\n get_class($fixtures)\n )\n );\n }",
"function loadFixture($fixtureFile) {\n\t\t$parser = new Spyc();\n\t\t$fixtureContent = $parser->load(Director::baseFolder().'/'.$fixtureFile);\n\t\t\n\t\t$fixture = new YamlFixture($fixtureFile);\n\t\t$fixture->saveIntoDatabase();\n\t\t$this->fixtures[] = $fixture;\n\t}",
"public function testLoadFixturesFilesWithCustomProvider(): void\n {\n // Load default Data Fixtures.\n $fixtures = $this->databaseTool->loadAliceFixture([\n '@AcmeBundle/DataFixtures/ORM/user.yml',\n ]);\n\n $this->assertIsArray($fixtures);\n\n // 10 users are loaded\n $this->assertCount(\n 10,\n $fixtures\n );\n\n /** @var User $user */\n $user = $fixtures['id1'];\n\n // The custom provider has not been used successfully.\n $this->assertStringStartsNotWith(\n 'foo',\n $user->getName()\n );\n\n // Load Data Fixtures with custom loader defined in configuration.\n $fixtures = $this->databaseTool->loadAliceFixture([\n '@AcmeBundle/DataFixtures/ORM/user_with_custom_provider.yml',\n ]);\n\n /** @var User $user */\n $user = $fixtures['id1'];\n\n // The custom provider \"foo\" has been loaded and used successfully.\n $this->assertSame(\n 'fooa string',\n $user->getName()\n );\n }",
"protected static function loadFixturesBundles()\n {\n return [\n 'ElcodiCartBundle',\n 'ElcodiCouponBundle',\n 'ElcodiProductBundle',\n 'ElcodiCurrencyBundle',\n ];\n }",
"function loadFixture($fixtureFile) {\n\t\t$parser = new Spyc();\n\t\t$fixtureContent = $parser->load(Director::baseFolder().'/'.$fixtureFile);\n\t\t\n\t\t$this->fixture = new YamlFixture($fixtureFile);\n\t\t$this->fixture->saveIntoDatabase();\n\t}",
"public function load():self{\n $factory = $this;\n if (is_dir($this->path)) {\n foreach (Finder::create()->files()->name('*Factory.php')->in($this->path) as $file) {\n require $file->getRealPath();\n }\n }\n return $factory;\n }",
"public function load(ObjectManager $manager)\n {\n // Array of data for the fixture\n $usersData = array(\n array(\n 'username' => 'superman',\n 'email' => '[email protected]',\n 'password' => 'sup',\n 'roles' => array('ROLE_ADMIN'),\n ),\n array(\n 'username' => 'batman',\n 'email' => '[email protected]',\n 'password' => 'bat',\n 'roles' => array('ROLE_ADMIN'),\n ),\n array(\n 'username' => 'spiderman',\n 'email' => '[email protected]',\n 'password' => 'spi',\n// 'roles' => array(),\n 'roles' => array('ROLE_USER'),\n ),\n array(\n 'username' => 'Martine',\n 'email' => '[email protected]',\n 'password' => 'mar',\n 'roles' => array(),\n ),\n array(\n 'username' => 'Jean',\n 'email' => '[email protected]',\n 'password' => 'jea',\n 'roles' => array(),\n ),\n array(\n 'username' => 'Marc',\n 'email' => '[email protected]',\n 'password' => 'mar',\n 'roles' => array(),\n ),\n array(\n 'username' => 'David',\n 'email' => '[email protected]',\n 'password' => 'dav',\n 'roles' => array(),\n ),\n\n );\n\n // Accessing the user manager service\n $userManager = $this->container->get('fos_user.user_manager');\n\n foreach ($usersData as $i => $userData)\n {\n $user = $userManager->createUser();\n $user->setUsername($userData['username']);\n $user->setEmail($userData['email']);\n $user->setPlainPassword($userData['password']);\n $user->setEnabled(true);\n $user->setRoles($userData['roles']);\n\n $manager->persist($user);\n $this->addReference(sprintf('user-%s', $i), $user);\n }\n $manager->flush();\n }",
"private function loadFixture($fixtureName)\n {\n return $this->loader()->load($this->getFixturePath($fixtureName));\n }",
"public function loadDbFixtures(array $fixtureNames)\n {\n foreach ($fixtureNames as $fixtureName) {\n $this->loadDbFixture($fixtureName);\n }\n }",
"public static function load()\n {\n if (!is_dir(dirname(static::path()))) {\n mkdir(dirname(static::path()), 0755, true);\n }\n\n if (file_exists(static::path())) {\n return json_decode(file_get_contents(static::path()), true);\n }\n\n return [];\n }",
"protected function _loadFixture($fixture)\n {\n $this->db->query(file_get_contents(\n NL_TEST_DIR.\"/tests/migration/fixtures/$fixture.sql\"\n ));\n }",
"public function getOrder()\n {\n return 1; //the order in which fixtures will be loaded\n }",
"public function load();",
"public function load();",
"public function load();",
"public function load();",
"public function load();",
"public function load();",
"public function load();",
"public function load();",
"public function load();",
"public function load();",
"public function load();",
"public function load();",
"public function load();",
"public abstract function load();",
"static private function loadModels() {\n\n $config = Application::getConfig();\n\n if ($handle = opendir($config[\"system\"][\"models-folder\"])) {\n\n /* Das ist der korrekte Weg, ein Verzeichnis zu durchlaufen. */\n while (false !== ($entry = readdir($handle))) {\n if($entry != \".\" && $entry != \"..\") {\n require $config[\"system\"][\"models-folder\"] . \"/\" .$entry;\n }\n }\n closedir($handle);\n }\n }",
"public function load()\n {\n foreach ($this->aMappingConfiguration as $sLinkedEntity => $aMappingSetup) {\n $this->loadMapped(new $sLinkedEntity());\n }\n }",
"public function iLoadFixturesIn($source)\n {\n $loader = new Loader();\n if (file_exists($source)) {\n if (is_dir($source)) {\n $loader->loadFromDirectory($source);\n } elseif (is_file($source)) {\n $loader->loadFromFile($source);\n }\n } elseif (class_exists($source)) {\n if (!is_subclass_of($source, FixtureInterface::class)){\n throw new \\Exception(sprintf('\"%s\" must implement \"Doctrine\\Common\\DataFixtures\\FixtureInterface\"',\n $source));\n }\n $loader->addFixture(new $source());\n } else {\n throw new \\Exception(sprintf('\"%s\" is not a valid fixtures reference', $source));\n }\n $fixtures = $loader->getFixtures();\n // TODO: Find a good solution to have other purger and executor (MongoDB, PHPCR)\n $purger = new ORMPurger();\n $purger->setFixtures($fixtures);\n $executor = new ORMExecutor(BootstrapUtility::getObjectManager()->get(ObjectManager::class), $purger);\n $executor->execute($fixtures, false);\n }",
"public function overLoad()\n {\n $loader = new Loader($this->filePath, false);\n return $loader->load();\n }",
"private function load()\n {\n if ($this->sites) {\n return;\n }\n $data = Yaml::parse(file_get_contents($this->file));\n $this->sites = $data['sites'];\n }",
"public function getOrder()\n {\n return 100; //the order in which fixtures will be loaded\n }"
] | [
"0.7155395",
"0.6856502",
"0.67478627",
"0.66942835",
"0.66443974",
"0.6579319",
"0.6578975",
"0.65382236",
"0.65232474",
"0.64497346",
"0.64298904",
"0.6341999",
"0.6339953",
"0.63045686",
"0.62995315",
"0.6273572",
"0.62697446",
"0.62552804",
"0.62326115",
"0.6231441",
"0.62278736",
"0.6227231",
"0.6212978",
"0.6208247",
"0.61990285",
"0.6198344",
"0.6198344",
"0.61878765",
"0.6156758",
"0.6141547",
"0.6112269",
"0.6112269",
"0.6098905",
"0.60858184",
"0.60607207",
"0.60202914",
"0.60158783",
"0.6001889",
"0.59651464",
"0.59570146",
"0.59336907",
"0.5929219",
"0.5913269",
"0.5901966",
"0.5895074",
"0.5861825",
"0.58454883",
"0.58423233",
"0.5826868",
"0.57939863",
"0.57733625",
"0.57513654",
"0.5743792",
"0.5739561",
"0.57298756",
"0.5727745",
"0.5727435",
"0.5727435",
"0.57181156",
"0.5693365",
"0.56754905",
"0.56682324",
"0.5667089",
"0.5664906",
"0.56635654",
"0.5661593",
"0.5647605",
"0.56452847",
"0.5635942",
"0.562761",
"0.5616236",
"0.5595327",
"0.5588211",
"0.5576467",
"0.5572327",
"0.556696",
"0.555164",
"0.55482084",
"0.5547107",
"0.5539004",
"0.55336654",
"0.55336654",
"0.55336654",
"0.55336654",
"0.55336654",
"0.55336654",
"0.55336654",
"0.55336654",
"0.55336654",
"0.55336654",
"0.55336654",
"0.55336654",
"0.55336654",
"0.553054",
"0.5523042",
"0.5510181",
"0.55048823",
"0.5499058",
"0.5480798",
"0.5478323"
] | 0.7392318 | 0 |
$where = ['st' => ['',0]]; | public static function getList($data=[],$field='*',$where=['st' => ['<>',0]]) {
$order = "create_time desc";
if(!empty($data['title'])){
$where['title'] = ['like','%'.$data['title'].'%'];
}
if(!empty($data['city'])){
$where['city'] = ['like','%'.$data['city'].'%'];
}
if (!empty($data['paixu'])) {
$order = $data['paixu'] . ' asc';
}
if (!empty($data['paixu']) && !empty($data['sort_type'])) {
$order = $data['paixu'] . ' desc';
}
$list_ = self::where($where)->order($order)->field($field)->paginate();
return $list_;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getValueAsWhereClause(): ?array;",
"function where($s)\n{\n\t$this->tryModify();\n\tif(!isset($this->query['where'])) $this->query['where'] = array();\n\t$this->query['where'][] = $this->setWhereParams($s, func_get_args(), 1);\n\treturn $this;\n}",
"public function where($table,$column,$data = \"\");",
"protected function user_where_clause() {}",
"function start_group_where($key,$value=NULL,$escape=TRUE,$type=\"AND\")\n {\n $this->open_bracket($type); \n return parent::_where($key, $value,'',$escape); \n }",
"public function get_where()\n {\n }",
"public function get_where()\n {\n }",
"function generate_where($field,$array)\n{\n\tfor ($i=0;$i<sizeof($array);$i++)\n\t{\n\t\t$where=$where.\" \".$field.\" like \".$array[$i];\n\t\tif ($i<sizeof($array)-1)\n\t\t\t$where=$where.\" or\";\n\t}\n\tif (!isset($where))\n\t{\n\t\t$where = 0;\n\t}\n\tif (!isset($where))\n\t{\n\t\t$where=\"'0'\";\n\t}\n\treturn $where;\n}",
"public function where($arr){//ex of $arr : ['name' => 'LIKE A%','email' => '= [email protected]']\n $c = \"\";\n $x = 0;\n foreach($arr as $key => $v){//for each param, translate to SQL language\n if($x != 0){\n $c .= \" AND\";\n }\n $x++;\n $c .= \" $key $v\";\n }\n $this->params[\"WHERE\"] = $c;//adding the conditions to the query\n return $this;\n }",
"public function orWhere($table,$column,$data = \"\");",
"public function where($where=array())\n\t\t{\n\t\t\tif( is_array($where) && !empty($where)){\n\n\t\t\t\tforeach( $where as $k => $val ){\n\n\t\t\t\t\t// name = 'jack'\n\t\t\t\t\t// id > 1\n\t\t\t\t\t if( is_array($val) ){\n\n\t\t\t\t\t \t$type = $val[0];\n\n\t\t\t\t\t \tswitch($type){\n\t\t\t\t\t \t\tcase 'lt':\n\t\t\t\t\t \t\t\t$result[] = \"{$k} < {$val[1]} \";\n\t\t\t\t\t \t\t\tbreak;\n\t\t\t\t\t \t\tcase 'gt':\n\t\t\t\t\t \t\t\t$result[] = \"{$k} > {$val[1]} \";\n\t\t\t\t\t \t\t\tbreak;\n\t\t\t\t\t \t}\n\t\t\t\t\t \t\n\t\t\t\t\t }else{\n\n\t\t\t\t\t \t$result[] = \"{$k} = '{$val}'\";\n\t\t\t\t\t }\n\t\t\t\t}\n\n\t\t\t\t$this->where = 'where '.implode(' and ', $result);\n\t\t\t}\n\t\t\t\n\t\t\treturn $this;\n\t\t}",
"public function where()\n {\n $args = func_get_args();\n $count = count($args);\n \n if ($count == 1) {\n if (is_array($args[0])) {\n # This is expected to be a column => value associated array.\n # In this case, the array is stored as is.\n $this->where[] = $args[0];\n } else {\n # This is expected to be a string.\n $this->where[] = $args[0];\n }\n } elseif ($count) {\n # Case: $query->where(\"foo\", true, \"bar_baz\", $bar);\n if ($count >= 2 && is_int($count / 2) && (!is_array($args[1]) || Toolbox\\ArrayTools::isIndexed($args[1])) && is_bool(strpos($args[0], ' '))) {\n $where = [];\n foreach ($args as $key => $value) {\n $key++;\n if ($key && !($key % 2)) {\n $where[$next_key] = $value;\n } else {\n $next_key = $value;\n }\n }\n $this->where[] = $where;\n } else {\n $this->where[] = array_shift($args);\n \n # Case: $query->where('foo => :foo', ['foo' => $foo]);\n if ($count == 2 && is_array($args[0]) && !Toolbox\\ArrayTools::isIndexed($args[0]))\n $args = $args[0];\n \n if ($args)\n $this->where_params = array_merge($this->where_params, $args);\n }\n }\n return $this;\n }",
"abstract public function where(array $where);",
"public static function where(array $where);",
"function getWhereClause($local = array()) {\n global $whereFilter;\n\n $where = array_merge($local, $whereFilter);\n if (count($where) > 0) {\n $output = \" where \" . implode(\" and \", $where) . \" \";\n return $output;\n } else {\n return \"\";\n }\n}",
"function get_where($data) {\n\t\t$query = $this->db->get_where('realisasi_skp',$data);\n\t\treturn $query->result();\t\t\n\t}",
"public function parseWhere($where){\n $whereStr = '';\n if(is_string($where)){\n $whereStr = $where;\n }else{\n $str = array();\n foreach($where as $key => $val){\n\t$str[] = \"`$key` = \".Model::parseValue($val);\n }\n $whereStr = \"where \".implode(\" AND \", $str);\n }\n return $whereStr;\n }",
"function mWHERE(){\n try {\n $_type = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$WHERE;\n $_channel = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$DEFAULT_TOKEN_CHANNEL;\n // Tokenizer11.g:156:3: ( 'where' ) \n // Tokenizer11.g:157:3: 'where' \n {\n $this->matchString(\"where\"); \n\n\n }\n\n $this->state->type = $_type;\n $this->state->channel = $_channel;\n }\n catch(Exception $e){\n throw $e;\n }\n }",
"public function getWhere()\n\t{\n\t\tif(empty($this->sWhere))\n\t\t{\n\t\t\treturn 'TRUE';\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn $this->sWhere;\n\t\t}\n\t}",
"function MyMod_Data_Fields_Sql_Where($data,$value)\n {\n $where=array();\n if (!empty($this->SqlWhere[ $data ]))\n {\n $where[ $data ]=$this->SqlWhere[ $data ];\n }\n return $where;\n }",
"function whereCheck($where){\n\tif ($where==null){\n\t\treturn $where;\n\t} else {\n\t\t// append the where postfix\n\t\t$where = \"WHERE $where\";\n\t\treturn $where;\n\t}\n}",
"private function _set_where($params) {\n if (count($params) == 1) {\n if (!is_array($params[0]) && !strstr($params[0], \"'\")) {\n $this->db->where($this->primary_key, $params[0]); // 1.\n } else {\n $this->db->where($params[0]); // 2.\n }\n } elseif (count($params) == 2) {\n if (is_array($params[1])) {\n $this->db->where_in($params[0], $params[1]); // 4.\n } else {\n $this->db->where($params[0], $params[1]); // 3.\n }\n }\n }",
"protected function _buildWhere(&$query)\r\n {\r\n\r\n\r\n \t//if($this->_checkin!=null)\r\n \t//{\r\n \t//\t$query->where('ltap.ltap_qdatu = \"'.$this->_confdate.'\"');\r\n \t//}\r\n return $query;\r\n }",
"public function where($whereData,$optionalData = null)\n {\n \t if (is_array($whereData)) {\n $dt = $whereData;\n \t }else if (is_string($whereData)){\n if ($optionalData != null) {\n $dt[$this->clean($whereData)] = $this->clean($optionalData);\n }\n }\n \n foreach ($dt as $key => $val) {\n if(!in_array($key, $this->_where)){\n $this->_where[$this->clean($key)] = $this->clean($val);\n }\n }\n \n \t return $this;\n }",
"public function where() {\r\n\t\t$args = func_get_args();\r\n\t\t$expr = array_shift($args);\r\n\t\tarray_push($this->_wheres, '(' . $this->_parameterize($expr, $args) . ')');\r\n\t\t$this->_dirty = true;\r\n\t}",
"function s_m_put_get_condition($ref_id_db_arr, $ref_data){\r\n $where = \"\";\r\n for($i = 0; $i < count($ref_id_db_arr); $i++){\r\n $where .= $ref_id_db_arr[$i] . \"='\" . $ref_data[$i] . \"'' AND \";\r\n }\r\n return substr($where, 0, strlen($where) - 5);\r\n}",
"protected function getWhereClause() {}",
"function m_tampil_soal($table, $where){\n\t\treturn $this->db->get_where($table,$where);\n\t}",
"public function where(array $params)\n {\n }",
"function plain_where($base) {\r\n for($i=1; $i<=$this->conditions; $i++) {\r\n ## Only create conditions for used input fields\r\n if ($GLOBALS[$base][\"input_\".$i] == \"\")\r\n continue;\r\n\r\n ## If necessary, add conjunction\r\n if ($q != \"\")\r\n $q .= sprintf(\" %s \", $GLOBALS[$base][\"conj_\".$i]);\r\n \r\n ## Handle \"like\"\r\n if ($GLOBALS[$base][\"comp_\".$i] == \"like\")\r\n $v = \"%\".$GLOBALS[$base][\"input_\".$i].\"%\";\r\n else\r\n $v = $GLOBALS[$base][\"input_\".$i];\r\n\r\n ## Create subcondition\r\n $q .= sprintf(\"%s %s '%s'\",\r\n $GLOBALS[$base][\"sel_\".$i],\r\n $GLOBALS[$base][\"comp_\".$i],\r\n $v);\r\n }\r\n \r\n if (!$q) {\r\n $q = \"1=0\";\r\n }\r\n \r\n return \"( $q )\";\r\n }",
"function open_bracket($type=\"AND\")\n {\n $this->ar_where[] = $type . \" (\";\n return $this; \n }",
"function whereQuery() {\n // $arrDate1 = explode(\"-\", $bulantahunpenggajian);\n // $date1 = $arrDate1[0].'-'.$arrDate1[1].'-01';\n // $date2 = $arrDate1[0].'-'.$arrDate1[1].'-'.cal_days_in_month(CAL_GREGORIAN, $arrDate1[1], $arrDate1[0]);\n \n // $wer = \" A.MONTH = '\".$arrDate1[1].\"' AND A.YEAR = \".$arrDate1[0].\"\";\n \n // return $wer;\n return '';\n }",
"protected static function whereFormat($where){\n $whereArray = array();\n\n $operate = ' AND ';\n\n foreach ($where as $key => $set){\n if(is_string($set)){\n if(count($where) == 2){\n list($filed,$value) = $where;\n $whereArray[] = $filed . ' = ' . $value;\n }\n if(count($where) == 3){\n list($filed,$exp,$value) = $where;\n if(in_array($exp, array('=','<=','<>','>=')) && $value){\n $whereArray[] = $filed . \" $exp \" . $value;\n }\n if(in_array($exp, array('in','not in')) && $value){\n $value = implode(',', $value);\n $whereArray[] = $filed . \" $exp \" . \" ($value)\";\n }\n }\n break;\n }elseif(is_array($set)){\n if(count($set) == 2){\n list($filed,$value) = $set;\n $whereArray[] = $filed . ' = ' . $value;\n }\n if(count($set) == 3){\n list($filed,$exp,$value) = $set;\n if(in_array($exp, array('=','<=','<>','>=')) && $value){\n $whereArray[] = $filed . \" $exp \" . $value;\n }\n if(in_array($exp, array('in','not in')) && $value){\n $value = implode(',', $value);\n $whereArray[] = $filed . \" $exp \" . \" ($value)\";\n }\n }\n }\n\n }\n return implode($operate, $whereArray);\n }",
"public function testBuildWhereEmpty()\n {\n $query = $this->getQuery();\n\n $this->assertSame(\n '',\n $query->buildWhere()\n );\n }",
"public function cpSearch($tablename,$value1=0,$value2=0) {\n\n /*\n * Prepare the select statement\n */\n $sql=\"SELECT * FROM $tablename\";\n if($value1!=0)\n { $key1= key($value1);\n $sql.=\" where $key1 like '%$value1[$key1]%'\";\n }\n if($value1!=0 && $value2!=0) \n {\n $key2= key($value2);\n $sql.=\" AND $key2='$value2[$key2]'\";\n }\n \n $sth = $this->dbh->prepare($sql);\n $sth->execute();\n $result = $sth->fetchAll(PDO::FETCH_ASSOC);\n return $result;\n \n}",
"private function _process_where_single($where){\n\t\tif((!isset($where['field'])&&!isset($where['name']))||!isset($where['operator'])){\n\t\t\t$return = '';\n\t\t}else{\n\t\t\tif(!isset($where['value'])){\n\t\t\t\t$where['value'] = '';\n\t\t\t}\n\t\t\t$field\t\t = isset($where['field'])?$where['field']:$where['name'];\n\t\t\t$operator\t = strtoupper($where['operator']);\n\t\t\t$value\t\t = $where['value'];\n\t\t\t$extra\t\t = isset($where['extra'])?$where['extra']:'';\n\t\t\t$escape\t\t = isset($where['escape'])?$where['escape']:'auto'; //this can be : auto (filter/value chooses if escape or not), true (always escapes), false (never escapes)\n\t\t\t$return\t\t = '';\n\n\t\t\t//let's create some backwards compatibility\n\t\t\tswitch($operator){\n\t\t\t\tcase 'F=':\n\t\t\t\tcase 'F>':\n\t\t\t\tcase 'F<':\n\t\t\t\tcase 'F!=':\n\t\t\t\tcase 'F>=':\n\t\t\t\tcase 'F<=':\n\t\t\t\t\t//field base\n\t\t\t\t\t$operator\t = substr($operator, 1);\n\t\t\t\t\t$escape\t\t = false;\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t//fixing some non standard operators\n\t\t\tswitch($operator){\n\t\t\t\tcase '!=':\n\t\t\t\t\t$operator = '<>';\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t//let's prepare the $where['value']\n\t\t\tswitch($operator){\n\t\t\t\tcase 'AGAINST':\n\t\t\t\t\t$value = '(';\n\t\t\t\t\tif(is_array($where['value'])){\n\t\t\t\t\t\t$value .= $this->_escape_field($where['value'][0], $escape);\n\t\t\t\t\t\t$value .= ' '.$where['value'][1];\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$value = $this->_escape_field($where['value'], $escape);\n\t\t\t\t\t}\n\t\t\t\t\t$value .= ')';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'BETWEEN':\n\t\t\t\t\tif(!is_array($where['value'])){\n\t\t\t\t\t\t$where['value'] = array(0, 0);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif(!isset($where['value'][0])) $where['value'][0]\t = 0;\n\t\t\t\t\t\tif(!isset($where['value'][1])) $where['value'][1]\t = 0;\n\t\t\t\t\t}\n\t\t\t\t\t$value\t = $this->_escape_field($where['value'][0], $escape).' AND '.$this->_escape_field($where['value'][1], $escape);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'NOT IN':\n\t\t\t\tcase 'IN':\n\t\t\t\t\t$value\t = '(';\n\t\t\t\t\tif(is_array($where['value'])){\n\t\t\t\t\t\tforeach($where['value'] as $k => $v){\n\t\t\t\t\t\t\t$where['value'][$k] = $this->_escape_field($where['value'][$k], $escape);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$value .= implode(',', $where['value']);\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$value .= $this->_escape_field($where['value'], $escape);\n\t\t\t\t\t}\n\t\t\t\t\t$value .= ')';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'IS':\n\t\t\t\tcase 'IS NOT':\n\t\t\t\t\t//exception to _escape_field because the \"NULL\" will not need to be escaped\n\t\t\t\t\t//so the default behavior is to NOT escape\n\t\t\t\t\tif($escape===false||$escape==='auto'){\n\t\t\t\t\t\t$value = $where['value'];\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$value = '\"'.$this->db->real_escape_string($where['value']).'\"';\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'FIND_IN_SET':\n\t\t\t\tcase 'NOT FIND_IN_SET':\n\t\t\t\t\t$value\t = $this->_escape_field($where['value'], $escape);\n//\t\t\t\tif($escape === false){\n//\t\t\t\t\t$value = $where['value'];\n//\t\t\t\t}else{\n//\t\t\t\t\t$value = '\"'.$this->db->real_escape_string($where['value']).'\"';\n//\t\t\t\t}\n\t\t\t\t\t$return\t = $operator.'('.$value.','.$field.')';\n\t\t\t\t\tbreak;\n\t\t\t\t//all of those are falling into the default\n\t\t\t\t/*\n\t\t\t\t case 'REGEXP':\n\t\t\t\t case 'LIKE':\n\t\t\t\t case '=':\n\t\t\t\t case '!=':\n\t\t\t\t case '>':\n\t\t\t\t case '<':\n\t\t\t\t case '=>':\n\t\t\t\t case '=<':\n\t\t\t\t */\n\t\t\t\tdefault:\n\t\t\t\t\t$value\t = $this->_escape_field($where['value'], $escape);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif($return==''){\n\t\t\t\t$return = $field.' '.$operator.' '.$value.' '.$extra;\n\t\t\t}\n\t\t}\n\t\treturn $return;\n\t}",
"function where( ...$getwherekeys) { \n $whereorhaving = ($this->iswhere) ? 'WHERE' : 'HAVING';\n $this->iswhere = true;\n \n\t\tif (!empty($getwherekeys)){\n\t\t\tif (is_string($getwherekeys[0])) {\n\t\t\t\tforeach ($getwherekeys as $makearray) \n\t\t\t\t\t$wherekeys[] = explode(' ',$makearray);\t\n\t\t\t} else \n\t\t\t\t$wherekeys = $getwherekeys;\t\t\t\n\t\t} else \n\t\t\treturn '';\n\t\t\n\t\tforeach ($wherekeys as $values) {\n\t\t\t$operator[] = (isset($values[1])) ? $values[1]: '';\n\t\t\tif (!empty($values[1])){\n\t\t\t\tif (strtoupper($values[1]) == 'IN') {\n\t\t\t\t\t$wherekey[ $values[0] ] = array_slice($values,2);\n\t\t\t\t\t$combiner[] = (isset($values[3])) ? $values[3]: _AND;\n\t\t\t\t\t$extra[] = (isset($values[4])) ? $values[4]: null;\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\t$wherekey[ (isset($values[0])) ? $values[0] : '1' ] = (isset($values[2])) ? $values[2] : '' ;\n\t\t\t\t\t$combiner[] = (isset($values[3])) ? $values[3]: _AND;\n\t\t\t\t\t$extra[] = (isset($values[4])) ? $values[4]: null;\n\t\t\t\t}\t\t\t\t\n\t\t\t} else {\n $this->setParamaters();\n\t\t\t\treturn false;\n } \n\t\t}\n \n $where='1'; \n if (! isset($wherekey['1'])) {\n $where='';\n $i=0;\n $needtoskip=false;\n foreach($wherekey as $key=>$val) {\n $iscondition = strtoupper($operator[$i]);\n\t\t\t\t$combine = $combiner[$i];\n\t\t\t\tif ( in_array(strtoupper($combine), array( 'AND', 'OR', 'NOT', 'AND NOT' )) || isset($extra[$i])) \n\t\t\t\t\t$combinewith = (isset($extra[$i])) ? $combine : strtoupper($combine);\n\t\t\t\telse \n\t\t\t\t\t$combinewith = _AND;\n if (! in_array( $iscondition, array( '<', '>', '=', '!=', '>=', '<=', '<>', 'IN', 'LIKE', 'NOT LIKE', 'BETWEEN', 'NOT BETWEEN', 'IS', 'IS NOT' ) )) {\n $this->setParamaters();\n return false;\n } else {\n if (($iscondition=='BETWEEN') || ($iscondition=='NOT BETWEEN')) {\n\t\t\t\t\t\t$value = $this->escape($combinewith);\n\t\t\t\t\t\tif (in_array(strtoupper($extra[$i]), array( 'AND', 'OR', 'NOT', 'AND NOT' ))) \n\t\t\t\t\t\t\t$mycombinewith = strtoupper($extra[$i]);\n\t\t\t\t\t\telse \n $mycombinewith = _AND;\n\t\t\t\t\t\tif ($this->getPrepare()) {\n\t\t\t\t\t\t\t$where.= \"$key \".$iscondition.' '._TAG.\" AND \"._TAG.\" $mycombinewith \";\n\t\t\t\t\t\t\t$this->setParamaters($val);\n\t\t\t\t\t\t\t$this->setParamaters($combinewith);\n\t\t\t\t\t\t} else \n\t\t\t\t\t\t\t$where.= \"$key \".$iscondition.\" '\".$this->escape($val).\"' AND '\".$value.\"' $mycombinewith \";\n\t\t\t\t\t\t$combinewith = $mycombinewith;\n\t\t\t\t\t} elseif ($iscondition=='IN') {\n\t\t\t\t\t\t$value = '';\n\t\t\t\t\t\tforeach ($val as $invalues) {\n\t\t\t\t\t\t\tif ($this->getPrepare()) {\n\t\t\t\t\t\t\t\t$value .= _TAG.', ';\n\t\t\t\t\t\t\t\t$this->setParamaters($invalues);\n\t\t\t\t\t\t\t} else \n\t\t\t\t\t\t\t\t$value .= \"'\".$this->escape($invalues).\"', \";\n\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t$where.= \"$key \".$iscondition.\" ( \".rtrim($value, ', ').\" ) $combinewith \";\n\t\t\t\t\t} elseif(((strtolower($val)=='null') || ($iscondition=='IS') || ($iscondition=='IS NOT'))) {\n $iscondition = (($iscondition=='IS') || ($iscondition=='IS NOT')) ? $iscondition : 'IS';\n $where.= \"$key \".$iscondition.\" NULL $combinewith \";\n } elseif((($iscondition=='LIKE') || ($iscondition=='NOT LIKE')) && ! preg_match('/[_%?]/',$val)) return false;\n else {\n\t\t\t\t\t\tif ($this->getPrepare()) {\n\t\t\t\t\t\t\t$where.= \"$key \".$iscondition.' '._TAG.\" $combinewith \";\n\t\t\t\t\t\t\t$this->setParamaters($val);\n\t\t\t\t\t\t} else \n\t\t\t\t\t\t\t$where.= \"$key \".$iscondition.\" '\".$this->escape($val).\"' $combinewith \";\n\t\t\t\t\t}\n $i++;\n }\n }\n $where = rtrim($where, \" $combinewith \");\n }\n\t\t\n if (($this->getPrepare()) && !empty($this->getParamaters()) && ($where!='1'))\n\t\t\treturn \" $whereorhaving \".$where.' ';\n\t\telse\n\t\t\treturn ($where!='1') ? \" $whereorhaving \".$where.' ' : ' ' ;\n }",
"private function where($where, &$params) {\n if (!isset($where)) {\n return false;\n }\n $rwhere = '';\n if (is_array($where)) {\n $rwhere = 'WHERE ';\n foreach ($where as $k => $v) {\n $v = trim($v);\n if (substr($v, 0, 1) == '\"' || substr($v, 0, 1) == \"'\" || substr($v, 0, 2) == 'fn') {\n $s = $v;\n } else {\n $va = ':w_' . $k;\n $params[$va] = empty($v) ? null : $v;\n $s = $va;\n }\n $rwhere .= \" `\" . $k . \"` = \" . $s . \" AND\";\n }\n $rwhere = substr($rwhere, 0, -4);\n } else {\n $rwhere = $where;\n }\n\n return $rwhere;\n }",
"public function getWhereClause() {\n\n\tif (isset($this->filters) && !empty($this->filters)) {\n\t\t// $aClause = array();\n\t\t// $aOperators = array();\n\t\t$sClause = '';\n\t switch ($this->type) {\n\t\tcase 0:\n\t\tcase 4:\n\t\tdefault:\n\t\t \n\t\t $aWhere = $this->getFilter($this->filters);\n\t\t if ($aWhere) {\n\t\t \t$i = 1;\n\t\t\t\tforeach ($aWhere as $key => $value) {\n\t\t\t\t // $this->model->where($key, $value);\n\t\t\t\t $sClause .= $key . ' = ' . $value . (count($aWhere) == $i++ ? '' : ' OR ');\n\t\t\t\t}\n\t\t }\n\t\t break;\n\t\tcase 1:\n\t\t $aWhere = $this->getLikeFilter($this->filters);\n\t\t if ($aWhere) {\n\t\t \t$i = 1;\n\t\t\t\tforeach ($aWhere as $key => $value) {\n\t\t\t\t // $this->model->where_like($key, $value);\n\t\t\t\t $sClause .= $key . ' LIKE ' . $value . (count($aWhere) == $i++ ? '' : ' OR ');\n\t\t\t\t}\n\t\t }\n\t\t break;\n\t\tcase 2:\n\t\t $aWhere = $this->getRangeFilter($this->filters);\n\t\t if ($aWhere) {\n\t\t \t$i = 1;\n\t\t\t\tforeach ($aWhere as $key => $value) {\n\t\t\t\t // $this->model->where_raw($key, $value);\n\t\t\t\t\t$sClause .= vsprintf(str_replace('?','%s',$key),$value) . (count($aWhere) == $i++ ? '' : ' OR ');\n\t\t\t\t}\n\t\t }\n\t\t break;\n\t\tcase 3:\n\t\t $aWhere = $this->getInFilter($this->filters);\n\t\t if ($aWhere) {\n\t\t \t$i = 1;\n\t\t\t\tforeach ($aWhere as $key => $value) {\n\t\t\t\t\t$sClause .= $key . ' IN (' . implode(',',$value) . ')' . (count($aWhere) == $i++ ? '' : ' OR ');\n\t\t\t\t // $this->model->where_in($key, $value);\n\t\t\t\t}\n\t\t }\n\t\t break;\n\t\tcase 5:\n\t\t $aWhere = $this->getInRawFilter($this->filters);\n\t\t if ($aWhere) {\n\t\t \t$i = 1;\n\t\t\t\tforeach ($aWhere as $key => $value) {\n\t\t\t\t // $this->model->where_raw($key, $value);\n\t\t\t\t\t$sClause .= vsprintf(str_replace('?','%s',$key),$value) . (count($aWhere) == $i++ ? '' : ' OR ');\n\t\t\t\t}\n\t\t }\n\t\t break;\n\t\tcase 6:\n\t\t $aWhere = $this->getDependendFilter($this->filters);\n\t\t if ($aWhere) {\n\t\t \t$i = 1;\n\t\t\t\tforeach ($aWhere as $key => $value) {\n\t\t\t\t // $this->model->where_raw($value, array());\n\t\t\t\t $sClause .= $value . (count($aWhere) == $i++ ? '' : ' OR ');\n\t\t\t\t}\n\t\t }\n\t\t break;\n\t }\n\t}\n\treturn $sClause;\n\t// return $this->model;\n }",
"function tck_admin_list_where($where) {\n if ( isset($_GET['custom_filter']) ) {\n $mode = $_GET['custom_filter'];\n \n if ( $mode == 1 ) $where .= ' AND `' . TCK_COLUMN . '` = 0';\n if ( $mode == 2 ) $where .= ' AND `' . TCK_COLUMN . '` = 1';\n }\n \n return $where;\n }",
"public function firstWhere(array $where, $columns = ['*']);",
"function f_json_where($post){\n #$temp['count'] = 0;\n if (array_key_exists(\"select\", $post)) {\n #Seleciona o valor do nome dos campos de $post['select']\n $temp['key'] = array_keys($post['select']);\n $temp['key']['count'] = count($temp['key']); # conto quanto valores\n\n #Seleciona o valor dentro dos campos de $post['select']\n $temp['val'] = array_values($post['select']);\n $temp['val']['count'] = count($temp['val']); # conto quanto valores\n\n\n # Laço para atribuir os valores de where #\n for ($temp['count']=0; $temp['count'] < $temp['val']['count']; $temp['count']++) {\n\n #verifico o tipo de seleção no were\n if ($post['regra']['where'] == \"LIKE\" or $post['regra']['where'] == \"=\") {\n # construo where\n if($temp['count'] <= 0) {\n #quando a primeira regra\n $temp['where'] = '`'.$temp['key'][$temp['count']].'` '.$post['regra']['where'].' \\''.$temp['val'][$temp['count']].'\\' ';\n }else{\n #quando mais de uma regra\n $temp['where'] = $temp['where'] .'AND `'.$temp['key'][$temp['count']].'` '.$post['regra']['where'].' \\''.$temp['val'][$temp['count']].'\\' ';\n }\n }\n\n else if ($post['regra']['where'] == \"LIKE%\") {\n # construo where\n if($temp['count'] <= 0) {\n #quando a primeira regra\n $temp['where'] = '`'.$temp['key'][$temp['count']].'` LIKE \\'%'.$temp['val'][$temp['count']].'%\\' ';\n }else{\n #quando mais de uma regra\n $temp['where'] = $temp['where'] .'AND `'.$temp['key'][$temp['count']].'` LIKE \\'%'.$temp['val'][$temp['count']].'%\\' ';\n }\n }\n } #final do laço\n\n # defino regra \n $regra['WHERE '] = $temp['where'];\n $regra['ORDER BY '] = '`'.$post['regra']['order']['to'].'` '.$post['regra']['order']['by'].'';\n # defino limite dentro de regra\n if ($post['regra']['limit'] > '0') {\n $regra['LIMIT '] = $post['regra']['limit']; \n }\n\n # apago temp\n unset($temp);\n\n #retorno regra para a função\n return $regra;\n }\n}",
"function setWhereArray() {\t\t\n\t\tif(isset($_GET['searchSubmit']) || empty(session()->get('warray'))) {\n\t\t\t$this->addToWhereArray('searchLoc','city','like');\n\t\t\t$this->addToWhereArray('searchSizeMin','size','>');\n\t\t\t$this->addToWhereArray('searchSizeMax','size','<');\n\t\t\t$this->addToWhereArray('rentOrSell','rentOrSell','=');\n\n\t\t\tsession()->put('warray',$this->whereArray);\t\t\n\t\t} else {\t\t\t\t\n\t\t\t$this->whereArray = session()->get('warray');\n\t\t}\n\t}",
"public function clearCondition(){\n\t\t$this->where=\"\";\n\t}",
"public function testSelectWithEmptyArrayWhereParameter()\n {\n $this->db->select(\"test\", new DBField('id'), []);\n $this->assertEquals(\"SELECT `id` FROM test\", (string) $this->db);\n }",
"private function setWhereFilters($where, $params, $hashTodiscard = null) {\r\n \r\n for ($i = count($where); $i--;) {\r\n \r\n /*\r\n * Only one toponym is supported (the last one) \r\n */\r\n if (isset($where[$i]['geo:lon'])) {\r\n $params['geo:lon'] = $where[$i]['geo:lon'];\r\n $params['geo:lat'] = $where[$i]['geo:lat'];\r\n }\r\n /*\r\n * Searching for hash/keywords is faster than geometry\r\n */\r\n else if (isset($where[$i]['searchTerms'])) {\r\n $params['searchTerms'][] = $where[$i]['searchTerms'];\r\n }\r\n else if (isset($where[$i]['hash'])) {\r\n if (!isset($hashTodiscard) || $where[$i]['hash'] !== $hashTodiscard) {\r\n $params['searchTerms'][] = 'geohash:' . $where[$i]['hash'];\r\n }\r\n }\r\n /*\r\n * Geometry\r\n */\r\n else {\r\n $params['geo:geometry'] = $where[$i]['geo:geometry'];\r\n }\r\n }\r\n if (count($params['searchTerms']) > 0) {\r\n $params['searchTerms'] = join(' ', $params['searchTerms']);\r\n }\r\n else {\r\n unset($params['searchTerms']);\r\n }\r\n return $params;\r\n }",
"public function where() {\r\n\t\t$args = func_get_args();\r\n\t\treturn call_user_func_array(array($this, 'andWhere'), $args);\r\n\t}",
"function inputted_to_sql_for_search($row,$i)\n\t{\n\t\treturn NULL;\n\t}",
"public function testBuildWhereWithOneArgument()\n {\n $query = $this->getQuery()\n ->where('param', 'value')\n ;\n\n $this->assertSame(\n \"WHERE param = 'value'\",\n $query->buildWhere()\n );\n }",
"private function sql_whereAnd_fromTS()\n {\n // Get table and field\n list( $table, $field ) = explode( '.', $this->curr_tableField );\n\n // Get TS value\n $andWhere = $this->conf_view[ 'filter.' ][ $table . '.' ][ $field . '.' ][ 'sql.' ][ 'andWhere' ];\n\n if ( !empty( $andWhere ) )\n {\n $andWhere = \" AND \" . $andWhere;\n }\n\n // RETURN AND WHERE statement\n return $andWhere;\n }",
"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}",
"private function buildWhere ($array) {\n\n // Only do anything if the array contains anything\n if($array){ \n\n // Loop through the array where $key is the column name and $value are the \n // array containing the operator [0] and values [1]\n foreach($array as $key => $value){ \n\n // We set each element of the where clause to $this->where before setting it to\n // $this->show_where. If it already exists we must have already have something\n // in the where clause so set $preSql to ' AND ' otherwise set it to ' WHERE '\n $preSql = (isset($this->where)) ? ' AND ' : ' WHERE ';\n\n // As we need different ways of building the where clause elements, depending on\n // the operator ($value[0]), we run a switch statement to call the function to\n // build the correct type of element, passing in the field name ($key) and the\n // operator and criteria ($value array)\n switch($value[0]) {\n case '>':\n case '<':\n case '=':\n case '<=':\n case '>=':\n case '!=':\n case '<>':\n case 'LIKE':\n $this->where = $this->whereElementStandard ($key, $value);\n break;\n\n case 'IN':\n $this->where = $this->whereElementIn ($key, $value); \n break;\n\n case 'BETWEEN':\n $this->where = $this->whereElementBetween ($key, $value); \n break;\n case 'NULL':\n case 'NOT NULL':\n $this->where = $this->whereElementNull ($key, $value); \n break;\n\n default:\n $this->where = $this->whereElementStandard ($key, $value);\n break;\n } // End switch\n\n \n // Add the created where clause elements to $this->show_where\n $this->show_where .= $preSql.$this->where;\n } // End foreach\n } // End if $array\n }",
"function processedWhereClause($where) {\n\t$x = explode(\" \", $where);\n\t$temp_where = \"\";\n\tforeach($x as $value) {\n\t\t$temp_where .= \" \";\n\t\tif(strpos($value, \"=\")) {\n\t\t\t$kv = explode(\"=\", $value);\n\t\t\t$temp_where .= $kv[0] . \"='\" . $kv[1] . \"'\";\n\t\t} else {\n\t\t\t$temp_where .= $value;\n\t\t}\n\t} \n\t$where = $temp_where;\n\treturn $where;\n}",
"function where(array $data, array $whereOptions) : array\n{\n if (count($whereOptions) !== 3) {\n return $data;\n }\n\n $columnData = array_column($data, $whereOptions['coloana']);\n\n if ($whereOptions['semn'] === '<>') {\n foreach ($columnData as $key => $value) {\n if ($value == $whereOptions['valoare']) {\n unset($data[$key]);\n }\n\n }\n }\n if ($whereOptions['semn'] === '=') {\n foreach ($columnData as $key => $value) {\n if ($value <> $whereOptions['valoare']) {\n unset($data[$key]);\n }\n\n }\n }\n if ($whereOptions['semn'] === '>') {\n foreach ($columnData as $key => $value) {\n if ($value < $whereOptions['valoare']) {\n unset($data[$key]);\n }\n\n }\n }\n if ($whereOptions['semn'] === '<') {\n foreach ($columnData as $key => $value) {\n if ($value > $whereOptions['valoare']) {\n unset($data[$key]);\n }\n\n }\n }\n\n return array_values($data);\n}",
"function dbWhereVars() {\n\n foreach ($this->fields() as $f) {\n if ($this->$f === false) continue;\n $this->db->where($this->model.'.'.$f,$this->$f);\n }\n\n }",
"public function whereOr($value) {\n\t$this->parseQuery->where('$or', $value);\n }",
"public function andWhere() {\r\n\t\t$args = func_get_args();\r\n\t\t$statement = array_shift($args);\r\n\t\t//if ( (count($args) == 1) && (is_null($args[0])) ) {\r\n\t\t//\t$this->_wheres = array();\r\n\t\t//\treturn null;\r\n\t\t//}\r\n\t\t$criteria = new Dbi_Sql_Criteria($this, new Dbi_Sql_Expression($statement, $args));\r\n\t\t$this->_wheres[] = $criteria;\r\n\t\treturn $criteria;\r\n\t}",
"function parseToWhere($vars,$bool,$selx,$etype) {\n $arVars=explode(';',$vars);\n $arBool=explode(';',$bool);\n $arSelx=explode(';',$selx);\n $arEtype=explode(';',$etype);\n \n $i=0;\n //$iMax=0;\n $whereClause='';\n //$chosenOnes=array();\n \n foreach($arVars AS $varName) {\n if ($whereClause) {$whereClause.=$arBool[$i];}\n if (substr($arSelx[$i],0,2)=='__') {\n $op=substr($arSelx[$i],2,2);\n $val=substr($arSelx[$i],4);\n if ($op=='lt') {$whereClause.=' ('.$varName.\"<'\".$val.\"') \";}\n elseif ($op=='eq') {$whereClause.=' ('.$varName.\"='\".$val.\"') \";}\n elseif ($op=='gt') {$whereClause.=' ('.$varName.\">'\".$val.\"') \";}\n elseif ($op=='rg') {\n $v0=substr($val,0,strpos($val,'_'));\n $v1=substr($val,strpos($val,'_')+1);\n $whereClause.=\" ($varName>='$v0' AND $varName<='$v1') \";\n }\n else {$nought=0;}\n } elseif ($arEtype[$i]=='text') {\n $whereClause.=' ('.$varName.\" LIKE '%\".$arSelx[$i].\"%') \";\n } else {\n $whereClause.=' ('.$varName.\"='\".$arSelx[$i].\"') \";\n }\n $i++;\n }\n return $whereClause;\n}",
"static function where(){\r\n\t\t$arr = func_get_args();\r\n\t\t// tao ra lop static \r\n\t\t$model = new static();\r\n\t\t$tb = call_user_func_array(array($model->mask(), 'where'), $arr);\r\n\r\n\t\treturn $model;\r\n\t}",
"public function Filter_Not() {\r\n\t\treturn array(\r\n\t\t\t'where' => '0'\r\n\t\t);\r\n\t}",
"public function findOne(array $where);",
"private function setWhereFilters($where, $params, $hashTodiscard = null)\n {\n for ($i = count($where); $i--;) {\n /*\n * Geometry\n */\n if (isset($where[$i]['wkt'])) {\n $params['geo:geometry'] = $where[$i]['wkt'];\n }\n /*\n * Only one toponym is supported (the last one)\n */\n elseif (isset($where[$i]['coordinates'])) {\n $coordinates = array_map('trim', explode(',', $where[$i]['coordinates']));\n $params['geo:lon'] = floatval($coordinates[1]);\n $params['geo:lat'] = floatval($coordinates[0]);\n }\n /*\n * Searching for hash/keywords is faster than geometry\n */\n elseif (isset($where[$i]['searchTerms'])) {\n $params['searchTerms'][] = $where[$i]['searchTerms'];\n } elseif (isset($where[$i]['geouid'])) {\n if (!isset($hashTodiscard) || $where[$i]['hash'] !== $hashTodiscard) {\n $params['searchTerms'][] = 'geouid' . RestoConstants::TAG_SEPARATOR . $where[$i]['geonameid'];\n }\n }\n }\n if (count($params['searchTerms']) > 0) {\n $params['searchTerms'] = join(' ', $params['searchTerms']);\n } else {\n unset($params['searchTerms']);\n }\n return $params;\n }",
"public function whereArray($wheres){\r\n\t\tforeach($wheres as $k => $v){\r\n\t\t\t$this->where(\"`$k`=?\", $v);\r\n\t\t}\r\n\t}",
"static function add_condition($where=array(),$cond='',$key=NULL,$value=NULL) {\n\tif ($cond) $where['cond'][]=$cond;\n\t$args=func_get_args();\n\tfor ($i=2; $i<count($args); $i=$i+2) {\n\t\tif (isset($args[$i])) $where['value'][$args[$i]]=isset($args[$i+1])?$args[$i+1]:NULL;\n\t}\n\treturn $where;\n}",
"function where($callback,$strict = false){\r\n \treturn Arr::where($callback, $this, $strict);\r\n }",
"public function zero()\n {\n $this->assertFalse($this->orCriterion->hasCriterion());\n $this->orCriterion->toSQL();\n }",
"function Select_Record_By_One_Filter($data, $table_name) {\r\n global $con;\r\n $key = array_keys($data);\r\n $value = array_values($data);\r\n $sql = \"select * from $table_name where $key[0] = '$value[0]'\";\r\n try {\r\n $stmt = $con->query($sql);\r\n return $stmt;\r\n } catch (PDOException $e) {\r\n print $e->getMessage();\r\n }\r\n}",
"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}",
"function wpfc_temp_filter_where( $where = '' ) {\n\t \t$where .= \" AND post_date >= '\".date(\"Y-m-d\", $_REQUEST['start']).\"' AND post_date < '\".date(\"Y-m-d\", $_REQUEST['end']).\"'\";\n\t \treturn $where;\n\t }",
"public function find(array $where);",
"private function generateWhereString($array){\n\t\t$str = \" WHERE \";\n\t\tforeach($array as $k => $v){\n\t\t\t$str .= \" $k = $v\";\n\t\t}\n\t\treturn $str;\n\t}",
"public function where( array $value )\n {\n $this->query('where', $value);\n }",
"public function testPDONewWhere()\n {\n $mod = Read::Factory($this->_table, $this->_db, \"MysqlPDO\");\n\n $where = [\n \"(\",\n\n \"(\",\n ['fend_test.`db`.user_id', 14],\n ['users.user_name', 'oak'],\n ['`users`.user_id', \">=\", 0],\n \")\",\n\n \"OR\",\n\n \"(\",\n ['`user_id`', \"<=\", 10000],\n ['user_id', \"like\", '57%'],\n \")\",\n\n \")\",\n\n \"OR\",\n\n ['user_id', \"in\", [1, 2, 3, 4, 5, 6]],\n\n \"OR\",\n\n \"(\",\n ['user_id', \"not in\", ['a', 'c', 'd', 'f']],\n \" `user_name` = 'yes' \",\n \")\",\n\n ];\n $mod->where($where);\n $sql = $mod->getSql();\n self::assertEquals('SELECT * FROM users WHERE ( ( `fend_test`.`db`.`user_id` = \\'14\\' AND `users`.`user_name` = \\'oak\\' AND `users`.`user_id` >= \\'0\\' ) OR ( `user_id` <= \\'10000\\' AND `user_id` like \\'57%\\' ) ) OR `user_id` in (\\'1\\',\\'2\\',\\'3\\',\\'4\\',\\'5\\',\\'6\\') OR ( `user_id` not in (\\'a\\',\\'c\\',\\'d\\',\\'f\\') AND `user_name` = \\'yes\\' ) ', $sql);\n\n }",
"public function testBuildWhereOnlyOr()\n {\n $query = $this->getQuery()\n ->whereOr(\n $this->getQuery()\n ->table('table1')\n ->where('id', 100)\n ->where('is_admin', 1)\n )\n ;\n\n $this->assertSame(\n \"WHERE (table1.id = '100' OR table1.is_admin = '1')\",\n $query->buildWhere()\n );\n }",
"public function testWhereEqualsNull()\n {\n $query = (new WhereBuilder($this->mockConnection))->where('field', '=', null);\n $array = $query->toArray();\n\n $this->assertInstanceOf(WhereBuilder::class, $query);\n $this->assertEquals([\n 'where' => [\n [\n 'column' => 'field',\n 'operator' => 'is',\n 'value' => 'NULL',\n 'boolean' => 'and',\n ]\n ]\n ], $array);\n }",
"public function and_where_open()\n {\n $this->_where[] = array('AND' => '(');\n return $this;\n }",
"public function operatorNy()\n\t{\n\t\treturn ['and',\n\t\t\t['not', [$this->getColumnName() => null]],\n\t\t\t['<>', $this->getColumnName(), ''],\n\t\t\t['<>', $this->getColumnName(), 0],\n\t\t];\n\t}",
"public function buildWhereClause()\n {\n $criterias = $this->bean->ownCriteria;\n if (empty($criterias)) {\n return '1';\n }// find all because there are no criterias\n $where = array();\n $this->filter_values = array();\n //$mask = \" %s %s %s\"; // login, field, op (with masked value)\n $n = 0;\n foreach ($criterias as $id=>$criteria) {\n if (! $criteria->op) {\n continue;\n } // skip all entries that say any!\n if ($criteria->value === null || $criteria->value === '') {\n continue;\n } // skip all empty\n $n++;\n $logic = 'AND ';//$criteria->logic;\n if ($n == 1) {\n $logic = '';\n }\n $where[] = $logic.$criteria->makeWherePart($this);\n }\n\n if (empty($where)) {\n return '1';\n }// find all because there was no active criteria\n\n $where = implode(' ', $where);\n return $where;\n }",
"function realstate_search_conditions($params = null) {\n\n // we need conditions and search tables (only if we're using our custom tables)\n if ($params!=null) {\n $has_conditions = false;\n foreach ($params as $key => $value) {\n if ($value != \"\") {\n // We may want to have param-specific searches\n switch ($key) {\n case 'numFloor':\n if (preg_match('|([0-9]+) - ([0-9]+)|', $value, $match)) {\n ClassLoader::getInstance()->getClassInstance( 'Model_Search' )->addConditions(sprintf(\"%st_item_house_attr.i_num_floors >= %d AND %st_item_house_attr.i_num_floors <= %d\", DB_TABLE_PREFIX, $match[1], DB_TABLE_PREFIX, $match[2]));\n $has_conditions = true;\n }\n break;\n case 'rooms':\n if (preg_match('|([0-9]+) - ([0-9]+)|', $value, $match)) {\n ClassLoader::getInstance()->getClassInstance( 'Model_Search' )->addConditions(sprintf(\"%st_item_house_attr.i_num_rooms >= %d AND %st_item_house_attr.i_num_rooms <= %d\", DB_TABLE_PREFIX, $match[1], DB_TABLE_PREFIX, $match[2]));\n $has_conditions = true;\n }\n break;\n case 'rooms_min':\n ClassLoader::getInstance()->getClassInstance( 'Model_Search' )->addConditions(sprintf(\"%st_item_house_attr.i_num_rooms >= %d\", DB_TABLE_PREFIX, $value));\n $has_conditions = true;\n break;\n case 'bathrooms':\n if (preg_match('|([0-9]+) - ([0-9]+)|', $value, $match)) {\n ClassLoader::getInstance()->getClassInstance( 'Model_Search' )->addConditions(sprintf(\"%st_item_house_attr.i_num_bathrooms >= %d AND %st_item_house_attr.i_num_bathrooms <= %d\", DB_TABLE_PREFIX, $match[1], DB_TABLE_PREFIX, $match[2]));\n $has_conditions = true;\n }\n break;\n case 'garages':\n if (preg_match('|([0-9]+) - ([0-9]+)|', $value, $match)) {\n ClassLoader::getInstance()->getClassInstance( 'Model_Search' )->addConditions(sprintf(\"%st_item_house_attr.i_num_garages >= %d AND %st_item_house_attr.i_num_garages <= %d\", DB_TABLE_PREFIX, $match[1], DB_TABLE_PREFIX, $match[2]));\n $has_conditions = true;\n }\n break;\n case 'year':\n if (preg_match('|([0-9]+) - ([0-9]+)|', $value, $match)) {\n ClassLoader::getInstance()->getClassInstance( 'Model_Search' )->addConditions(sprintf(\"(%st_item_house_attr.i_year = 0 || (%st_item_house_attr.i_year >= %d AND %st_item_house_attr.i_year <= %d))\", DB_TABLE_PREFIX, DB_TABLE_PREFIX, $match[1], DB_TABLE_PREFIX, $match[2]));\n $has_conditions = true;\n }\n break;\n case 'sq':\n if (preg_match('|([0-9]+) - ([0-9]+)|', $value, $match)) {\n ClassLoader::getInstance()->getClassInstance( 'Model_Search' )->addConditions(sprintf(\"%st_item_house_attr.s_square_meters >= %d AND %st_item_house_attr.s_square_meters <= %d\", DB_TABLE_PREFIX, $match[1], DB_TABLE_PREFIX, $match[2]));\n $has_conditions = true;\n }\n break;\n case 'heating':\n ClassLoader::getInstance()->getClassInstance( 'Model_Search' )->addConditions(sprintf(\"%st_item_house_attr.b_heating = %d \", DB_TABLE_PREFIX, $value));\n $has_conditions = true;\n break;\n case 'airCondition':\n ClassLoader::getInstance()->getClassInstance( 'Model_Search' )->addConditions(sprintf(\"%st_item_house_attr.b_air_condition = %d \", DB_TABLE_PREFIX, $value));\n $has_conditions = true;\n break;\n case 'elevator':\n ClassLoader::getInstance()->getClassInstance( 'Model_Search' )->addConditions(sprintf(\"%st_item_house_attr.b_elevator = %d \", DB_TABLE_PREFIX, $value));\n $has_conditions = true;\n break;\n case 'terrace':\n ClassLoader::getInstance()->getClassInstance( 'Model_Search' )->addConditions(sprintf(\"%st_item_house_attr.b_terrace = %d \", DB_TABLE_PREFIX, $value));\n $has_conditions = true;\n break;\n case 'parking':\n ClassLoader::getInstance()->getClassInstance( 'Model_Search' )->addConditions(sprintf(\"%st_item_house_attr.b_parking = %d \", DB_TABLE_PREFIX, $value));\n $has_conditions = true;\n break;\n case 'furnished':\n if ($value != \"\") {\n ClassLoader::getInstance()->getClassInstance( 'Model_Search' )->addConditions(sprintf(\"%st_item_house_attr.b_furnished = %d \", DB_TABLE_PREFIX, $value));\n $has_conditions = true;\n }\n break;\n case 'new':\n ClassLoader::getInstance()->getClassInstance( 'Model_Search' )->addConditions(sprintf(\"%st_item_house_attr.b_new = %d \", DB_TABLE_PREFIX, $value));\n $has_conditions = true;\n break;\n case 'by_owner':\n ClassLoader::getInstance()->getClassInstance( 'Model_Search' )->addConditions(sprintf(\"%st_item_house_attr.b_by_owner = %d \", DB_TABLE_PREFIX, $value));\n $has_conditions = true;\n break;\n case 'property_type':\n if($value!='') {\n ClassLoader::getInstance()->getClassInstance( 'Model_Search' )->addConditions(sprintf(\"%st_item_house_attr.e_type = '%s' \", DB_TABLE_PREFIX, $value));\n $has_conditions = true;\n }\n break;\n case 'p_type':\n if($value!='') {\n ClassLoader::getInstance()->getClassInstance( 'Model_Search' )->addConditions(sprintf(\"%st_item_house_attr.fk_i_property_type_id = %d \", DB_TABLE_PREFIX, $value));\n }\n $has_conditions = true;\n break;\n default:\n break;\n }\n }\n }\n\n // Only if we have some values at the params we add our table and link with the ID of the item.\n if ($has_conditions) {\n ClassLoader::getInstance()->getClassInstance( 'Model_Search' )->addConditions(sprintf(\"%st_item.pk_i_id = %st_item_house_attr.fk_i_item_id \", DB_TABLE_PREFIX, DB_TABLE_PREFIX));\n ClassLoader::getInstance()->getClassInstance( 'Model_Search' )->addConditions(sprintf(\"%st_item.pk_i_id = %st_item_house_description_attr.fk_i_item_id \", DB_TABLE_PREFIX, DB_TABLE_PREFIX));\n ClassLoader::getInstance()->getClassInstance( 'Model_Search' )->addTable(sprintf(\"%st_item_house_attr\", DB_TABLE_PREFIX));\n ClassLoader::getInstance()->getClassInstance( 'Model_Search' )->addTable(sprintf(\"%st_item_house_description_attr\", DB_TABLE_PREFIX));\n }\n }\n}",
"protected function constructWhere($where)\n {\n if (is_array($where)) {\n $equals = array();\n \n foreach ($where as $column => $value) {\n $equals[] = new Equal($column, $value);\n }\n\n $this->where = new Where(new AndOperator($equals));\n } else {\n $this->where = new Where($where);\n }\n }",
"public function testWhere()\n {\n $index = new Index();\n $query = new Query($index);\n $query->where([\n 'name.first' => 'jose',\n 'age >' => 29,\n 'or' => [\n 'tags in' => ['cake', 'php'],\n 'interests not in' => ['c#', 'java'],\n ],\n ]);\n\n $compiled = $query->compileQuery()->toArray();\n\n $filter = $compiled['query']['bool']['filter'][0]['bool']['must'];\n\n $expected = ['term' => ['name.first' => 'jose']];\n $this->assertEquals($expected, $filter[0]);\n\n $expected = ['range' => ['age' => ['gt' => 29]]];\n $this->assertEquals($expected, $filter[1]);\n\n $expected = ['terms' => ['tags' => ['cake', 'php']]];\n $this->assertEquals($expected, $filter[2]['bool']['should'][0]);\n\n $expected = [\n 'bool' => [\n 'must_not' => [\n ['terms' => ['interests' => ['c#', 'java']]],\n ],\n ],\n ];\n $this->assertEquals($expected, $filter[2]['bool']['should'][1]);\n\n $query->where(function (QueryBuilder $builder) {\n return $builder->and(\n $builder->term('another.thing', 'value'),\n $builder->exists('stuff')\n );\n });\n\n $compiled = $query->compileQuery()->toArray();\n $filter = $compiled['query']['bool']['filter'][0]['bool']['must'];\n $filter = $filter[3]['bool']['must'];\n $expected = [\n ['term' => ['another.thing' => 'value']],\n ['exists' => ['field' => 'stuff']],\n ];\n $this->assertEquals($expected, $filter);\n\n $query->where(['name.first' => 'jose'], [], true);\n $compiled = $query->compileQuery()->toArray();\n $filter = $compiled['query']['bool']['filter'][0]['bool']['must'];\n $expected = ['term' => ['name.first' => 'jose']];\n $this->assertEquals([$expected], $filter);\n }",
"public function searchWhere(array $data)\n {\n $this->populateEntity($data);\n\n $where = array();\n\n foreach($data as $key => $value){\n if(strripos($key , '_begin')){\n $dateColumn = str_replace('_begin' , '', $key);\n $dateBegin = $key;\n } else if(strripos($key , '_end')) {\n $dateEnd = $key;\n }\n }\n\n if($dateBegin && $dateEnd && !empty($data[$dateBegin]) && !empty($data[$dateEnd])){\n $dataWhere[] = \" ({$dateColumn} BETWEEN TO_DATE('{$data[$dateBegin]}' , 'DD/MM/YYYY') AND TO_DATE('{$data[$dateEnd]}' , 'DD/MM/YYYY'))\";\n }\n\n foreach($this->entity as $nameColumn => $entity){\n if(!empty($entity['value']) ){\n if($entity['type'] == 'integer' || $entity['type'] == 'numeric'){\n $dataWhere[] = \"{$nameColumn} = '{$entity['value']}'\";\n } else if ($entity['type'] == 'date' || $entity['type'] == 'timestamp with time zone'){\n $dataWhere[] = \"TO_CHAR({$nameColumn} , 'DD/MM/YYYY') = '{$entity['value']}'\";\n } else {\n $dataWhere[] = \"{$nameColumn} ILIKE '%{$entity['value']}%'\";\n }\n }\n }\n\n if( $dataWhere && count($dataWhere) > 0 ) {\n $where = implode(' AND ' , $dataWhere );\n } else {\n $where = '';\n }\n\n $this->clearEntity();\n\n return $where;\n }",
"private function getBaseQuery (array $where) : QueryBuilder\n {\n $queryBuilder = $this->repository->createQueryBuilder(\"t\");\n\n // apply the where clauses\n if (!empty($where))\n {\n $whereCondition = $queryBuilder->expr()->andX();\n $index = 0;\n\n foreach ($where as $key => $value)\n {\n if (null === $value)\n {\n $whereCondition->add(\"t.{$key} IS NULL\");\n }\n else\n {\n $whereCondition->add(\"t.{$key} = :where_value_{$index}\");\n $queryBuilder->setParameter(\"where_value_{$index}\", $value);\n }\n\n ++$index;\n }\n\n $queryBuilder->andWhere($whereCondition);\n }\n\n return $queryBuilder;\n }",
"public function sku_search( $where ) {\n\t\treturn $where;\n\t}",
"function sql_condition_statemment(array $criteria, int $totalCount)\n {\n // Init\n $sql = \"\";\n\n // Rendr base on condition\n $count = 0;\n foreach ($criteria as $filter => $value) {\n\n $str = (is_array($value)) \n ? objectSearchHandle($filter, $value)\n : \"$filter = '$value'\";\n \n $is_not_last = ($totalCount - 1 != $count);\n\n if($str):\n $sql .= $str;\n $sql .= ($is_not_last) ? \" AND \" : \"\";\n endif;\n\n $count ++;\n }\n // Return\n return $sql;\n }",
"function dataSearchEmpty() {\n global $MStudent;\n $me = $MStudent->me();\n $gender = $me['gender'];\n\n return array(\n 'location' => '', 'startdate' => '', 'enddate' => '', 'price0' => '',\n 'price1' => '', 'people' => '', 'roomtype' => 'Any',\n 'buildingtype' => 'Any', 'occupancy' => '', 'sortby' => '',\n 'gender' => $gender, 'amenities' => array(), 'proximity' => ''\n );\n }",
"public function search_open_activ($params, $pe)\n {\n $this->load($params);\n\n// ddd($pe);\n\n $query = mts_crm::find()\n ->select([\n 'id',\n 'id_ap',\n 'id_pe',\n 'mts_id',\n 'sprwhelement_ap.name',\n 'sprwhelement_pe.name',\n 'sprwhelement_mts.name',\n 'dt_create_timestamp',\n 'dt_update_timestamp', ///\n\n 'job_fin',\n 'job_fin_timestamp',\n 'zakaz_fin',\n 'zakaz_fin_timestamp',\n ])\n ->with('sprwhelement_mts', 'sprwhelement_ap', 'sprwhelement_pe')\n ->where(['AND',\n ['<>', 'job_fin', (int)1],\n ['==', 'id_pe', (int)$pe]\n ]\n );\n\n //ddd($query);\n\n\n $dataProvider = new ActiveDataProvider(\n [\n 'query' => $query,\n 'pagination' => ['pageSize' => 10],\n ]\n );\n\n\n if (!$this->validate()) {\n return $dataProvider;\n }\n\n\n $now_time = strtotime('now');\n $now_start_day = strtotime('today');\n $now_end_day = strtotime('today +24 hours');\n\n\n if (isset($params['posttz']['three'])) {\n\n if (isset($params['posttz']['three']) && $params['posttz']['three'] == 1) { //Просрочено\n $query\n //->andFilterWhere( [ '<=', 'dt_deadline', $now_end_day ] );\n ->andFilterWhere(['<=', 'dt_deadline_timestamp', (int)$now_end_day]);\n\n } elseif (isset($params['posttz']['three']) && $params['posttz']['three'] == 2) { /// Сегодня\n $query\n ->andFilterWhere(['>=', 'dt_deadline_timestamp', (int)$now_start_day])\n ->andFilterWhere(['<=', 'dt_deadline_timestamp', (int)$now_end_day]);\n\n } elseif (isset($params['posttz']['three']) && $params['posttz']['three'] == 3) { // Еще зеленое\n $query->andFilterWhere(['>=', 'dt_deadline_timestamp', (int)$now_time]);\n }\n\n }\n\n\n /// ID\n if (isset($this->id) && $this->id > 0) {\n $query->andFilterWhere(['=', 'id', (int)$this->id]);\n }\n\n\n return $dataProvider;\n }",
"private function appendWhere()\n\t{\n\t\t$whereCount = count($this->where);\n\n\t\tfor($i = 0; $i < $whereCount; $i++)\n\t\t{\n\t\t\t$where = $this->where[$i];\n\n\t\t\tif($i == 0)\n\t\t\t{\n\t\t\t\t$this->queryString .= self::WHERE;\n\t\t\t}\n\n\t\t\t$this->queryString .= $where->getCondition();\n\n\t\t\tif($i < $whereCount-1)\n\t\t\t{\n\t\t\t\t$this->queryString .= \" \" . $where->getOperator() . \" \";\n\t\t\t}\n\t\t}\n\t}",
"public function where($where_col_array = NULL, $value = NULL)\n {\n if(isset($where_col_array))\n {\n if (!is_array($where_col_array) && is_null($value)) {\n $this->_database->where(array($this->table.'.'.$this->primary => $where_col_array));\n } elseif (isset($value) && !is_array($value)) {\n $this->_database->where($where_col_array, $value);\n }\n elseif (isset($value) && is_array($value))\n {\n $this->_database->where_in($where_col_array,$value);\n }\n elseif (is_array($where_col_array)) {\n $this->_database->where($where_col_array);\n }\n }\n if($this->soft_deletes===TRUE)\n {\n $this->_where_trashed();\n }\n return $this;\n }",
"private function mergeWhere(){\n $wheres = $this->wheres;\n if (count($wheres) == 1)\n return $wheres[0];\n $whereString = \"\";\n foreach ($wheres as $where){\n $whereString .= $where.\" AND \";\n }\n return rtrim($whereString, \" AND \");\n }",
"protected function construct_where_clause() {\n\t\t\t$whereclause = $this->get_where_clause();\n\t\t\tif ( '' !== $whereclause ) {\n\t\t\t\t$this->where = '' === $this->where ? \" where ($whereclause) \" : \" {$this->where} and ($whereclause) \";\n\t\t\t}\n\t\t}",
"public function whereComplex()\n {\n return $this->addComplexCondition('and', $this->conditions);\n }",
"private function genSqlWhereArray($where){\n //input: $where is array of arguments or conditionals\n //output: $outWhere is array of each word split up, or null if anything is invalid\n //ex input: \n // $where[0] => luminosity=3\n // $where[1] => AND\n // $where[2] => temperature = '2'\n //output:\n // $outWhere[0] => luminosity\n // $outWhere[1] => 3\n // $outWhere[2] => AND\n // $outWhere[3] => temperature\n // $outWhere[4] => 2\n if(debug){ \"sqlInteract.php/genSqlWhereArray(): \". $where . PHP_EOL;}\n if($where == 1){\n return true;\n }else {\n $point = 0;\n $outWhere = [];\n foreach($where as $ptr => $val){\n foreach(explode('=', $val) as $substr){\n switch($point%3) {\n case 0://dict check word\n $word = trim($substr, \" \\t\\n\\r\\0\\x0B`\\\"\");\n if($this->checkWord($word)){\n array_push($outWhere, $word);\n }\n else{\n return null;\n }\n break;\n case 1://= val\n array_push($outWhere,trim($substr, \" \\t\\n\\r\\0\\x0B\"));\n break;\n case 2://conditional\n $word = trim($substr, \" \\t\\n\\r\\0\\x0B\");\n if(preg_match('/(AND|OR|NOT)/i', $word)){\n array_push($outWhere, $word);\n }\n else{\n return null;\n }\n break;\n }\n $point++;\n }\n }\n return $outWhere;\n }\n \n }",
"public function whereClause(){\n try {\n // Sparql11query.g:117:3: ( ( WHERE )? groupGraphPattern ) \n // Sparql11query.g:118:3: ( WHERE )? groupGraphPattern \n {\n // Sparql11query.g:118:3: ( WHERE )? \n $alt15=2;\n $LA15_0 = $this->input->LA(1);\n\n if ( ($LA15_0==$this->getToken('WHERE')) ) {\n $alt15=1;\n }\n switch ($alt15) {\n case 1 :\n // Sparql11query.g:118:3: WHERE \n {\n $this->match($this->input,$this->getToken('WHERE'),self::$FOLLOW_WHERE_in_whereClause412); \n\n }\n break;\n\n }\n\n $this->pushFollow(self::$FOLLOW_groupGraphPattern_in_whereClause415);\n $this->groupGraphPattern();\n\n $this->state->_fsp--;\n\n\n }\n\n }\n catch (RecognitionException $re) {\n $this->reportError($re);\n $this->recover($this->input,$re);\n }\n catch(Exception $e) {\n throw $e;\n }\n \n return ;\n }",
"private function prepareWhereCondition($where)\n {\n list($attribute, $value, $boost) = array_pad($where, 3, null);\n $subFilter = new Term();\n $subFilter->setTerm($attribute, $value, $boost);\n $this->filter->addMust($subFilter);\n }",
"function array_to_where_clause($a_vars) {\n\tglobal $mysqli;\n\n\t$a_where = array();\n\tforeach($a_vars as $k=>$v) {\n\t\t\t$k = $mysqli->real_escape_string($k);\n\t\t\t$v = $mysqli->real_escape_string($v);\n\t\t\t$a_where[] = \"`$k`='$v'\";\n\t}\n\t$s_where = implode(' AND ', $a_where);\n\treturn $s_where;\n}",
"public function where($str,$whereBindParam_list = array()){\r\n $this->options['where'] = $str;\r\n $this->whereBindParam = $whereBindParam_list;\r\n return $this;\r\n }",
"function check_story_exits_or_not($where_condition) {\n $ci = & get_instance();\n $ci->load->database();\n\n if (!empty($where_condition)) {\n foreach ($where_condition as $key => $value) {\n $ci->db->where($key, $value);\n }\n }\n $query = $ci->db->get('storys');\n return $query->row_array();\n}",
"function AdvancedSearchWhere() {\n\t\tglobal $Security, $t_tinbai_mainsite;\n\t\t$sWhere = \"\";\n\t\tif (!$Security->CanSearch()) return \"\";\n\t\t$this->BuildSearchSql($sWhere, $t_tinbai_mainsite->PK_TINBAI_ID, FALSE); // PK_TINBAI_ID\n\t\t$this->BuildSearchSql($sWhere, $t_tinbai_mainsite->FK_CONGTY_ID, FALSE); // FK_CONGTY_ID\n\t\t$this->BuildSearchSql($sWhere, $t_tinbai_mainsite->FK_DMGIOITHIEU_ID, FALSE); // FK_DMGIOITHIEU_ID\n\t\t$this->BuildSearchSql($sWhere, $t_tinbai_mainsite->FK_DMTUYENSINH_ID, FALSE); // FK_DMTUYENSINH_ID\n\t\t$this->BuildSearchSql($sWhere, $t_tinbai_mainsite->FK_DTSVTUONGLAI_ID, FALSE); // FK_DTSVTUONGLAI_ID\n\t\t$this->BuildSearchSql($sWhere, $t_tinbai_mainsite->FK_DTSVDANGHOC_ID, FALSE); // FK_DTSVDANGHOC_ID\n\t\t$this->BuildSearchSql($sWhere, $t_tinbai_mainsite->FK_DTCUUSV_ID, FALSE); // FK_DTCUUSV_ID\n\t\t$this->BuildSearchSql($sWhere, $t_tinbai_mainsite->FK_DTDOANHNGHIEP_ID, FALSE); // FK_DTDOANHNGHIEP_ID\n\t\t$this->BuildSearchSql($sWhere, $t_tinbai_mainsite->C_TITLE, FALSE); // C_TITLE\n\t\t$this->BuildSearchSql($sWhere, $t_tinbai_mainsite->C_SUMARY, FALSE); // C_SUMARY\n\t\t$this->BuildSearchSql($sWhere, $t_tinbai_mainsite->C_CONTENTS, FALSE); // C_CONTENTS\n\t\t$this->BuildSearchSql($sWhere, $t_tinbai_mainsite->C_HIT_MAINSITE, FALSE); // C_HIT_MAINSITE\n\t\t$this->BuildSearchSql($sWhere, $t_tinbai_mainsite->C_NEW_MYSEFLT, FALSE); // C_NEW_MYSEFLT\n\t\t$this->BuildSearchSql($sWhere, $t_tinbai_mainsite->C_COMMENT_MAINSITE, FALSE); // C_COMMENT_MAINSITE\n\t\t$this->BuildSearchSql($sWhere, $t_tinbai_mainsite->C_ORDER_MAINSITE, FALSE); // C_ORDER_MAINSITE\n\t\t$this->BuildSearchSql($sWhere, $t_tinbai_mainsite->C_STATUS_MAINSITE, FALSE); // C_STATUS_MAINSITE\n\t\t$this->BuildSearchSql($sWhere, $t_tinbai_mainsite->C_VISITOR_MAINSITE, FALSE); // C_VISITOR_MAINSITE\n\t\t$this->BuildSearchSql($sWhere, $t_tinbai_mainsite->C_ACTIVE_MAINSITE, FALSE); // C_ACTIVE_MAINSITE\n\t\t$this->BuildSearchSql($sWhere, $t_tinbai_mainsite->C_TIME_ACTIVE_MAINSITE, FALSE); // C_TIME_ACTIVE_MAINSITE\n\t\t$this->BuildSearchSql($sWhere, $t_tinbai_mainsite->FK_NGUOIDUNGID_MAINSITE, FALSE); // FK_NGUOIDUNGID_MAINSITE\n\t\t$this->BuildSearchSql($sWhere, $t_tinbai_mainsite->C_NOTE, FALSE); // C_NOTE\n\t\t$this->BuildSearchSql($sWhere, $t_tinbai_mainsite->C_USER_ADD, FALSE); // C_USER_ADD\n\t\t$this->BuildSearchSql($sWhere, $t_tinbai_mainsite->C_ADD_TIME, FALSE); // C_ADD_TIME\n\t\t$this->BuildSearchSql($sWhere, $t_tinbai_mainsite->C_USER_EDIT, FALSE); // C_USER_EDIT\n\t\t$this->BuildSearchSql($sWhere, $t_tinbai_mainsite->C_EDIT_TIME, FALSE); // C_EDIT_TIME\n\t\t$this->BuildSearchSql($sWhere, $t_tinbai_mainsite->FK_EDITOR_ID, FALSE); // FK_EDITOR_ID\n\n\t\t// Set up search parm\n\t\tif ($sWhere <> \"\") {\n\t\t\t$this->SetSearchParm($t_tinbai_mainsite->PK_TINBAI_ID); // PK_TINBAI_ID\n\t\t\t$this->SetSearchParm($t_tinbai_mainsite->FK_CONGTY_ID); // FK_CONGTY_ID\n\t\t\t$this->SetSearchParm($t_tinbai_mainsite->FK_DMGIOITHIEU_ID); // FK_DMGIOITHIEU_ID\n\t\t\t$this->SetSearchParm($t_tinbai_mainsite->FK_DMTUYENSINH_ID); // FK_DMTUYENSINH_ID\n\t\t\t$this->SetSearchParm($t_tinbai_mainsite->FK_DTSVTUONGLAI_ID); // FK_DTSVTUONGLAI_ID\n\t\t\t$this->SetSearchParm($t_tinbai_mainsite->FK_DTSVDANGHOC_ID); // FK_DTSVDANGHOC_ID\n\t\t\t$this->SetSearchParm($t_tinbai_mainsite->FK_DTCUUSV_ID); // FK_DTCUUSV_ID\n\t\t\t$this->SetSearchParm($t_tinbai_mainsite->FK_DTDOANHNGHIEP_ID); // FK_DTDOANHNGHIEP_ID\n\t\t\t$this->SetSearchParm($t_tinbai_mainsite->C_TITLE); // C_TITLE\n\t\t\t$this->SetSearchParm($t_tinbai_mainsite->C_SUMARY); // C_SUMARY\n\t\t\t$this->SetSearchParm($t_tinbai_mainsite->C_CONTENTS); // C_CONTENTS\n\t\t\t$this->SetSearchParm($t_tinbai_mainsite->C_HIT_MAINSITE); // C_HIT_MAINSITE\n\t\t\t$this->SetSearchParm($t_tinbai_mainsite->C_NEW_MYSEFLT); // C_NEW_MYSEFLT\n\t\t\t$this->SetSearchParm($t_tinbai_mainsite->C_COMMENT_MAINSITE); // C_COMMENT_MAINSITE\n\t\t\t$this->SetSearchParm($t_tinbai_mainsite->C_ORDER_MAINSITE); // C_ORDER_MAINSITE\n\t\t\t$this->SetSearchParm($t_tinbai_mainsite->C_STATUS_MAINSITE); // C_STATUS_MAINSITE\n\t\t\t$this->SetSearchParm($t_tinbai_mainsite->C_VISITOR_MAINSITE); // C_VISITOR_MAINSITE\n\t\t\t$this->SetSearchParm($t_tinbai_mainsite->C_ACTIVE_MAINSITE); // C_ACTIVE_MAINSITE\n\t\t\t$this->SetSearchParm($t_tinbai_mainsite->C_TIME_ACTIVE_MAINSITE); // C_TIME_ACTIVE_MAINSITE\n\t\t\t$this->SetSearchParm($t_tinbai_mainsite->FK_NGUOIDUNGID_MAINSITE); // FK_NGUOIDUNGID_MAINSITE\n\t\t\t$this->SetSearchParm($t_tinbai_mainsite->C_NOTE); // C_NOTE\n\t\t\t$this->SetSearchParm($t_tinbai_mainsite->C_USER_ADD); // C_USER_ADD\n\t\t\t$this->SetSearchParm($t_tinbai_mainsite->C_ADD_TIME); // C_ADD_TIME\n\t\t\t$this->SetSearchParm($t_tinbai_mainsite->C_USER_EDIT); // C_USER_EDIT\n\t\t\t$this->SetSearchParm($t_tinbai_mainsite->C_EDIT_TIME); // C_EDIT_TIME\n\t\t\t$this->SetSearchParm($t_tinbai_mainsite->FK_EDITOR_ID); // FK_EDITOR_ID\n\t\t}\n\t\treturn $sWhere;\n\t}",
"public function queryAll($campos=\"*\",$criterio=\"\");",
"public function set_where(array $params) {\n $where = '';\n foreach ($params as $field_name => $field_value) {\n $where .= '`' . $field_name . '` = \\'' . $field_value . '\\' AND ';\n }\n\n $where = rtrim($where, ' AND ');\n $this->where = ' WHERE ' . $where;\n }"
] | [
"0.60435176",
"0.58912224",
"0.57658046",
"0.574386",
"0.5701528",
"0.56979966",
"0.56979966",
"0.5663098",
"0.5644803",
"0.5584505",
"0.5571354",
"0.5529872",
"0.5518696",
"0.5512297",
"0.5491828",
"0.547862",
"0.54715496",
"0.54708445",
"0.546945",
"0.5433582",
"0.5426807",
"0.5423939",
"0.5412134",
"0.53903097",
"0.538571",
"0.5378941",
"0.53626716",
"0.5345606",
"0.5332731",
"0.53101665",
"0.5308676",
"0.52965647",
"0.52858967",
"0.5269421",
"0.52686775",
"0.52537525",
"0.5233915",
"0.523097",
"0.52270067",
"0.5218965",
"0.5201769",
"0.5187654",
"0.5180393",
"0.5169947",
"0.5156517",
"0.5156403",
"0.5142072",
"0.51377314",
"0.51343536",
"0.5133177",
"0.5127852",
"0.5124156",
"0.51238036",
"0.51232713",
"0.5120841",
"0.51183206",
"0.5115699",
"0.51076734",
"0.510761",
"0.51044804",
"0.5104315",
"0.50995237",
"0.5098129",
"0.5097517",
"0.50948495",
"0.50880814",
"0.507921",
"0.5078939",
"0.50777704",
"0.50714105",
"0.5064444",
"0.5057085",
"0.5053548",
"0.5049482",
"0.5044677",
"0.50412035",
"0.50313514",
"0.5027973",
"0.502478",
"0.5023953",
"0.50225556",
"0.5019732",
"0.5012816",
"0.50116056",
"0.5010507",
"0.5007368",
"0.5005908",
"0.5001621",
"0.49973446",
"0.49972683",
"0.4996741",
"0.49962088",
"0.4993109",
"0.49907497",
"0.49792865",
"0.4978342",
"0.49712184",
"0.49703723",
"0.49631605",
"0.4961841",
"0.4958434"
] | 0.0 | -1 |
Find similar usernames. This assumes you are using Eloquent with Laravel, if not, override this function in your class. | public function findSimilarUsernames(string $username)
{
$preferRegexp = $this->preferRegexp ?? $this->getModelGeneratorConfig()->getConfig('prefer_regexp', false);
if (!$preferRegexp) {
return $this->searchUsingLike($username);
}
try {
return $this->searchUsingRegexp($username);
} catch (QueryException $exception) {
return $this->searchUsingLike($username);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function _suggestUsername($name){\n $name = trim(strtolower($name));\n // pr($name); die('qq');\n $usernameCheck1 = $this->Players->find()->where(['username' => $name])->first();\n // pr($usernameCheck1); die('u name');\n if(!$usernameCheck1){\n $username = $name;\n }else{\n $usernameCheck2 = $this->Players->find()->where(['username LIKE' => $name.'%'])->all()->toArray();\n //pr($usernameCheck2); die('u 2 name');\n if(!count($usernameCheck2)){\n $username = $name;\n }else{\n $username = $name.count($usernameCheck2);\n }\n }\n return $username;\n\n }",
"public function fuzzySearchName($name) {\n $con = mysqli_connect('localhost', 'root', 'root', 'HexDatabase');\n //TODO: Add firstname and surname support\n $query = 'SELECT * FROM User WHERE firstName LIKE \\'%'.$name.'%\\';';\n $results = mysqli_query($con, $query);\n if ($results) {\n return $this->getResultAsJson($results);\n } else {\n return json_encode(null);\n }\n }",
"function getUsersLastNameLike($in){\r\n $data=new \\Cars\\Data\\Common($this->app);\r\n return $data->getUsersByLastNameInit($in);\r\n\r\n }",
"public function get_matching_users(Request $request) {\n $searchstring = $request->searchstring;\n $not_ids = $request->not_ids;\n\n $matching_users = User::select('id', 'first_name', 'last_name', 'birth_date')\n ->whereNotIn('id', $not_ids)\n ->where(function($query) use ($searchstring) {\n $query->where('first_name', 'like', '%'.$searchstring.'%')\n ->orWhere('last_name', 'like', '%'.$searchstring.'%')\n ->orWhere(DB::raw(\"CONCAT(`first_name`, ' ', `last_name`)\"), 'like', '%'.$searchstring.'%')\n ->orWhere(DB::raw(\"CONCAT(`last_name`, ' ', `first_name`)\"), 'like', '%'.$searchstring.'%');\n })\n ->orderBy('last_name')\n ->orderBy('first_name')\n ->limit(5)\n ->get();\n\n return $matching_users;\n }",
"private function searchUsingLike(string $username)\n {\n $exactMatches = static::where($this->getUsernameColumnName(), $username)->get();\n\n if ($exactMatches) {\n return static::where($this->getUsernameColumnName(), 'LIKE', $username.'%')->get();\n }\n\n return $exactMatches;\n }",
"function getSimilarAuthors1($author) {\r\n $result = array();\r\n \r\n //return when this is a synonym of a main author.\r\n if ($author->synonym_of != '0')\r\n return $result;\r\n \r\n $CI = &get_instance();\r\n $CI->load->helper('utf8_to_ascii');\r\n \r\n //get database author array\r\n $CI->db->select('author_id, cleanname');\r\n \r\n //do not return synonyms of this author\r\n $CI->db->where('synonym_of !=', $author->author_id);\r\n $CI->db->orderby('cleanname');\r\n $Q = $CI->db->get('author');\r\n \r\n $db_cleanauthors = array();\r\n //retrieve results or fail \r\n foreach ($Q->result() as $R)\r\n {\r\n $db_cleanauthors[$R->author_id] = strtolower($R->cleanname); //why strtolower? because we want to check case insensitive.\r\n }\r\n //check on cleanname\r\n //create cleanname\r\n \r\n $cleanAuthorName = strtolower($author->cleanname);\r\n \r\n if (sizeof($cleanAuthorName) < 4)\r\n $dist_threshold = 2;\r\n else if (sizeof($cleanAuthorName) < 8)\r\n $dist_threshold = 3;\r\n else\r\n $dist_threshold = 4;\r\n \r\n $db_distances = array();\r\n foreach ($db_cleanauthors as $author_id => $db_author)\r\n {\r\n $distance = levenshtein($db_author, $cleanAuthorName);\r\n if (($distance < $dist_threshold) && ($author_id != $author->author_id))\r\n $db_distances[$author_id] = $distance;\r\n }\r\n \r\n //sort while keeping key relationship\r\n asort($db_distances, SORT_NUMERIC);\r\n \r\n foreach($db_distances as $key => $value)\r\n {\r\n $result[]= $this->getByID($key);\r\n }\r\n return $result;\r\n }",
"public static function search($name) {\n return DB::table('users AS u')\n ->where('u.fullname', 'LIKE', '%'.$name.'%')\n ->orWhere('u.username', 'LIKE', '%'.$name.'%')\n ->selectRaw('u.id, u.fullname, u.profile_image')\n ->get();\n }",
"static function searchUserByName() : string\n {\n return \"SELECT *\n FROM users\n WHERE LOCATE( :Name , nickname) > 0;\";\n }",
"public function findName(Request $request)\n {\n $request_percent = $request->porcentaje;\n $resultado = [];\n $names = Diccionario::all();\n $request_name = mb_strtolower($request->nombre, 'UTF-8'); //Se convierte el nombre a minusculas\n $request_name = $this->removeAccents($request_name);// Se quitan los acentos\n $request_name = explode(\" \", $request_name);// Se separa nombre y apellido\n\n foreach ($names as $name) {\n $nombre = mb_strtolower($name->nombre, 'UTF-8');\n $nombre = $this->removeAccents($nombre);\n $percent = $this->findSimilar($request_name, $nombre);\n if ($percent >= $request_percent) {\n $resultado[] = [\n \"nombre\" => $name->nombre,\n \"porcentaje\" => $percent,\n \"departamento\" => $name->departamento,\n \"localidad\" => $name->localidad,\n \"municipio\" => $name->municipio,\n \"anios_activo\" => $name->anios_activo,\n \"tipo_persona\" => $name->tipo_persona,\n \"tipo_cargo\" => $name->tipo_cargo,\n ];\n }\n }\n /*$nombre = mb_strtolower(\"Alejandro Carvajal\", 'UTF-8');\n $nombre = $this->removeAccents($nombre);\n $percent = $this->findSimilar($request_name, $nombre)*/\n if (count($resultado) >= 1) {\n $mensaje = 'registros encontrados';\n } else {\n $mensaje = 'sin coincidencia';\n }\n $respuesta = [\n 'nombre_buscado' => $request->nombre,\n \"porcentaje_buscado\" => $request_percent,\n \"registros_encontrados\" => count($resultado),\n \"resultados\" => $resultado,\n \"estado_ejecucion\" => $mensaje,\n ];\n return response()->json($respuesta);\n }",
"public function get_user_by_concat_name($name_lastname){\n $query = $this->db->query(\"\n SELECT k_id_user\n FROM \n user \n WHERE CONCAT_WS(' ', n_name_user, n_last_name_user) \n LIKE '%$name_lastname';\n \");\n return $query->row();\n }",
"public function validateUsernameEqual($value, array $context)\n {\n Stopwatch::start('validateUsernameEqual');\n $users = $this->userlist();\n $lc = mb_strtolower($value);\n foreach ($users as $name) {\n if ($name === $value) {\n continue;\n }\n $name = mb_strtolower($name);\n $distance = levenshtein($lc, $name);\n if ($distance < 2) {\n return __('error.name.equalExists', $name);\n }\n }\n Stopwatch::stop('validateUsernameEqual');\n\n return true;\n }",
"function mentionTryName($username = '')\n{\n\t/**\n\t * create another name cache here to save queries if names\n\t * with spaces are used more than once in the same post\n\t */\n\tstatic $nameList;\n\n\tif (!is_array($nameList)) {\n\t\t$nameList = array();\n\t}\n\n\t// no user name supplied\n\tif (!$username) {\n\t\treturn false;\n\t}\n\n\t$username = mb_strtolower($username);\n\n\t// if the name is in this cache (has been searched for before)\n\tif ($nameList[$username]) {\n\t\t// . . . just return the data and save the query\n\t\treturn $nameList[$username];\n\t}\n\n\tglobal $db, $mybb;\n\n\t$searchname = $db->escape_string($username);\n\n\t$fieldList = 'uid, username, usergroup, displaygroup, additionalgroups, ignorelist';\n\tif ($mybb->settings['mention_show_avatars']) {\n\t\t$fieldList .= ', avatar';\n\t}\n\n\t// query the db\n\t$query = $db->simple_select('users', $fieldList, \"LOWER(username)='{$searchname}'\", array('limit' => 1));\n\n\t// result?\n\tif ($db->num_rows($query) !== 1) {\n\t\t// no matches\n\t\treturn false;\n\t}\n\n\t// cache the name\n\t$nameList[$username] = $db->fetch_array($query);\n\n\t// and return it\n\treturn $nameList[$username];\n}",
"public function scopeSimilarMatch($query, $name) {\n return $query->opened()->where('name', 'REGEXP', '[' . $name . ']');\n }",
"public function users() {\n $matches = array();\n if ($name = $this->input->get('q')) {\n $users = ORM::factory('user')->where('site_id', $this->site->id)->like('searchname', text::searchable($name))->where('status', 1)->find_all();\n foreach ($users as $user) {\n if ($user->id != $this->user->id) { // Can't send a message to yourself.\n $matches[] = (object) array('id' => $user->id, 'name' => $user->name());\n }\n }\n }\n print json_encode($matches);\n die();\n }",
"function search_for_users($needle)\n {\n $needle = trim($needle);\n if ($needle != '')\n {\n $user = $this->ion_auth->get_user();\n\n $query_string = \"SELECT user_meta.user_id, user_meta.first_name, user_meta.last_name, user_meta.grad_year, school_data.school\n FROM user_meta LEFT JOIN school_data ON user_meta.school_id = school_data.id\n WHERE MATCH(user_meta.first_name, user_meta.last_name) AGAINST (? IN BOOLEAN MODE)\n AND user_meta.user_id <> ?\";\n\n // Generate a string to exclude people the user is already following.\n $following_ids = $this->get_following_ids();\n if (count($following_ids) > 0)\n {\n $query_string .= \" AND user_meta.user_id <> '\" . implode(\"' AND user_meta.user_id <> '\", $following_ids) . \"'\";\n }\n $query_string .= ' LIMIT 15';\n\n $query = $this->db->query($query_string, array(str_replace(' ', '* ', $needle) . '*', $user->id));\n\n // Echo the results\n foreach ($query->result() as $row)\n {\n $this->echo_user_entry($row, 'add following', $profile_links_enabled = false);\n }\n }\n }",
"function FindUser($User) {\n $User = str_replace('ZZ ', '', $User);\n\n //separa o primeiro nome do sobrenome\n $name_complete = explode(' ', $User);\n $user_name = array_shift($name_complete);\n $user_lastname = implode(' ', $name_complete);\n\n $Read = new WsUsers();\n\n $Read->setUser_name($user_name);\n $Read->setUser_lastname($user_lastname);\n $Result = $Read->Execute()->Query(\"user_name like '%{$user_name}%' AND user_lastname like '%{$user_lastname}%'\");\n\n if (!empty($Result)):\n return $Result[0]->user_id;\n endif;\n}",
"public function getUserId($name){\n $names = explode(\",\", $name);\n // Search each Name Field for any specified Name\n return User::where(function ($query) use ($names) {\n $query->whereIn('first_name', $names);\n\n $query->orWhere(function ($query) use ($names) {\n $query->whereIn('middle_name', $names);\n });\n $query->orWhere(function ($query) use ($names) {\n $query->whereIn('last_name', $names);\n });\n })->get();\n }",
"public function searchUserByName($name){\r\n $result = $this->DB->fetchAll('select * from user where name like ?',array(\"%{$name}%\"));\r\n return $this->formatResult($result);\r\n }",
"public function searchUsers($str) {\n return user_find($str);\n }",
"function review($authors)\r\n {\r\n $CI = &get_instance();\r\n $CI->load->helper('utf8_to_ascii');\r\n if (!is_array($authors))\r\n return null;\r\n \r\n $result_message = \"\";\r\n $all_similar_authors = array();\r\n \r\n //get database author array\r\n $CI->db->select('author_id, cleanname');\r\n $CI->db->orderby('cleanname');\r\n $Q = $CI->db->get('author');\r\n \r\n $db_cleanauthors = array();\r\n //retrieve results or fail \r\n foreach ($Q->result() as $R)\r\n {\r\n $db_cleanauthors[$R->author_id] = strtolower($R->cleanname); //why strtolower? because we want to check case insensitive.\r\n }\r\n \r\n \r\n //check availability of the authors in the database\r\n foreach ($authors as $author)\r\n {\r\n $similar_authors = array();\r\n if ($this->getByExactName($author->firstname, $author->von, $author->surname, $author->jr) == null)\r\n {\r\n //no exact match, or more than one authors exist in the database\r\n \r\n //check on cleanname\r\n //create cleanname\r\n $author->cleanname = strtolower(authorCleanName($author));\r\n $db_distances = array();\r\n foreach ($db_cleanauthors as $author_id => $db_author)\r\n {\r\n $distance = levenshtein($db_author, $author->cleanname);\r\n if (($distance < 3) && ($author_id != $author->author_id))\r\n $db_distances[$author_id] = $distance;\r\n }\r\n \r\n //sort while keeping key relationship\r\n asort($db_distances, SORT_NUMERIC);\r\n //are there similar authors?\r\n if (count($db_distances) > 0)\r\n {\r\n $authorname = $author->getName('lvf');\r\n if ($author->institute!='')\r\n {\r\n $authorname .= ', '.addslashes ($author->institute);\r\n }\r\n if ($author->email!='')\r\n {\r\n $authorname .= ', '.addslashes ($author->institute);\r\n }\r\n\r\n $result_message .= __(\"Found similar authors for\").\" <b>"\".$authorname.\""</b>:<br/>\\n\";\r\n $result_message .= \"<ul>\\n\";\r\n foreach($db_distances as $key => $value)\r\n {\r\n $otherauthor = $this->getByID($key);\r\n $otherauthorname = $otherauthor->getName('lvf');\r\n if ($otherauthor->institute!='')\r\n {\r\n $otherauthorname .= ', '.addslashes ($otherauthor->institute);\r\n }\r\n if ($otherauthor->email!='')\r\n {\r\n $otherauthorname .= ', '.addslashes ($otherauthor->institute);\r\n }\r\n $result_message .= \"<li>\".$otherauthorname.\"</li>\\n\";\r\n $similar_authors[] = $otherauthor->author_id;\r\n }\r\n $result_message .= \"</ul>\\n\";\r\n }\r\n } else {\r\n //exact match! this author exists!\r\n }\r\n $all_similar_authors[] = $similar_authors;\r\n }\r\n if ($result_message != \"\")\r\n {\r\n $result_message .= __(\"Please review the entered authors\").\".<br/>\\n\";\r\n return array($result_message,$all_similar_authors);\r\n }\r\n else\r\n return null;\r\n }",
"function findSuggestedUsers($query) {\n\t\t$cid = 'user.findSuggestedUsers.'.md5($query);\n\t\tif (null == ($result = SyndLib::runHook('cache_get', $cid))) {\n\t\t\t$collection = $this->findUsers($query);\n\t\t\t$users = $collection->getContents(0, 10);\n\t\t\t$result = array();\n\n\t\t\tforeach (array_keys($users) as $key) {\n\t\t\t\t$name = $users[$key]->toString();\n\t\t\t\tif (null != $users[$key]->getContact())\n\t\t\t\t\t$name .= ' <span class=\"Info\">('.$users[$key]->getContact().')</span>';\n\t\t\t\tif (null != $users[$key]->getEmail())\n\t\t\t\t\t$result[$users[$key]->getEmail()] = $name;\n\t\t\t\telse\n\t\t\t\t\t$result[$users[$key]->getLogin()] = $name;\n\t\t\t}\n\t\t\t\n\t\t\tSyndLib::runHook('cache_set', $cid, $result);\n\t\t}\n\t\treturn $result;\n\t}",
"function getUsersLike($query, $user){\n $key = \"%\".$query.\"%\";\n $query = $this->getEntityManager()\n ->createQuery('SELECT DISTINCT u\n FROM EntityBundle:User u, EntityBundle:Person p\n WHERE u != :user AND u.person = p AND (p.firstname LIKE :query OR p.lastname LIKE :query)')\n ->setParameter('query', $key)\n ->setParameter('user', $user);\n\n try {\n return $query->getResult();\n } catch (\\Doctrine\\ORM\\NoResultException $e) {\n return null;\n }\n }",
"public function search($name) {\n return $this->db->query(\"SELECT * FROM `user` WHERE `firstname` ='$name' or `lastname`='$name'\")->result();\n //return $this->db->last_query();\n //return $query->result(); \n }",
"private function /*bool*/ findUsername(/*string*/ $name) {\n\t\t$variations = array(\n\t\t\t$name,\n\t\t\tstrtolower($name[0]) . substr($name, 1),\n\t\t\tstr_replace(\" \", \"_\", $name),\n\t\t);\n\n\t\t$crowd = $this->getCrowd();\n\t\tforeach ($variations as $v) {\n\t\t\ttry {\n\t\t\t\t$crowd->findPrincipalByName(array(\"in0\" => $this->token, \"in1\" => $v));\n\t\t\t\treturn $v;\n\t\t\t} catch (Exception $e) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}",
"public function searchUser(){\n $this->validate(request(),[\n 'name' => 'required'\n ]);\n $users =User::where('name',request('name'))->orWhere('name', 'like', '%' . request('name') . '%')->get();\n return response()->json($users);\n }",
"private function _getNames()\n\t {\n\t\t$result = array();\n\t\t$rows = $this->_db->exec(\"SELECT * FROM `names` WHERE `phone` = '\" . $this->phone . \"'\");\n\t\twhile($row = $rows->getRow())\n\t\t {\n\t\t\t$result[] = mb_strtoupper($row[\"name\"]);\n\t\t } //end while\n\n\t\t$result = array_unique($result);\n\n\t\tif (count($result) > 1)\n\t\t {\n\t\t\treturn false;\n\t\t }\n\t\telse\n\t\t {\n\t\t\treturn true;\n\t\t } //end if\n\n\t }",
"public function findUsernameMatch($name) {\r\n \t\t# Set up database query\r\n \t\t$statement = $this->DB->prepare(\"SELECT User_Name, User_ID FROM users WHERE User_Name = :nomen;\");\r\n \t\t$statement->bindParam('nomen', $name);\r\n \t\t$statement->execute();\r\n \t\t$row = $statement->fetch(PDO::FETCH_ASSOC); # row might be empty\r\n \t\t$row['status'] = 'success'; # this makes sure row stores something\r\n \t\treturn json_encode($row);\r\n\r\n\t }",
"function find_users_like($session_id, $user_search)\n{\n global $db;\n\n $search = '%';\n $search .= $user_search;\n $search .= '%';\n\n $query = \"SELECT DISTINCT User.user_id, User.user_name FROM User \n WHERE User.user_id NOT IN (SELECT user_id FROM User_Session WHERE session_id = ?) \n AND User.user_name LIKE ?\";\n\n $stmt = $db->prepare($query);\n $stmt->bind_param(\"is\", $session_id, $search);\n $stmt->execute();\n\n $user_set = $stmt->get_result();\n\n $stmt->close();\n\n return $user_set;\n}",
"public abstract function find_users($search);",
"public function personal_username($full_name){\r\n $random = mt_rand(00000, 99999);\r\n $username = url_title($full_name.$random);\r\n\r\n $query = $this->db->get_where('user', ['khojeko_username' => $username]);\r\n if($query->num_rows() == 0 )\r\n return $username;\r\n else\r\n $this->personal_username($full_name);\r\n }",
"public static function getAllUsersNames()\n {\n $sql = \"SELECT idUser, CONCAT(FirstName,' ',LastName) AS Name FROM users ORDER BY LastName, FirstName\";\n $req = DbConnection::getInstance()->prepare($sql);\n //$req->setFetchMode(PDO::FETCH_OBJ);\n $req->execute();\n return $req->fetchAll(PDO::FETCH_KEY_PAIR);\n }",
"function compairUser($d1,$d2) {\n if (!isset($d1[\"user\"]) || !isset($d2[\"user\"]))\n return false;\n return strtolower($d1[\"user\"])==strtolower($d2[\"user\"]);\n}",
"public function chkEditUsernameDuplicate() {\r\n\r\n if ($this->input->post('user_name') == $this->input->post('user_name_old')) {\r\n echo 'true';\r\n } else {\r\n $table_to_pass = 'mst_users';\r\n $fields_to_pass = array('user_id', 'user_name');\r\n $condition_to_pass = array(\"user_email\" => $this->input->post('user_name'));\r\n $arr_login_data = $this->user_model->getUserInformation($table_to_pass, $fields_to_pass, $condition_to_pass, $order_by_to_pass = '', $limit_to_pass = '', $debug_to_pass = 0);\r\n if (count($arr_login_data)) {\r\n echo 'false';\r\n } else {\r\n echo 'true';\r\n }\r\n }\r\n }",
"public function getClientByNameOrSurnameOrDni() {\n $term = Request::input('term', '');\n $results = array();\n $queries = User::where('role_id', 6)\n ->where(function($query) use ($term){\n $query->where('name', 'LIKE', '%'.$term.'%');\n $query->orWhere('surname', 'LIKE', '%'.$term.'%');\n $query->orWhere('dni', 'LIKE', '%'.$term.'%');\n })\n ->take(10)->get();\n foreach ($queries as $query)\n $results[] = ['id' => $query->id,\n 'value' => $query->fullname().' ['.$query->dni.']'];\n return response()->json($results);\n }",
"public function search($term)\n {\n $terms = explode(\" \", $term);\n\n $searchQuery = array();\n foreach ($terms as $term) {\n $term = $this->_localConfig->database()->quote(\"[[:<:]]\" . $term . \"[[:>:]]\");\n $searchQuery[] = \"(users.name regexp $term) * 5 + (users.username regexp $term)\";\n }\n\n $searchQuery = implode(\" + \", $searchQuery);\n\n $query = $this->selectAll();\n $query->columns(new Zend_Db_Expr(\"($searchQuery) as hits\"));\n $query->having('hits > 0');\n\n // We need to reset the ordering that was put on in selectAll()\n $query->reset( Zend_Db_Select::ORDER );\n $query->order(\"hits DESC\");\n\n $rows = $this->_localConfig->database()->fetchAll($query);\n\n $models = array();\n foreach ($rows as $row) {\n $model = $this->_getContainer()->User()->setData($row);\n $models[] = $model;\n }\n\n return $models;\n }",
"public function searchUsers(Request $request)\n {\n $searchText = $request->get('searchText');\n\n $searchTerms = explode(' ', $searchText);\n\n $query = DB::table('users');\n\n foreach($searchTerms as $term)\n {\n $query->where('name', 'LIKE', '%'. $term .'%');\n }\n\n $results = $query->take(10)->get();\n\n return response()->json($results, 200);\n }",
"public function postSearchUsers()\n {\n \n \n $q = Input::get('q');\n $f = User::where( 'name' , 'LIKE' , '%'.$q.'%' )->get();\n \n return Response::json( $f );\n \n }",
"public function search_user(Request $request){\n $search = $request->input('term');\n $users = User::where('name', 'like' , \"%$search%\")\n ->orwhere('username', 'like', \"%$search%\")\n ->get();\n return response()->json($users, 200);\n }",
"public function getRemainingUsersByNameOrSurnameOrDni() {\n $term = Request::input('term', '');\n $ids = Request::input('ids', '');\n $users_id = ($ids ? array_map('intval', explode(',', $ids)) : []);\n\n $results = array();\n $queries = User::whereNotIn('id', $users_id)\n ->where(function($query) use ($term){\n $query->where('name', 'LIKE', '%'.$term.'%');\n $query->orWhere('surname', 'LIKE', '%'.$term.'%');\n $query->orWhere('dni', 'LIKE', '%'.$term.'%');\n })\n ->take(10)->get();\n\n foreach ($queries as $query)\n $results[] = ['id' => $query->id,\n 'value' => $query->fullname().' ['.$query->dni.']'];\n return response()->json($results);\n }",
"function fake_levenshtein($a,$b)\n{\n\t// Some stripping, for performance, and because white space doesn't matter so much in HTML anyway\n\t$a=preg_replace('#\\s#','',$a);\n\t$b=preg_replace('#\\s#','',$b);\n\n\t$a_len=strlen($a);\n\t$b_len=strlen($b);\n\tif (($a_len<255) && ($b_len<255))\n\t{\n\t\treturn levenshtein($a,$b);\n\t}\n\t$percent=0.0;\n\treturn max($a_len,$b_len)-similar_text($a,$b,$percent);\n}",
"function mentionMeXMLHTTPnameSearch()\n{\n\tglobal $mybb, $db, $cache;\n\n\tif (!$mybb->input['search']) {\n\t\texit;\n\t}\n\n\t$originalName = trim($mybb->input['search']);\n\t$name = $db->escape_string($originalName);\n\t$name = strtr($name,\n\t\tarray(\n\t\t\t'%' => '=%',\n\t\t\t'=' => '==',\n\t\t\t'_' => '=_')\n\t\t);\n\n\t$fieldList = 'username';\n\tif ($mybb->settings['mention_show_avatars']) {\n\t\t$fieldList .= ', avatar';\n\t}\n\n\t$fullText = '';\n\tif ($mybb->settings['mention_full_text_search']) {\n\t\t$fullText = '%';\n\t}\n\n\t$query = $db->simple_select('users', $fieldList, \"username LIKE '{$fullText}{$name}%' ESCAPE '='\");\n\n\tif ($db->num_rows($query) == 0) {\n\t\texit;\n\t}\n\n\t$names = array();\n\twhile ($user = $db->fetch_array($query)) {\n\t\t$username = mb_strtolower($user['username']);\n\t\tif (($fullText === '' &&\n\t\t\tsubstr($username, 0, strlen($originalName)) === $originalName) ||\n\t\t\t($fullText &&\n\t\t\tstrpos($username, $originalName) !== -1)) {\n\t\t\t$names[$username] = $user;\n\t\t}\n\t}\n\n\tif (empty($names)) {\n\t\texit;\n\t}\n\t$json = json_encode($names);\n\n\t// send our headers.\n\theader('Content-type: application/json');\n\techo($json);\n\texit;\n}",
"function similarity($str1, $str2) {\r\n\t\t$len1 = strlen($str1);\r\n\t\t$len2 = strlen($str2);\r\n\t\t\r\n\t\t$max = max($len1, $len2);\r\n\t\t$similarity = $i = $j = 0;\r\n\t\t\r\n\t\twhile (($i < $len1) && isset($str2[$j])) {\r\n\t\t\tif ($str1[$i] == $str2[$j]) {\r\n\t\t\t\t$similarity++;\r\n\t\t\t\t$i++;\r\n\t\t\t\t$j++;\r\n\t\t\t} elseif ($len1 < $len2) {\r\n\t\t\t\t$len1++;\r\n\t\t\t\t$j++;\r\n\t\t\t} elseif ($len1 > $len2) {\r\n\t\t\t\t$i++;\r\n\t\t\t\t$len1--;\r\n\t\t\t} else {\r\n\t\t\t\t$i++;\r\n\t\t\t\t$j++;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn round($similarity / $max, 2);\r\n\t}",
"private function findSimilar($request_name, $name)\n {\n $permutaction_names = $this->getPermutations($request_name);\n foreach ($permutaction_names as $permutaction_name) {\n $comparePercent[] = $this->compareSimilar($permutaction_name, $name);\n $excepciones = [\n 'v' => 'b',\n 'b' => 'v',\n 's' => 'z',\n 'z' => 's',\n 'j' => 'g',\n 'g' => 'j'\n ];\n foreach ($excepciones as $key => $value) {\n $comparePercent[] = $this->compareSimilarReplaceException($permutaction_name, $name, $key, $value);\n }\n }\n\n $porcentaje = max($comparePercent);\n\n return $porcentaje;\n }",
"function get_duplicates($lastname, $firstname, $middlename)\r\n {\r\n \r\n $this->db->from($this->table);\r\n $this->db->where('lastname',$lastname);\r\n $this->db->where('firstname',$firstname);\r\n $this->db->where('middlename',$middlename);\r\n\r\n $query = $this->db->get();\r\n\r\n return $query;\r\n }",
"public function search_members(Request $request) {\n\n \t$name = $request->name;\n \t$from_ranking = ($request->from_ranking != 'from') ? $request->from_ranking : null;\n \t$to_ranking = ($request->to_ranking != 'to') ? $request->to_ranking : null;\n \t$from_birth_date = ($request->from_birth_year != 'from') ? $request->from_birth_year . '-01-01 00:00:00' : null;\n \t$to_birth_date = ($request->to_birth_year != 'to') ? $request->to_birth_year . '-12-31 23:59:59' : null;\n \t$search_results = User::orderBy('last_name')->orderBy('first_name');\n\n //search by name: first name, last name, first name + last name, last name + first name\n \tif($name) {\n \t\t$search_results = $search_results->where(function($query) use ($name) {\n $query->where('first_name', 'like', '%'.$name.'%')\n ->orWhere('last_name', 'like', '%'.$name.'%')\n ->orWhere(DB::raw(\"CONCAT(`first_name`, ' ', `last_name`)\"), 'like', '%'.$name.'%')\n ->orWhere(DB::raw(\"CONCAT(`last_name`, ' ', `first_name`)\"), 'like', '%'.$name.'%');\n });\n \t}\n \tif($from_ranking && $to_ranking) {\n \t\t$from_passed = false;\n \t\t$to_passed = false;\n \t\t$allowed_rankings = array();\n \t\tforeach ($this->rankings_array() as $ranking) {\n \t\t\tif($ranking == $from_ranking) {\n \t\t\t\t$from_passed = true;\n \t\t\t}\n \t\t\tif($from_passed && !$to_passed) {\n \t\t\t\tarray_push($allowed_rankings, $ranking);\n \t\t\t}\n \t\t\tif($ranking == $to_ranking) {\n \t\t\t\t$to_passed = true;\n \t\t\t}\n \t\t}\n \t}\n \telseif($from_ranking) {\n \t\t$from_passed = false;\n \t\t$allowed_rankings = array();\n \t\tforeach ($this->rankings_array() as $ranking) {\n \t\t\tif($ranking == $from_ranking) {\n \t\t\t\t$from_passed = true;\n \t\t\t}\n \t\t\tif($from_passed) {\n \t\t\t\tarray_push($allowed_rankings, $ranking);\n \t\t\t}\n \t\t}\n \t}\n \telseif($to_ranking) {\n \t\t$to_passed = false;\n \t\t$allowed_rankings = array();\n \t\tforeach ($this->rankings_array() as $ranking) {\n \t\t\tif(!$to_passed) {\n \t\t\t\tarray_push($allowed_rankings, $ranking);\n \t\t\t}\n \t\t\tif($ranking == $to_ranking) {\n \t\t\t\t$to_passed = true;\n \t\t\t}\n \t\t}\n \t}\n \tif(isset($allowed_rankings)) {\n \t\t$search_results = $search_results->where(function($query) use ($allowed_rankings) {\n $query->where(function($query) use ($allowed_rankings) {\n\t $query->whereIn('ranking_singles', $allowed_rankings);\n\t })\n\t ->orWhere(function($query) use ($allowed_rankings) {\n\t $query->whereIn('ranking_doubles', $allowed_rankings);\n\t });\n });\n \t}\n \tif($from_birth_date && $to_birth_date) {\n \t\t$search_results = $search_results->whereBetween('birth_date', [$from_birth_date, $to_birth_date]);\n \t}\n \telseif($from_birth_date) {\n \t\t$search_results = $search_results->where('birth_date', '>', $from_birth_date);\n \t}\n \telseif($to_birth_date) {\n \t\t$search_results = $search_results->where('birth_date', '<', $to_birth_date);\n \t}\n\n \t$search_results = $search_results->paginate(50)->appends(['name' => $request->name,\n 'from_ranking' => $request->from_ranking,\n 'to_ranking' => $request->to_ranking,\n 'from_birth_year' => $request->from_birth_year,\n 'to_birth_year' => $request->to_birth_year,\n 'searching' => $request->searching]);\n\n return $search_results;\n }",
"public function getAuthorNames($query) \n\t{\n $q = \"SELECT * FROM in_users WHERE full_name LIKE '%\".$query.\"%'\";\n $ps = $this->execute($q);\n $result = $this->getDataRowsAsObjects($ps, 'User');\n return $result;\n }",
"private function searchMembers() {\n $searchStr = $this->postVars['memberSearch'];\n $searchStrArr = array();\n if(preg_match('/\\s/',$searchStr)) {\n $searchStrArr = explode(\" \", $searchStr);\n }\n \n if(empty($searchStrArr)) {\n $query = \"SELECT u.id\n FROM {$this->db->prefix}users AS u\n WHERE u.user_email = '$searchStr'\n UNION\n SELECT u.id\n FROM {$this->db->prefix}users AS u\n JOIN {$this->db->prefix}nhc n ON u.id = n.user_id AND n.nhc_pin = '$searchStr'\n JOIN {$this->db->prefix}usermeta um1 ON um1.user_id = u.id AND um1.meta_key = 'first_name'\n JOIN {$this->db->prefix}usermeta um2 ON um2.user_id = u.id AND um2.meta_key = 'last_name'\n UNION\n SELECT u.id\n FROM {$this->db->prefix}users AS u\n JOIN {$this->db->prefix}nhc n ON u.id = n.user_id\n JOIN {$this->db->prefix}usermeta um1 ON um1.user_id = u.id AND um1.meta_key = 'first_name' AND um1.meta_value like '%$searchStr%'\n JOIN {$this->db->prefix}usermeta um2 ON um2.user_id = u.id AND um2.meta_key = 'last_name'\n UNION\n SELECT u.id\n FROM {$this->db->prefix}users AS u\n JOIN {$this->db->prefix}nhc n ON u.id = n.user_id\n JOIN {$this->db->prefix}usermeta um1 ON um1.user_id = u.id\n JOIN {$this->db->prefix}usermeta um2 ON um2.user_id = u.id AND um2.meta_key = 'last_name' AND um2.meta_value like '%$searchStr%'\";\n //JOIN {$this->db->prefix}usermeta um4 ON um4.user_id = u.id AND um4.meta_key = 'expiration_date' AND um4.meta_value = '$expireDate'\";\n }\n else { // looking specifically for a full name\n $query = \"SELECT u.id\n FROM {$this->db->prefix}users AS u\n JOIN {$this->db->prefix}nhc n ON u.id = n.user_id\n JOIN {$this->db->prefix}usermeta um1 ON um1.user_id = u.id AND um1.meta_key = 'first_name' AND um1.meta_value like '%{$searchStrArr[0]}%'\n JOIN {$this->db->prefix}usermeta um2 ON um2.user_id = u.id AND um2.meta_key = 'last_name' AND um2.meta_value like '%{$searchStrArr[1]}%'\";\n \n }\n \n $membersArr = $this->db->get_results($query, ARRAY_A);\n \n // filter through to weed out any duplicates\n $showArr = array();\n foreach($membersArr as $member) {\n if(!in_array($member['id'], $showArr)) {\n $showArr[] = $member['id'];\n }\n }\n $idStr = implode(\",\", $showArr);\n \n $query = \"SELECT DISTINCT u.id, n.nhc_pin, um1.meta_value AS first_name, um2.meta_value AS last_name, u.user_email, um3.meta_value AS level\n FROM {$this->db->prefix}users AS u\n JOIN {$this->db->prefix}nhc n ON u.id = n.user_id\n JOIN {$this->db->prefix}usermeta um1 ON um1.user_id = u.id AND um1.meta_key = 'first_name'\n JOIN {$this->db->prefix}usermeta um2 ON um2.user_id = u.id AND um2.meta_key = 'last_name'\n JOIN {$this->db->prefix}usermeta um3 ON um3.user_id = u.id AND um3.meta_key = 'member_level'\n WHERE u.id IN ($idStr)\n ORDER BY n.nhc_pin\";\n \n $this->showResults($query, 'search', true);\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}",
"function Similarity ($str, $a_link) \r\n{\t\r\n\t$str1=getDNSName($str);\r\n\t$adns1=getDNSName($a_link);\r\n $thresh=0.8;\r\n $pos=((strstr($adns1,$str1)) || (strstr($str1,$adns1)));\r\n if($pos===true)\r\n {\r\n\t\tglobal $v;\r\n\t\t$v=$str;\r\n\t\treturn true;\r\n\t}\r\n\t$maxlen=strlen($adns1);\r\n\t$minchanges = levenshtein($str1, $adns1);\r\n\t$temp=($maxlen-$minchanges)/$maxlen;\r\n\tif (($thresh<$temp) && ($temp<1))\r\n\t{ \t\r\n\t\tglobal $v;\r\n\t\t$v=$str;\r\n\t\treturn true; \r\n\t}\r\n\treturn false;\r\n}",
"public function findUsers();",
"public function findUsers();",
"function SearchUser($UserName){\n $this->db->select('Users.*, Roles.RoleName, Departments.DepartmentName');\n $this->db->from('Users');\n $this->db->join('Roles','Users.RoleID=Roles.RoleID');\n $this->db->join('Departments','Users.DepartmentID=Departments.DepartmentID');\n $this->db->where('UserName',$UserName);\n $query = $this->db->get();\n\n $result = $query->result();\n return $result;\n }",
"public function isUserDuplicate(){\n\n\t\t$today = Carbon::today();\n\n\t\t$user = User::on('bk')\n\t\t\t\t\t->where('created_at', '>=', $today)\n\t\t\t\t\t->select('id')\n\t\t\t\t\t->get();\n\n\t\t$str1 = '( ';\n\t\t$str2 = '( ';\n\t\tforeach ($user as $key) {\n\t\t\t// $user_id_arr .= $key->id.\",\";\n\t\t\t$str1 .= 'id = '.$key->id.\" OR \";\n\t\t\t$str2 .= 'u1.id = '.$key->id.\" OR \";\n\t\t}\n\n\t\t$str1 = rtrim($str1, \"OR \");\n\t\t$str2 = rtrim($str2, \"OR \");\n\n\t\t$str1 .= ')';\n\t\t$str2 .= ')';\n\n\t\t$qry_str = \"Select u1.id,\n\t\t\t\t\tif(u1.id in \n\t\t\t\t\t (Select max(u2.id)\n\t\t\t\t\t from users u2\n\t\t\t\t\t where is_ldy = 0\n\t\t\t\t\t and is_plexuss = 0 \n\t\t\t\t\t and email REGEXP '^[A-Z0-9._%-]+@[A-Z0-9.-]+\\.[A-Z]{2,4}$'\n\t\t\t\t\t and email not like '%test%'\n\t\t\t\t\t and fname not like '%test'\n\t\t\t\t\t and email not like '%nrccua%'\n\t\t\t\t\t and \".$str1.\"\n\t\t\t\t\t\t group by email)\n\t\t\t\t\t, 0, 1) as 'is_duplicate'\n\t\t\t\t\tfrom users u1\n\t\t\t\t\twhere is_ldy = 0\n\t\t\t\t\tand is_plexuss = 0 \n\t\t\t\t\tand email REGEXP '^[A-Z0-9._%-]+@[A-Z0-9.-]+\\.[A-Z]{2,4}$'\n\t\t\t\t\tand email not like '%test%'\n\t\t\t\t\tand fname not like '%test'\n\t\t\t\t\tand email not like '%nrccua%'\n\t\t\t\t\tand \".$str2.\";\";\n\n\t\t$qry = DB::connection('bk')->select($qry_str);\n\n\t\tforeach ($qry as $key) {\n\t\t\tif ($key->is_duplicate == 1) {\n\t\t\t\t$attr = array('user_id' => $key->id);\n\t\t\t\t$val = array('user_id' => $key->id, 'is_duplicate' => $key->is_duplicate);\n\n\t\t\t\tEmailLogicHelper::updateOrCreate($attr, $val);\n\t\t\t}\n\t\t}\n\t}",
"function chkusername($str) {\n $this->db->where('username', strtolower($str));\n $query = $this->db->get('user');\n if ($query->num_rows() == 1) {\n $this->form_validation->set_message('chkusername', 'Username is already being used!');\n return false;\n }\n\n return true;\n }",
"private function searchableNames()\n {\n $pests = Pest::all();\n\n $searchableNames = new SearchableName();\n\n foreach(range(1,300) as $index)\n {\n SearchableName::create([\n\n 'searchable_type' => 'App\\Models\\Pest',\n\n 'name' => $this->faker->word . ' ' . $this->faker->colorName\n ]);\n }\n\n $searchableNamesIds = $searchableNames->pests()->lists('id')->toArray();\n\n foreach(range(1,400) as $index) {\n\n $pests[rand(1, 199)]->searchableNames()->attach($this->faker->randomElement($searchableNamesIds));\n }\n }",
"public function CompanynameEmailCompare() {\n\t\t\t\t\t\t$this->redirectToIndex();\n\t\t\t\t\t\t$getTableUser = $this->GetModelOrganize->CompareComparenameAndEmail();\n\t\t\t\t\t\treturn $getTableUser;\n\t\t\t\t\t}",
"function staffNameSearch($sessionID, $name){\r\n\t\t$name = str_replace(' ', '%', $name);\r\n\t\t$results = array();\r\n\t\tfor($i=0; $i<sizeof($name); $i++){\r\n\t\t\t$query = \"SELECT ID, CONCAT(FirstName, ' ', MiddleIn, ' ', LastName) AS FullName FROM users WHERE\r\n\t\t\t\t\tCONCAT(FirstName, ' ', MiddleIn, ' ', LastName) LIKE '%$name%'\";\r\n\t\t\t$result = mysql_query($query);\r\n\t\t\t//Cycles through the rows of $result and puts them into $results in the proper format.\r\n\t\t\tfor($j=0; $thisResult = mysql_fetch_assoc($result); $j++){\r\n\t\t\t\tif(!array_key_exists($thisResult['ID'], $results)){\r\n\t\t\t\t\t$results[$thisResult['ID']] = $thisResult['FullName'];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $results;\r\n\t}",
"function getmoname($data)\r\n {\r\n \r\n $query = $this->db->query(\"SELECT username,user_id,firstname FROM `oc_user` where user_group_id='4' and firstname like '%\".$data[\"filter_name\"].\"%' order by firstname asc limit 5 \");\r\n \r\n return $query->rows; \r\n }",
"public function sortUsers($a, $b) {\n return strnatcmp($a->person->Last_Name, $b->person->Last_Name);\n }",
"function getSimilarAuthors($author) {\r\n $userlogin = getUserLogin();\r\n if ($userlogin->getPreference('similar_author_test')=='il') \r\n {\r\n //appendMessage('il');\r\n return $this->getSimilarAuthors2($author); //on initial lastname \"il\" \r\n }\r\n else\r\n {\r\n //appendMessage('c');\r\n return $this->getSimilarAuthors1($author); //on cleanname \"c\"\r\n }\r\n \r\n }",
"function matchstr($string1, $string2 ){\n\t\t//$string2 = utf8_strtolower( preg_replace('/([\\s+])/', '', Encoding::fixUTF8($string2 )));\n\t\t$string1 = explode(\" \", utf8_strtolower(Encoding::fixUTF8($string1)) );\n\t\t$string2 = explode(\" \", utf8_strtolower(Encoding::fixUTF8($string2)) );\n\t\t\n\t\t$filterStr1 = array();\n\t\tforeach( $string1 as $str1 ){\n\t\t\tif( trim($str1,'.') == $str1 ){\n\t\t\t\t$filterStr1[] = $str1;\n\t\t\t}\n\t\t}\n\t\t$filterStr2 = array();\n\t\tforeach( $string2 as $str2 ){\n\t\t\tif( trim($str2,'.') == $str2 ){\n\t\t\t\t$filterStr2[] = $str2;\n\t\t\t}\n\t\t}\n\t\t$foundName = array_intersect( $filterStr1, $filterStr2 );\n\t\treturn (count($foundName)==count($filterStr1));\n\t}",
"function sort_my_users_by_lastname( $a, $b ) {\r\n\tif ( $a->last_name == $b->last_name ) {\r\n\t\treturn 0;\r\n\t}\r\n\r\n\treturn ( $a->last_name < $b->last_name ) ? -1 : 1;\r\n}",
"public function adminsAutoComplete(Request $request)\n {\n $query = $request->get('query');\n $users = User::select([Constants::FLD_USERS_USERNAME . ' as name'])\n ->where(Constants::FLD_USERS_USERNAME, 'LIKE', \"%$query%\")\n ->where(Constants::FLD_USERS_USERNAME, '!=', Auth::user()[Constants::FLD_USERS_USERNAME])\n ->get();\n return response()->json($users);\n }",
"public function get_by_name($name)\n {\n $this->db->select('\n b.user_id id,\n b.full_name nama,\n ');\n $this->db->from($this->_table . ' a');\n $this->db->join('users_profile b', 'a.user_id = b.user_id', 'left');\n $this->db->join('hr_role c', 'a.hr_id = c.hr_id', 'left');\n // $this->db->join('hr_departments d', 'a.hr_id = d.id_hr', 'left');\n \n $this->db->where('a.is_del', '0');\n $this->db->where('a.status', '1');\n $this->db->where('c.id_role_group', '7');\n $this->db->like('b.full_name', $name);\n $this->db->group_by('b.user_id');\n\n $query = $this->db->get()->result_array();\n\n return $query;\n }",
"function ModifMiniNombreUser( $nameUser ){\r\n return strtolower($nameUser);\r\n}",
"private function compareSimilar($request_name, $name)\n {\n\n similar_text($request_name, $name, $porcentaje_final);\n return $porcentaje_final;\n }",
"function isUsernameUsed($username) {\r\n $users = retrieveUsers(0);\r\n\r\n // Check if username already exist\r\n foreach ($users as $user) {\r\n if($user['username'] == $username) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n}",
"public function username_is_found($str, $user_table = \"admin_user\") {\n\n $id = $this->ci->input->post(\"id\");\n\n $find_conf = array(\"username\" => $str);\n\n // exclude his own ID to search another profile's email. (edit only)\n if ($id) {\n $find_conf[\"id <>\"] = $id;\n }\n\n $result = $this->ci->generic_model->retrieve_one(\n $user_table,\n $find_conf\n );\n\n if ($result) { // there exists an username.\n return TRUE;\n } else { // username is not found.\n $this->ci->form_validation->set_message(\"username_is_found\", \"Username is not found.\");\n return FALSE;\n }\n }",
"public function showAllFriendNames() {\n $this->db->order_by('friend_name', 'asc');\n $query = $this->db->get($this->relation);\n if($query->num_rows() > 0){\n return $query->result();\n }else{\n return false;\n }\n }",
"function abc($a,$b){return strnatcasecmp($a->getInfo(\"name\"),$b->getInfo(\"name\"));}",
"public function search(String $term)\n {\n return $this->model->where('username', 'like', '%'.$term.'%')\n ->with('mixes')->get();\n }",
"public function username($name);",
"public function searchName(Request $request)\n {\n try {\n $result = $this->userService->searchByNameService($request->query);\n } catch (Exception $e) {\n return $this->sendError($e->getMessage());\n }\n\n return $this->sendResponse(null, $result);\n }",
"public function searchUserDetails($keywords)\n {\n $result = $this->model->where(\"first_name\", \"LIKE\", '%'.$keywords.'%')\n ->orwhere(\"last_name\", \"LIKE\", '%'.$keywords.'%')\n ->orwhere(\"mobile\", \"LIKE\", '%'.$keywords.'%')\n ->with('user')\n ->paginate(10)\n ->toArray();\n\n return $result;\n }",
"function studentNameSearch($sessionID, $name){\r\n\t\t$name = str_replace(' ', '%', $name);\r\n\t\t$results = array();\r\n\t\tfor($i=0; $i<sizeof($name); $i++){\r\n\t\t\t$query = \"SELECT ID, CONCAT(FIRST_NAME, ' ', MIDDLE_NAME, ' ', LAST_NAME) AS FullName FROM X_PNSY_STUDENT WHERE\r\n\t\t\t\t\tCONCAT(FIRST_NAME, ' ', MIDDLE_NAME, ' ', LAST_NAME) LIKE '%$name%'\";\r\n\t\t\t\t$result = mysql_query($query);\r\n\t\t\t\t//Cycles through the rows of $result and puts them into $results in the proper format.\r\n\t\t\t\tfor($j=0; $thisResult = mysql_fetch_assoc($result); $j++){\r\n\t\t\t\t\tif(!array_key_exists($thisResult['ID'], $results)){\r\n\t\t\t\t\t\t$results[$thisResult['ID']] = $thisResult['FullName'];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t}\r\n\t\treturn $results;\r\n\t}",
"public function searchUserLike($username) {\n return $this->createQueryBuilder('c')\n ->where('c.username LIKE :username')\n ->setParameter('username', '%'.$username.'%')\n ->getQuery()\n ->getResult();\n }",
"public function seachByName($query)\n {\n return $this->model->where('name', 'like', \"%\" . $query . \"%\");\n }",
"function findFriends($name)\n\t{\t\n\t\t$arr = explode(\" \", trim(mysql_real_escape_string($name)));\n\t\t\n\t\tif (sizeof($arr) == 0)\n\t\t{\n\t\t\t$GLOBALS[\"_PLATFORM\"]->sandboxHeader('HTTP/1.1 404 Not Found');\n\t\t\tdie();\n\t\t}\n\t\t\n\t\t$uid = getUserId();\n\t\t\n\t\t$cond = implode(\"|\", $arr);\n\t\t\n\t\t$res = getDBResultsArray(\n\t\t\t\"SELECT user_id AS id, first_name, last_name, img_url \n\t\t\tFROM user_table \n\t\t\tWHERE user_id <> $uid\n\t\t\tAND (first_name REGEXP '$cond' OR last_name REGEXP '$cond')\n\t\t\tAND user_id NOT IN (\n\t\t\t\tSELECT user_a\n\t\t\t\tFROM friend_map\n\t\t\t\tWHERE user_b = $uid\n\t\t\t\tUNION SELECT user_b\n\t\t\t\tFROM friend_map\n\t\t\t\tWHERE user_a = $uid\n\t\t\t);\"\n\t\t);\n\t\t\n\t\techo json_encode($res);\n\t}",
"static function checkForUserName($user)\n {\n $users = R::getAll('SELECT * FROM user');\n\n foreach ($users as $u) {\n if ($u['name'] == $user) {\n return true;\n }\n }\n\n return false;\n }",
"public function getUserOrProperName()\n {\n $person = $this->getPerson();\n if (strtolower($person->getEmail()) != strtolower($this->username)) {\n return $this->username;\n } else {\n $init = substr($person->getFirstname(), 0, 1);\n return \"{$init}. {$person->getLastname()}\";\n }\n }",
"public function autocomplete(Request $request)\n {\n $search = $request->input('search');\n $friends = User::select('id', 'name', 'surname', 'email')->where(DB::raw('concat(name,\" \",surname)'), 'LIKE', \"%{$search}%\")\n ->where('id', Auth::user()->getFriendsSender->modelKeys())->orWhere('id', Auth::user()->getFriendsReceiver->modelKeys())->paginate(1);\n return view('users.friend', compact('friends'));\n }",
"public function testItReturnsUsersFilteredByLastName()\n {\n $user1 = factory(User::class)->create([\n \"tenant_id\" => $this->user->tenant->id,\n ]);\n $tenant2 = factory(Tenant::class)->create();\n factory(User::class)->create([\n \"tenant_id\" => $tenant2,\n ]);\n \n $this->actingAs($this->user)\n ->getJson(\"api/v1/users?filter[lastname]={$user1->lastname}\")\n ->assertOk()\n ->assertJson([\n \"data\" => [\n [\n \"id\" => $user1->id,\n \"firstname\" => $user1->firstname,\n \"lastname\" => $user1->lastname,\n ],\n ],\n ]);\n }",
"static function getFriendsListOfAUserForAutoSuggestion($userId,$queryString){\n $executor= self::getDbConnection()->prepare(\"SELECT users.id as id,users.first_name as name FROM users join user_friends on users.facebook_id=user_friends.friends_fb_id Where user_friends.user_fb_id=:user_fb_id AND users.first_name like :user_name\", array(\\PDO::ATTR_CURSOR => \\PDO::CURSOR_FWDONLY));\n $executor->execute(array(\":user_fb_id\"=>$userId,\":user_name\"=>\"%\".$queryString.\"%\"));\n $result= $executor->fetchAll(\\PDO::FETCH_ASSOC);\n if(!empty($result))\n return $result;\n else\n return;\n }",
"private function wordMatch($words, $input, $sensitivity){ \r\n $shortest = -1; \r\n foreach ($words as $word) { \r\n //verifica a similaridade entre palavras\r\n $lev = levenshtein($input, $word); \r\n if ($lev == 0) { \r\n $closest = $word; \r\n $shortest = 0; \r\n break; \r\n } \r\n if ($lev <= $shortest || $shortest < 0) { \r\n $closest = $word; \r\n $shortest = $lev; \r\n } \r\n } \r\n if($shortest <= $sensitivity){ \r\n return $closest; \r\n } else { \r\n return 0; \r\n } \r\n }",
"function findusers() {\n $this->auth(SUPPORT_ADM_LEVEL);\n $search_word = $this->input->post('search');\n if($search_word == '-1'){ //initial listing\n $data['records'] = $this->m_user->getAll(40);\n } else { //regular search\n $data['records'] = $this->m_user->getByWildcard($search_word);\n }\n $data['search_word'] = $search_word;\n $this->load->view('/admin/support/v_users_search_result', $data);\n }",
"public function likedBy()\n {\n return $this->likes()\n ->join('users', 'likes.user_id', '=', 'users.id')\n ->get(['users.name', 'users.username']);\n }",
"public function rematch($id)\n {\n $user = DB::table('users')->where('id',$id)->first();\n echo $user->name;\n echo '</br>';\n $targets = DB::table('users')->get();\n foreach($targets as $single)\n {\n $value=0;\n $key=(string)$single->id;\n $dist1=$user->smoke-$single->a_smoke;\n $dist2=$user->a_smoke-$single->smoke;\n $value=$value+$dist1*$dist1+$dist2*$dist2;\n /* more questions */\n $results[$key] = sqrt($value);\n }\n /* sort by similiarity */\n print_r($results);\n asort($results);\n echo '</br>';\n print_r($results);\n $max = max($results);\n /* top 10 */\n echo'</br>list:</br>';\n $seed = rand(0,90);\n $i = 0;\n foreach($results as $user_id => $user_sim)\n {\n $i++;\n if($i==$seed+1)\n {\n $single1 = DB::table('users')->where('id',$user_id)->first();\n $sim1 = (100-($user_sim/$max)*100);\n }\n if($i==$seed+2)\n {\n $single2 = DB::table('users')->where('id',$user_id)->first();\n $sim2 = (100-($user_sim/$max)*100);\n }\n echo'id:'.$user_id.'</br>'.'sim:'.(100-($user_sim/$max)*100).'%</br>';\n if($i==2){\n break;\n }\n \n \n }\n return view(\"/profile/{{Auth::user()->slug}}\",['user'=>$user,\n 'single1'=>$single1,\n 'sim1'=>$sim1,\n 'single2'=>$single2,\n 'sim2'=>$sim2,\n ]);\n }",
"function pwordMatches(){\n\t\t//assume pword does not match that in system\n\t\t$match = false;\n\t\ttry{//try to est connection to db \n\t\t\t$user_db = new SQLite3('users.db');\n\t\t}catch(Exception $ex){ //if cannot catch exception \n\t\t\techo $ex->getMessage(); \n\t\t}\n\t\t//query for all usernames\n\t\t$statement = 'SELECT Username, Password FROM users;';\n\t\t$run = $user_db->query($statement); \n\n\t\t$pword = $_SESSION['password'];\n\t\t$pword = hash('md2', $pword); \n\t\tif($run){//query did not have error\n\t\t\twhile($row = $run->fetchArray()){\n\t\t\t\tif(trim($row['Username']) === trim($_POST['name'])){//if provided username is the same as that queried\t\n\t\t\t\t\tif($pword === trim($row['Password'])){//if provided pword matches that for the provided username\n\t\t\t\t\t\t//password matches\n\t\t\t\t\t\t$match = true; \n\t\t\t\t\t\t//break out of loop\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t}\n\t\t}\n\t\t$user_db->close(); \n\t\treturn $match; \t\n\t}",
"private function suggestLoginName($loginName) {\n $loginName = preg_replace('/[\\W_]+/u', '-', strtolower(trim($loginName)));\n //get the entity manager\n $em = $this->getDoctrine()->getManager();\n //get the user repo\n $userRepository = $em->getRepository('ObjectsUserBundle:User');\n //try to check if the given name does not exist\n $user = $userRepository->findOneByLoginName($loginName);\n if (!$user) {\n //valid login name\n return $loginName;\n }\n //get a valid one from the database\n return $userRepository->getValidLoginName($loginName);\n }",
"public function getUsersLike($busqueda){\n $query = \"SELECT * FROM usuario WHERE username LIKE '%$busqueda%' \";\n return $this->consulta($query);\n }",
"public function findUserByUsername($username);",
"public function findUserByUsername($username);",
"public function findUserByUsername($username);",
"private function search_for_name($string)\r\n\t{\r\n\t\t$search_string = '%' . $string . '%';\r\n\t\t$results = array();\r\n\t\tglobal $dbCon;\r\n\r\n\t\t$sql = \"SELECT id FROM student WHERE concat(firstname, ' ', lastname) LIKE ?;\";\r\n\t\t$stmt = $dbCon->prepare($sql); //Prepare Statement\r\n\t\tif ($stmt === false)\r\n\t\t{\r\n\t\t\ttrigger_error('SQL Error: ' . $dbCon->error, E_USER_ERROR);\r\n\t\t}\r\n\t\t$stmt->bind_param('s', $search_string);\r\n\t\t$stmt->execute(); //Execute\r\n\t\t$stmt->bind_result($student_id); //Get ResultSet\r\n\t\twhile ($stmt->fetch())\r\n\t\t{\r\n\t\t\t$results[] = $student_id;\r\n\t\t}\r\n\t\t$stmt->close();\r\n\r\n\t\treturn $results;\r\n\t}",
"public function getUsersMatching($keyword) {\n $sql = 'SELECT id, firstname, mail, role, isAdmin FROM user WHERE firstname LIKE ? OR mail LIKE ? OR role LIKE ?';\n $sth = $this->db->prepare($sql);\n $sth-> execute(array(\"%$keyword%\", \"%$keyword%\", \"%$keyword%\"));\n if ($row = $sth->fetchAll()) {\n return $row;\n }\n\n }",
"public function searchUsers()\n {\n # Set tables to search to a variable.\n $tables = $this->getTables();\n # Set fields to search to a variable.\n $fields = $this->getFields();\n # Set search terms to a variable.\n $search_terms = $this->getSearchTerms();\n # Perform search.\n $this->performSearch($search_terms, $tables, $fields);\n }",
"public function chkUserDuplicate() {\n $this->load->model('register_model');\n $user_name = $this->input->post('user_name');\n $table_to_pass = 'mst_users';\n $fields_to_pass = array('user_id', 'user_name');\n $condition_to_pass = array(\"user_name\" => $user_name);\n $arr_login_data = $this->register_model->getUserInformation($table_to_pass, $fields_to_pass, $condition_to_pass, $order_by_to_pass = '', $limit_to_pass = '', $debug_to_pass = 0);\n if (count($arr_login_data)) {\n echo 'false';\n } else {\n echo 'true';\n }\n }",
"function find_hotel_user_by_name($hotel_user_name)\n\t{\n\t $this->db->select('COUNT(`sb_hotel_username`) as hotelusercount',false);\n\t\t$this->db->where('sb_hotel_username',$hotel_user_name);\n\t\t$query=$this->db->get('sb_hotel_users');\n\t\treturn $query->result_array();\n\t}",
"function duplicateName(){\n $dup = $this->app['db']->fetchColumn('SELECT id from worlds where name=?', array($this->name));\n if($dup == $this->id || !$dup){\n return false;\n }\n $this->validation_errors[] = 'Name is a duplicate';\n return true;\n }",
"function like($str, $searchTerm)\n {\n $searchTerm = strtolower($searchTerm);\n $str = strtolower($_SESSION['username']);\n $pos = strpos($str, $searchTerm);\n if ($pos === false)\n return false;\n else\n return true;\n }"
] | [
"0.63768333",
"0.6048122",
"0.5985277",
"0.5898679",
"0.5755743",
"0.5739159",
"0.57253975",
"0.5658682",
"0.5557933",
"0.55320156",
"0.5502373",
"0.5493625",
"0.54931307",
"0.5472317",
"0.54448634",
"0.5443291",
"0.54060113",
"0.5381018",
"0.5358927",
"0.5234527",
"0.5221841",
"0.51998895",
"0.51560235",
"0.5152285",
"0.5142952",
"0.51426923",
"0.5122183",
"0.51135314",
"0.51028466",
"0.50963265",
"0.50439227",
"0.5043855",
"0.50301677",
"0.50206286",
"0.5007124",
"0.5001745",
"0.49917102",
"0.4990253",
"0.49864045",
"0.49759233",
"0.49479407",
"0.49379602",
"0.49357656",
"0.4926399",
"0.49218956",
"0.4921652",
"0.49182498",
"0.49048197",
"0.49040702",
"0.49036637",
"0.49036637",
"0.48922995",
"0.4890023",
"0.48890784",
"0.48860067",
"0.4879863",
"0.48713914",
"0.4852159",
"0.4839286",
"0.48187",
"0.48107898",
"0.48088345",
"0.4797433",
"0.4792969",
"0.4790415",
"0.47898066",
"0.4785073",
"0.4776695",
"0.47743452",
"0.47696763",
"0.47688612",
"0.47664648",
"0.47576112",
"0.47512573",
"0.47480622",
"0.474341",
"0.47391707",
"0.47314674",
"0.47301072",
"0.4724582",
"0.47177482",
"0.4712747",
"0.46963093",
"0.4693823",
"0.4690253",
"0.4688202",
"0.46881127",
"0.468217",
"0.46721134",
"0.4668718",
"0.46652606",
"0.46652606",
"0.46652606",
"0.46644184",
"0.4664324",
"0.46638858",
"0.46637803",
"0.46636662",
"0.46534127",
"0.46531492"
] | 0.6832669 | 0 |
Check if the username is unique as is. | public function isUsernameUnique(string $username): bool
{
return static::where($this->getUsernameColumnName(), $username)->get()->count() === 0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function isUniqueUsername(){\n \tif(!empty($this->data['User']['username'])){\n \t\t$username = $this->data['User']['username'];\n\n \t\t$user = $this->find('first', array(\n \t\t\t'conditions' => array(\n \t\t\t\t'User.username' => $username,\n \t\t\t)\n \t\t));\n \t\tif(empty($user)){\n \t\t\treturn true;\n \t\t}else{\n \t\t\treturn false;\n \t\t}\n \t}\n \treturn false;\n }",
"function is_unique_username($username)\n\t{\n\t\t$this->ci->db->select('*');\n\t\t$this->ci->db->where('au_username', $username);\n\t\t$query = $this->ci->db->get('auth_user');\n\t\tif($query->num_rows() == 0)\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}",
"public function uniqueUsername($uname) {\n\t\treturn !$this->hasAny(array('username' => $uname));\n\t}",
"public function unique_username()\n {\n $username = $this->input->post('username');\n $id = $this->input->post('id');\n $user = $this->user->where('username', $username)->first();\n\n if ($user) {\n if ($id == $user->id) {\n return true;\n }\n $this->load->library('form_validation');\n $this->form_validation->set_message('unique_username', '%s has been used!');\n return false;\n }\n\n return true;\n }",
"function is_unique_username($username, $current_id=null) {\n $users_result = find_users_by_username($username);\n // Loop through all results, return false if username is in use\n while($user = db_fetch_assoc($users_result)) {\n // Make sure username isn't in use by our current user.\n // Use (int) to make sure we are comparing two integers.\n if((int) $user['id'] != (int) $current_id) {\n return false; // username is being used by someone else\n }\n }\n // Returns true at the end, but only if the loop had no records\n // to loop through or if the loop never returned false.\n return true; // username is not used by anyone\n }",
"public function _unique_username ($str){\n\t\t// Do NOT validate if email already exists\n\t\t// UNLESS it's the email for the current user\n\t\t\n\t\t$id = $this->session->userdata('id');\n\t\t$this->db->where('username', $this->input->post('username'));\n\t\t!$id || $this->db->where('id !=', $id);\n\t\t$user = $this->user_m->get();\n\t\t\n\t\tif (count($user)) {\n\t\t\t$this->form_validation->set_message('_unique_username', '%s should be unique');\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\treturn TRUE;\n\t}",
"private function checkUsernameDuplicating($username)\n\t{\n\t\t$checkUsernameDuplicateQuery = $this->db->get_where('Users', array('username' => $username), 1);\n\t\tif ($checkUsernameDuplicateQuery->num_rows() > 0)\n\t\t\treturn false;\n\t\treturn true;\n\n\t}",
"public function validate_uniqueUsername($value, $input, $args){\n\t\t$user = $this->user->where('username', $value);\n\n\t\t//ignore current username when updating if the same username is passed\n\t\tif($this->auth && $this->auth->username === $value){\n\t\t\treturn true;\n\t\t}\n\n\t\treturn ! (bool) $user->count();\n\t}",
"public function usernameExists() {\n\t\tif(!check($this->_username)) return;\n\t\t$result = $this->db->queryFetchSingle(\"SELECT \"._CLMN_USERNM_.\" FROM \"._TBL_MI_.\" WHERE \"._CLMN_USERNM_.\" = ?\", array($this->_username));\n\t\tif(!is_array($result)) return;\n\t\treturn true;\n\t}",
"function chkusername($str) {\n $this->db->where('username', strtolower($str));\n $query = $this->db->get('user');\n if ($query->num_rows() == 1) {\n $this->form_validation->set_message('chkusername', 'Username is already being used!');\n return false;\n }\n\n return true;\n }",
"function username_check($username)\r\n\t{\r\n\t\tif ( $user = $this->generic_model->get_where_single_row('users', array('username' => $username))) \r\n\t\t{\r\n\t\t\t$this->form_validation->set_message('username_check', 'This %s is already registered.');\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\telse { return true; }\t\t\r\n\t}",
"public function uniqueUsername($username, $exceptId = null)\r\n\t{\r\n\t\t$exists = DB::table('users')->where('username', $username);\r\n\r\n\t\tif ($exceptId)\r\n\t\t{\r\n\t\t\t$exists->where('id', '!=', $exceptId);\r\n\t\t}\r\n\r\n\t\treturn ! $exists->exists();\r\n\t}",
"function unique_username($value, $id = 0)\n\t{\n\t\tif ($this->user_model->is_username_unique($value, $id))\n\t\t\treturn TRUE;\n\t\telse\n\t\t{\n\t\t\t$this->form_validation->set_message('unique_username', lang('already_taken'));\n\t\t\treturn FALSE;\n\t\t}\n\t}",
"function isUsernameUsed($username) {\r\n $users = retrieveUsers(0);\r\n\r\n // Check if username already exist\r\n foreach ($users as $user) {\r\n if($user['username'] == $username) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n}",
"function usernameTaken($username){\r\n if(!get_magic_quotes_gpc()){ $username = addslashes($username); }\r\n\t $query = \"SELECT username FROM \".TBL_USERS.\" WHERE username = :username\";\r\n\t $stmt = $this->connection->prepare($query);\r\n\t $stmt->execute(array(':username' => $username));\r\n\t $count = $stmt->rowCount(); \r\n return ($count > 0);\r\n }",
"private function checkUsername($name){\n\t\t\tif(strlen($name) < 3)\n\t\t\t\tthrow new UserFewCharException();\n\t\t\tif($this->userList->getUsers()->getUserByName($name) != null)\n\t\t\t\tthrow new UserExistsException();\n\t\t\tif($name != strip_tags($name))\n\t\t\t\tthrow new UserBadCharException();\n\t\t\treturn true;\n\t\t}",
"private function username_check($username){\n\t\tif(strlen($username) > REGISTER_USERNAME_MAX_LENGTH) {\t// check if username is less than max len\n\t\t\t$this->error .= \"Username must be less than \" . REGISTER_USERNAME_MAX_LENGTH . \" characters.\\n\"; // error username is >= max len\n\t\t\treturn false;\n\t\t}\n\n\t\tif($stmt = $this->Mysqli->prepare(\"SELECT username FROM players WHERE username = ? LIMIT 1\")){ // prepare select query to check if username exists\n\t\t\t$stmt->bind_param('s', $username);\t\t\t\t\t\t// bind params\n\t\t\t$stmt->execute();\t\t\t\t\t\t\t\t\t\t// execute\n\t\t\t$stmt->store_result();\t\t\t\t\t\t\t\t\t// store the results\n\n\t\t\t$updated = $stmt->num_rows == 1;\n\n\t\t\t$stmt->free_result();\t\t\t\t\t\t\t\t\t// free results\n\t\t\t$stmt->close();\t\t\t\t\t\t\t\t\t\t\t// close connection\n\t\t\tif($updated){\t\t\t\t\t\t\t\t\t\t\t// check if row exists\n\t\t\t\t$this->error .= \"This username already exist!\\n\"; \t// error username exists\n\t\t\t\treturn false;\n\t\t\t} else\n\t\t\t\treturn true;\t\t\t\t\t\t\t\t\t\t// username dne, return true\n\t\t} else {\n\t\t\t$this->error .= \"Error reaching servers, please try again later.\\n\";\n\t\t\treturn false;\n\t\t}\n\t}",
"function UserNameExistsEdit($username) {\n\t$usernameUser = GetUser('username');\n\n\t$result = DBRead('usuarios', $params = 'username', $fields = 'username');\n\t$query = \"SELECT username FROM usuarios WHERE username = '$username'\";\n\t$result = DBExecute($query);\n\t$resultUsername = mysqli_fetch_assoc($result);\n\t$resultUsername = $resultUsername['username'];\n\n\tif (mysqli_num_rows($result) <= 0 || $usernameUser == $resultUsername)\n\t\treturn true;\n\telse\n\t\treturn false;\n}",
"public function hasUsername() : bool;",
"public function checkUsername() {\r\n if (isset($this->data[$this->name]['id'])) {\r\n $condition = array(\r\n \"conditions\" => array(\r\n \"id !=\" => $this->data[$this->name]['id'],\r\n \"Username\" => $this->data[$this->name]['Username'],\r\n ),\r\n \"limit\" => 1,\r\n );\r\n } else {\r\n $condition = array(\r\n \"conditions\" => array(\r\n \"Username\" => $this->data[$this->name]['Username'],\r\n ),\r\n \"limit\" => 1,\r\n );\r\n }\r\n\r\n $this->find(\"first\", $condition);\r\n $count = $this->getNumRows();\r\n if ($count > 0) {\r\n return FALSE;\r\n } else {\r\n return TRUE;\r\n }\r\n }",
"public static function isUsernameAlreadyInUse($username)\n {\n $db = Base::getConnection();\n $stmt = $db->prepare(\"SELECT COUNT(*) AS count_username FROM users WHERE username = :username\");\n $stmt->bindParam(\":username\", $username, PDO::PARAM_STR);\n $stmt->execute();\n\n $result = $stmt->fetch();\n $stmt->closeCursor();\n return $result['count_username'] > 0;\n }",
"private function _validateUsername()\n\t{\n\t\t$state = $this->getStateVariables();\n\n\t\t$ret = (object)array('username' => false);\n\t\t$username = $state->username;\n\t\tif(empty($username)) return $ret;\n\t\t$myUser = JFactory::getUser();\n\t\t$user = FOFModel::getTmpInstance('Jusers','AkeebasubsModel')\n\t\t\t->username($username)\n\t\t\t->getFirstItem();\n\n\t\tif($myUser->guest) {\n\t\t\tif(empty($user->username)) {\n\t\t\t\t$ret->username = true;\n\t\t\t} else {\n\t\t\t\t// If it's a blocked user, we should allow reusing the username;\n\t\t\t\t// this would be a user who tried to subscribe, closed the payment\n\t\t\t\t// window and came back to re-register. However, if the validation\n\t\t\t\t// field is non-empty, this is a manually blocked user and should\n\t\t\t\t// not be allowed to subscribe again.\n\t\t\t\tif($user->block) {\n\t\t\t\t\tif(!empty($user->activation)) {\n\t\t\t\t\t\t$ret->username = true;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$ret->username = false;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$ret->username = false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t} else {\n\t\t\t$ret->username = ($user->username == $myUser->username);\n\t\t}\n\t\treturn $ret;\n\t}",
"function usernameTaken($username){\r\n if(!get_magic_quotes_gpc()){\r\n $username = addslashes($username);\r\n }\r\n $q = \"SELECT username FROM \".TBL_USERS.\" WHERE username = '$username'\";\r\n $result = mysql_query($q, $this->connection);\r\n return (mysql_numrows($result) > 0);\r\n }",
"public function hasUsername(){\n return $this->_has(4);\n }",
"public function ajax_check_username() {\n\t\tglobal $wpdb;\n\n\t\tif ( !isset( $_REQUEST['action'] ) )\n\t\t\treturn;\n\n\t\tif ( 'visual_form_builder_check_username' !== $_REQUEST['action'] )\n\t\t\treturn;\n\n\t\t$username = esc_html( $_REQUEST['username'] );\n\t\t$user_id = username_exists( $username );\n\t\t$valid = 'true';\n\n\t\t// If username exists, not valid\n\t\tif ( $user_id )\n\t\t\t$valid = 'false';\n\n\t\techo $valid;\n\n\t\tdie(1);\n\t}",
"function usernameTaken($username){\n\t\tif(!get_magic_quotes_gpc()){\n\t\t\t$username = addslashes($username);\n\t\t}\n\t\t$q = \"SELECT username FROM \".TBL_USERS.\" WHERE username = '$username'\";\n\t\t$result = mysql_query($q, $this->connection);\n\t\treturn (mysql_numrows($result) > 0); \n\t}",
"public function hasUsername() {\n return $this->_has(1);\n }",
"public function checkusername()\n\t\t{\n\t\t\t$username = $_POST['owner_username'];\n\t\t\t$data = $this->UserModel->checkusername($username);\n\t\t\tif (empty($data)){\n\t\t\t\techo 'true';\n\t\t\t}else {\n\t\t\t\techo 'false';\n\t\t\t}\n\t\t}",
"public function validate_username()\n\t{\n\t\t$db = JFactory::getDbo();\n\t\t$query = $db->getQuery(true);\n\t\t$userId = JFactory::getUser()->id;\n\t\t$username = $this->input->getString('fieldValue');\n\t\t$validateId = $this->input->getString('fieldId');\n\t\t$query->select('COUNT(*)')\n\t\t\t->from('#__users')\n\t\t\t->where('username = ' . $db->quote($username));\n\n\t\tif ($userId > 0)\n\t\t{\n\t\t\t$query->where('id != ' . (int) $userId);\n\t\t}\n\n\t\t$db->setQuery($query);\n\t\t$total = $db->loadResult();\n\t\t$arrayToJs = array();\n\t\t$arrayToJs[0] = $validateId;\n\n\t\tif ($total)\n\t\t{\n\t\t\t$arrayToJs[1] = false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$arrayToJs[1] = true;\n\t\t}\n\n\t\techo json_encode($arrayToJs);\n\n\t\t$this->app->close();\n\t}",
"public function hasUsername(){\n return $this->_has(6);\n }",
"public function hasUsername(){\n return $this->_has(6);\n }",
"function usernameTaken($username, $pdo) {\n\t// check if users exists already\n\t$query = \"select count(*) as number from users where username=? limit 1\";\n\t$stmt = $pdo->prepare($query);\n\t$stmt->execute([$username]);\n\t$result = $stmt->fetch();\n\tif ($result['number'] === 0) {\n\t\treturn false;\n\t}\n\treturn true;\n}",
"public function usernameEntryIsValid() {\r\n if (array_key_exists(\"username\", $_POST) )\r\n {\r\n if ( !Validator::usernameIsValid($_POST[\"username\"]) )\r\n {\r\n $this->errors[\"username\"] = \"Username is not valid!\";// if the username is not valid then the error will be filled with this message\r\n }\r\n if( $this->usernameIsTaken($_POST[\"username\"]) == true ) \r\n {\r\n $this->errors[\"username\"] = \"That Username has been taken!\"; // if the website that the user entered is already in the database\r\n }\r\n }\r\n else\r\n {\r\n $this->errors[\"username\"] = \"Username is required!\"; // requires a Username to be entered\r\n }\r\n \r\n return ( empty($this->errors[\"username\"]) ? true : false );\r\n }",
"public function isUnique();",
"public function username_check($str) {\n // return FALSE;\n return TRUE;\n }",
"function has_unique_username($username/*, $current_id=\"0\"*/) {\r\n global $db;\r\n\r\n $sql = \"SELECT * FROM admins \";\r\n $sql .= \"WHERE username='\" . $db->real_escape_string($username) . \"';\";\r\n //$sql .= \"AND id != '\" . $db->real_escape_string($current_id) . \"'\";\r\n\r\n $result = $db->query($sql);\r\n $user_count = $result->num_rows;\r\n $result->free_result();\r\n\r\n return $user_count === 0;\r\n}",
"function validateUser($username){\n\t\tglobal $dataModel;\n\n\t\tif($dataModel->userExist($username, \"\")){\n\t\t\t$_SESSION['error'] = \"Username already taken\";\n\t\t\theader(\"location:../views/profUpdate.php\");\n\t\t}\n\t\n\t\tif (strlen($username)< 6){\n\t\t\t$_SESSION['error'] = \"Username too short\";\n\t\t\theader(\"location:../views/profUpdate.php\");\n\t\t}\n\n\t\treturn true;\n\t}",
"function unique_user($username, $email){\n\t\t$conn \t= connectDB();\n\t\t$sth \t= $conn \t-> prepare('SELECT count(*)\n\t\t\t\t\t\t\t\t\t\tFROM `clients`\n\t\t\t\t\t\t\t\t\t\tWHERE `email`\t= ?');\n\t\t$sth \t-> execute(array($email));\n\n\t\tif($sth -> fetchColumn() >= 1){\n\t\t\treturn false;\n\t\t} else {\n\t\t\t$sth \t= $conn \t-> prepare('SELECT count(*)\n\t\t\t\t\t\t\t\t\t\t\tFROM `clients`\n\t\t\t\t\t\t\t\t\t\t\tWHERE `username` = ?');\n\t\t\t$sth \t-> execute(array($username));\n\t\t\treturn \t(!$sth -> fetchColumn() >= 1);\n\t\t}\n\t}",
"function isFreeUsername($username, $connection) {\n\t$namecheckquery = mysqli_query($connection, \"select name from users where name = '\".$username.\"';\");\n\t$namecheck = mysqli_num_rows($namecheckquery);\n\n\treturn !$namecheck;\n}",
"public static function isUsername (string $username): bool {\n $length = strlen($username);\n return !str_contains($username, '__') && $length >= 4 && $length <= 33 && preg_match('/^@?([a-zA-Z])(\\w{4,31})$/', $username);\n }",
"public function checkUsernameExists(){\r\n\t\t\t$objDBConn = DBManager::getInstance();\r\n\t\t\tif($objDBConn->dbConnect()){\r\n\t\t\t\t//echo \"SELECT * from trainer where username='\".$_REQUEST[\"username\"].\"'\";\r\n\t\t\t\t$result = mysql_query(\"SELECT * from trainer where username='\".$_REQUEST[\"username\"].\"' LIMIT 1\");\r\n\t\t\t\t$count= mysql_num_rows($result);\r\n\t\t\t\tif($count==0){\r\n\t\t\t\t\t//Username is available\r\n\t\t\t\t\t$objDBConn->dbClose();\r\n\t\t\t\t\t//return true;\r\n\t\t\t\t\techo $count;\r\n\t\t\t\t}else{\r\n\t\t\t\t\t//Username already taken.\r\n\t\t\t\t\t$objDBConn->dbClose();\r\n\t\t\t\t\t//return false;\r\n\t\t\t\t\techo $count;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\t//echo 'Something went wrong ! ';\r\n\t\t\t\t$objDBConn->dbClose();\r\n\t\t\t\t//return false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}",
"function checkUserExists($username){\n\treturn false;\n}",
"function username_exists($username)\n {\n $sql = \"\n SELECT id\n FROM {$this->_db}\n WHERE username = \" . $this->db->escape($username) . \"\n LIMIT 1\n \";\n\n $query = $this->db->query($sql);\n\n if ($query->num_rows())\n {\n return TRUE;\n }\n\n return FALSE;\n }",
"function username_exists($username)\n {\n $sql = \"\n SELECT id\n FROM {$this->_db}\n WHERE username = \" . $this->db->escape($username) . \"\n LIMIT 1\n \";\n\n $query = $this->db->query($sql);\n\n if ($query->num_rows())\n {\n return TRUE;\n }\n\n return FALSE;\n }",
"public function usernameEntryIsValid() {\r\n \r\n //todo put logic here (same as email)\r\n // set the var equal to function call of username\r\n $username = $this->getUsername();\r\n // If the field is empty\r\n if ( empty($username) ) {\r\n // Will send it to errors as username and display the message to user\r\n $this->errors[\"username\"] = \"Username is missing.\";\r\n // Other test calls the validator class and nameisvalid function to test\r\n // the user name is it returns invalid the message is displayed to the user\r\n } else if ( !Validator::nameIsValid($this->getUsername()) ) {\r\n $this->errors[\"username\"] = \"Username is not valid.\"; \r\n }\r\n //Will return if its empty and whether any errors are contained\r\n return ( empty($this->errors[\"username\"]) ? true : false ) ;\r\n }",
"function userExists($username) {\r\n\t\treturn username_exists($username);\r\n\t}",
"static function isUsernameUsed(string $username) {\n $sql = 'SELECT * FROM users WHERE lower(username) = lower(\"'.$username.'\")';\n $db = new Database();\n $row = $db->query($sql);\n\n if (empty($row)) {\n return false;\n } else {\n return true;\n }\n }",
"private function checkUsernameExist(){\n $base = new ConnexionDb();\n\n $req = $base->query(\n \"SELECT u.username FROM user as u WHERE u.username = :username\",\n array(\n array('username',$_POST['username'],\\PDO::PARAM_STR)\n )\n );\n\n if(isset($req[0]->username)){\n return true;\n }else{\n return false;\n }\n }",
"function usernameExists(){\n\t $query = \"SELECT id, first_name, last_name, password\n\t FROM \" . $this->table_name . \"\n\t WHERE username = ?\n\t LIMIT 0,1\";\n\t \n\t $stmt = $this->conn->prepare( $query );\n\t $this->username=htmlspecialchars(strip_tags($this->username));\n\t $stmt->bindParam(1, $this->username);\n\t \n\t $stmt->execute();\n\t $num = $stmt->rowCount();\n\t \n\t if($num > 0){\n\t $row = $stmt->fetch(PDO::FETCH_ASSOC);\n\t \n\t $this->id = $row['id'];\n\t $this->first_name = $row['first_name'];\n\t $this->last_name = $row['last_name'];\n\t $this->password = $row['password'];\n\t \n\t return true;\n\t }\n\t return false;\n\t}",
"function checkUsernameExists($username) {\n $query = \"SELECT * FROM `customers` WHERE username='\".$username.\"'\";\n $result = Database::selectQuery($query);\n if(count($result) == 1) {\n return true;\n } else {\n return false;\n }\n }",
"function _validate_pnhempusername()\r\n\t{\r\n\t\t$username = $this->input->post('username');\r\n\t\tif($this->db->query('select count(*) as t from king_admin where username = ? ',$username)->row()->t)\r\n\t\t{\r\n\t\t\t$this->form_validation->set_message('_validate_pnhempusername','Username already available');\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"function userExists( $username ) {\n return true;\n }",
"private function validateUsername() {\r\n $val = trim($this->data['username');\r\n \r\n if( empty($val) ) { \r\n $this->addError('username', 'username cannot be empty');\r\n } else {\r\n if(preg_match('/^[a-aA-Z0-9]{6,12}$/', $val)) {\r\n $this->addError('username', 'username must 6-12 chars $ alphanumeric')\r\n }\r\n } \r\n }",
"public function Add_validate_user_name($value)\n\t{\n\t\tif(0 != $this->GetOne('id',array('user_name'=>'=?'),$value) )\n\t\t{\n\t\t\t$this->error_msg = DOLang::Get('Do not allow duplicated users!');\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"function randomUser_exists()\t{\n\t\treturn $this->recordNumber(self::RNDUSERSC_NAME) > 0;\n\t}",
"protected function validate_username($name) {\r\n\t\t$ret = new Status();\r\n\t\tif (!Users::is_unique_username($name)) {\r\n\t\t\t$ret->append(tr('An user with this username already exists', 'users'));\r\n\t\t}\r\n\t\treturn $ret;\r\n\t}",
"static public function usernameExists($username) {\r\n\t\treturn (1 == DB::getInstance()->query('SELECT COUNT(*) FROM `'.PREFIX.'account` WHERE `username`='.DB::getInstance()->escape($username).' LIMIT 1')->fetchColumn());\r\n\t}",
"public function check_username_exists($username){\n\t\t\t$this->form_validation->set_message('check_username_exists', 'That username is taken. Please choose a different one');\n\t\t\tif($this->um->check_username_exists($username)){\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}",
"function verify_username_availability($userName){\n $exists = false;\n if(get_user($userName)){\n $exists = true;\n }\n return $exists;\n}",
"function UserNameExists($username) {\n\n\t$result = DBRead('usuarios', $params = 'username', $fields = 'username');\n\n\t$query = \"SELECT username FROM usuarios WHERE username = '$username'\";\n\t$result = DBExecute($query);\n\n\tif (mysqli_num_rows($result) <= 0)\n\t\treturn true;\n\telse\n\t\treturn false;\n}",
"public function CheckUsername($username, $userId);",
"public static function username_exists($username) {\n $connection = DatabaseConnection::connection();\n $sql = \"SELECT user_id FROM users WHERE username=:username\";\n $statement = $connection->prepare($sql);\n $statement->execute(['username' => $username]);\n $count = count($statement->fetchAll());\n if($count == 1)\n return TRUE;\n else\n return FALSE;\n }",
"public function valid_username($username) {\n $query = $this->db->get_where('user', array('username' => $username));\n if(empty($query->row_array())){\n return true;\n } else {\n return false;\n }\n }",
"private function hasValidUserName($input) {\n\t\treturn strtolower($input->user) == strtolower(get_option(\"wp_broadbean_users\"));\n\t}",
"public static function is_valid_userid($username)\n {\n $userid_regex = '/^[a-z\\d_]{4,28}$/i';\n return (preg_match($userid_regex, $username)) ? (1) : (0);\n }",
"function usernameExists($username)\r\n{\r\n\tglobal $db,$db_table_prefix;\r\n\r\n \tif(returns_result(\"SELECT Active FROM \".$db_table_prefix.\"Users WHERE Username_Clean = '\".$db->sql_escape(sanitize($username)).\"' LIMIT 1\") > 0)\r\n\t\treturn true;\r\n\telse\r\n\t\treturn false;\r\n}",
"public static function isValidUsername($username)\n {\n return isset($username) && strlen($username) > 1 && strlen($username) <= self::MAX_USERNAME_STR_LENGTH;\n }",
"function validate_username($username)\r\n\t{\r\n\t\t//return preg_match(REGEX_USERNAME, $username);\r\n\t\treturn preg_match(REGEX_USERNAME, $username);\r\n\t}",
"function does_username_exist($username, $id=0){\n\tglobal $db;\n\t$original_name = $username;\n\n\t$username = evaluate_name($username);\n\t$username_safe = $db->escape_string($username);\n\t$id_safe = $db->escape_string($id);\n\n\t//Query the Recipes table for specified recipe name\n\t$query = \"SELECT count(*) as countNames FROM Administrators \";\n\t$query .= \"WHERE lower(replace(username,' ','')) = '{$username_safe}' \";\n\t$query .= \"AND id <> '{$id_safe}'\";\n\n\t$result = $db->db_query($query);\n\n\t$username_exists = $db->db_fetch_assoc($result);\n\n\t$message = [];\n\tif($username_exists[\"countNames\"] != 0){\n\t\t$message[\"username\"] = \"The username \\\"{$original_name}\\\" already exists. Please enter a new username. \";\n\t}\n\n\treturn $message;\n}",
"function checkUserName($connection, $username){\r\n $query = \"SELECT COUNT(*) AS count FROM users WHERE name=:username\";\r\n $statement = $connection->prepare($query);\r\n $statement->bindValue(\":username\", $username, PDO::PARAM_STR);\r\n $statement->execute();\r\n $row = $statement->fetch(PDO::FETCH_ASSOC);\r\n return $row[\"count\"] == \"0\";\r\n }",
"function validateUser(Userinfo $userinfo)\n\t{\n\t\t$username = $this->filterUsername($userinfo->username);\n\t\tif ($username !== $userinfo->username) {\n\t\t\tthrow new RuntimeException('Username Has Invalid Character: ' . $userinfo->username . ' vs ' . $username);\n\t\t}\n\t\treturn true;\n\t}",
"public function Username(string $username):bool\n {\n $bool = null;\n if (isset($username)) {\n if(strlen($username) > 5 && strlen($username) < 20) {\n $bool = true;\n } else {\n $bool = false;\n }\n }\n return $bool;\n }",
"public function check_username_exists($username){\n\t\t\t$this->form_validation->set_message('check_username_exists', 'That username is already exists.');\n\t\t\tif($this->user_model->check_username_exists($username)){\n\t\t\t\treturn true;\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}",
"function isValid($username) {\n\treturn !preg_match('/[^a-z0-9.\\-_]/i', $username);\n}",
"public function check_username( $username )\n\t{\n\t\t// Check the username\n\t\t$sanitized_user_login = sanitize_user( $username );\n\t\tif (! validate_username( $username ) ) {\n\t\t\t$this->errors['username'] = apply_filters( \"{$this->prefix}/create_object/error/username\", $this->settings['strings']['username'] );\n\t\t\t$sanitized_user_login = '';\n\t\t} elseif ( username_exists( $sanitized_user_login ) ) {\n\t\t\t$this->errors['username'] = apply_filters( \"{$this->prefix}/create_object/error/username_exists\", $this->settings['strings']['username_exists'] );\n\t\t}\n\n\t\treturn $sanitized_user_login;\n\t}",
"public function checkUsername()\n {\n $username = htmlspecialchars($_POST['username']);\n if (!empty($_POST['username'])) {\n if(strlen($username) <= 255) {\n $isPseudo = $this->isPseudo($username);\n if ($isPseudo == 0) {\n return true;\n } else {\n return $message = 'Ce pseudo est déjà utilisé. Veuillez en choisir un autre.';\n }\n } else {\n return $message = 'Votre pseudo est trop long';\n }\n } else {\n return $message = 'Tous les champs ne sont pas complétés';\n }\n }",
"public function check_username()\n\t\t{\n\t\t\t$username = $this->input->post('username');\n\t\t\t$where = array('username' => $username);\n\t\t\tif($this->Admin_model->check_exits($where)){\n\t\t\t\t$this->form_validation->set_message(__FUNCTION__, 'Tài khoản đã tồn tại');\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t}",
"function chk_username($username)\n\t{\n\t\t$str = \"SELECT u_username from tbl_user where u_username = ?\";\n\t\t\n\t\t//Executes the query\n\t\t$res = $this -> db -> query($str, $username);\n\t\t\n\t\t//Checks whether the result is available in the table\n\t\tif($res -> num_rows() > 0)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}",
"public function iN_CheckUserName($username) {\n\t\t$username = mysqli_real_escape_string($this->db, $username);\n\t\t$query = mysqli_query($this->db, \"SELECT * FROM i_users WHERE i_username = '$username' AND uStatus IN('1','2','3')\") or die(mysqli_error($this->db));\n\t\tif (mysqli_num_rows($query) == 1) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"private static function usernameExists($username) {\n return \\Drupal::entityQuery('user')->condition('name', $username)->execute();\n }",
"private function check_for_username($username)\r\n\t{\r\n\t\tglobal $dbCon;\r\n\r\n\t\t$sql = \"SELECT COUNT(id) AS students FROM student WHERE username = ?;\";\r\n\t\t$stmt = $dbCon->prepare($sql); //Prepare Statement\r\n\t\tif ($stmt === false)\r\n\t\t{\r\n\t\t\ttrigger_error('SQL Error: ' . $dbCon->error, E_USER_ERROR);\r\n\t\t}\r\n\t\t$stmt->bind_param('s', $username);\r\n\t\t$stmt->execute(); //Execute\r\n\t\t$stmt->bind_result($members); //Get ResultSet\r\n\t\t$stmt->fetch();\r\n\t\t$stmt->close();\r\n\r\n\t\tif ($members > 0)\r\n\t\t{\r\n\t\t\treturn \"Username is already in system. Try something else!\";\r\n\t\t}\r\n\t\treturn TRUE;\r\n\t}",
"public function isUsernameAvailable($username){\n \n $con=Connection::createConnection();\n $result = mysql_query(\"SELECT * FROM user WHERE nickname = '$username'\");\n $flagToReturn=false;\n \n if(mysql_num_rows($result) == 1){\n //already exist\n }else{\n $flagToReturn=true;\n }\n NetDebug::trace($flagToReturn);\n Connection::closeConnection($con);\n return $flagToReturn;\n \n }",
"public function checkUserNameExist()\n {\n $collection = new AjaxModel();\n\n if ($collection->CheckUserName($_POST['username'])) {\n echo \"true\";\n } else {\n echo \"false\";\n }\n }",
"protected function validateUsername($value) {\n if (preg_match(\"/^[a-z0-9\\-\\_\\@\\.\\*\\^\\~]+$/i\", $value))\n return true;\n $this->setError(t(\"Illegal username\"));\n return false;\n }",
"public function checkUsrName($username){\n\t\t$sql=\"select username from addstudents where username=:username;\";\n\t\t$query=$this->db->pdo->prepare($sql);\n\t\t$query->bindValue(':username',$username);\n\t\t$query->execute();\n\t\tif ($query->rowCount()>0) {\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}",
"function usernameExists($f): bool\n {\n $exists = false;\n if(!empty($this->load(array('username=?',$f->get('POST.login_username'))))){\n $exists = true;\n }\n return $exists;\n }",
"function username_exists($username)\n {\n global $connection;\n $query = \"select username from users where username = '{$username}'\";\n $result = mysqli_query($connection, $query);\n confirmQuery($result);\n if(mysqli_num_rows($result) > 0)\n {\n return true;\n }\n else\n {\n return false;\n }\n }",
"public function usernameAlreadyTaken() {\n\t\t$this->messages[] = \"Användarnamnet är redan upptaget\";\n\t}",
"function checkUsername(){\n\t\t$username\t= JRequest::getVar('username');\n\t\t$action = 'error';\n\t\t$row\t= true;\n\t\t$msg \t= JText::sprintf('CE_CF_USERNAME_IS_NOT_VALID',$username);\n\t\t$class\t= 'invalid';\n\t\t\n\t\t$pattern= '/^[a-z\\d_.]{3,20}$/i';\n\t\tif(preg_match($pattern, $username)){\n\t\t\t$db =& JFactory::getDBO();\n\t\t\t$query = \"SELECT id FROM #__users \"\n\t\t\t. \" WHERE username=\".$db->Quote($username)\n\t\t\t. \" LIMIT 1\";\n\t\t\t$db->setQuery($query);\n\t\t\t$row = $db->loadResult();\n\t\t}\n\t\t// There is no registered user by this username \n\t\tif ( !$row ) {\n\t\t\tif(JRequest::getVar('registration')){\n\t\t\t\t$action = 'success';\n\t\t\t\t$class\t= 'success';\n\t\t\t\t$msg = JText::sprintf('CE_CF_USERNAME_IS_AVAILABLE',$username);\n\t\t\t}else{\n\t\t\t\t// user claims to be registered but is not\n\t\t\t\t$action = 'error';\n\t\t\t\t$class\t= 'invalid';\n\t\t\t\t$msg = JText::sprintf('CE_CF_USERNAME_IS_NOT_VALID',$username);\n\t\t\t}\n\t\t}else{\n\t\t\tif(JRequest::getVar('registration')){\n\t\t\t\t$action = 'error';\n\t\t\t\t$class\t= 'invalid';\n\t\t\t\t$msg = JText::sprintf('CE_CF_USERNAME_IS_NOT_AVAILABLE',$username);\n\t\t\t}else{\n\t\t\t\t$action = 'success';\n\t\t\t\t$class\t= 'success';\n\t\t\t\t$msg = JText::sprintf('CE_CF_USERNAME_IS_VALID',$username);\n\t\t\t}\n\t\t}\n\t\t$json\t=array('action'=> $action, 'msg' => $msg, 'class' => $class );\n\t\t$this->jsonReturn($json);\n\t}",
"public static function isValidUsername($username) {\r\n if (!$username or !is_string($username)) {\r\n return false;\r\n }\r\n \r\n if (!preg_match('/^[a-zA-Z0-9_-]{3,64}$/', $username)) {\r\n return false;\r\n }\r\n \r\n return true;\r\n }",
"function getUniqueUsername($username)\n\t\t{\n\t\t\t//getting all email id from database\n\t\t\t$allUser = $this->manageContent->getValue('user_credentials','username');\n\t\t\t//initializing a parameter\n\t\t\t$userCounter = 0;\n\t\t\tforeach($allUser as $allUsers)\n\t\t\t{\n\t\t\t\tif($allUsers['username'] == $username)\n\t\t\t\t{\n\t\t\t\t\t$userCounter = 1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\techo $userCounter;\n\t\t}",
"function validate_username($username)\n {\n }",
"public function username_check($str){\n\t\tif($this->user_model->exist_row_check('username', $str) > 0){\n $this->form_validation->set_error_delimiters('', '');\n\t\t\t$this->form_validation->set_message('username_check', 'Username telah digunakan');\n\t\t\treturn FALSE;\n\t\t}\n\t\telse{\n\t\t\treturn TRUE;\n\t\t}\n\t}",
"public static function validateUsername($username){\r\n\t\t$zapi;\r\n\t\ttry{\r\n\t\t\t$zapi = new zApi();\r\n\t\t} catch(Exception $e){\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t//Disallow apostrophes\r\n\t\tif (strpos($username, \"'\") !== false) {\r\n \t\t return false;\r\n\t\t}\r\n\t\t//Get Account ID with this email\r\n\t\t$accResult = $zapi->zQuery(\"SELECT Id FROM Account WHERE Name='\".$username.\"'\");\r\n\t\tforeach($accResult->result->records as $acc){\r\n\t\t\t$_SESSION['accountId'] = $acc->Id;\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"public function username_exist($username) {\n\n $isExist = $this->User_m->username_exist_m($username);\n\n if($isExist) {\n $res['status'] = false;\n $res['message'] = 'Username already exist..! Pls Regenerate Username';\n http_response_code(404);\n echo json_encode($res);\n exit;\n }\n\n }",
"function checkUsername($id){\n\t\n\tglobal $link;\n\t$sql=\"SELECT username FROM user WHERE username='$id'\";\n\t\n\t$result=mysqli_query($link,$sql) or die(mysqli_error($link));\n\t\n\t$num=mysqli_num_rows($result);\n\t\n\tif($num>0){\n\t\treturn false;\t//this means that the user already exists and the user have to choose another one\n\t}else{\n\t\treturn true;\n\t}\n}",
"function valid_username($username)\n{\n\t$filter = preg_replace(\"/[^a-z\\d\\-=\\?!@:\\.]/i\", \"\", $username);\n\t\n\tif($filter == $username){\n\t\treturn $username; //preg_match('#^[a-z]{1,2}[a-z0-9-_.-]+$#i', $username);\n\t}\n}",
"public static function validUsername($username) {\n if (!preg_match(\"/^[a-zA-Z0-9_]+$/\", $username)) {\n return false;\n }\n return true;\n }",
"private function validateUsername($username)\n {\n if (strlen($username) > 25 || strlen($username) < 5) {\n array_push($this->errorArray, \"Your username must be between 25 & 5 characters\");\n return;\n }\n\n // check if user exists\n }",
"public function testRegistrationNonUniqUsername()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/add_user')\n ->type('username', 'testuser1')\n ->type('first_name', 'aaaa')\n ->type('last_name', 'aaaa')\n ->type('password', 'abcd1234')\n ->type('password_confirmation', 'abcd1234')\n ->click('button[type=\"submit\"]')\n\n // verify we've logged in and we've are on the list\n ->waitForText('The username has already been taken.')\n ->assertSee('The username has already been taken.');\n });\n }"
] | [
"0.8120353",
"0.8064503",
"0.7894779",
"0.7833543",
"0.7734784",
"0.7693807",
"0.75882375",
"0.7586127",
"0.7554866",
"0.7505804",
"0.7428888",
"0.73944503",
"0.73601353",
"0.7324624",
"0.7267923",
"0.72563946",
"0.72329223",
"0.72272897",
"0.7222256",
"0.7212337",
"0.7197369",
"0.71892977",
"0.71878886",
"0.7181817",
"0.71656704",
"0.7165221",
"0.71455383",
"0.7139396",
"0.71316636",
"0.7121375",
"0.7121375",
"0.70799094",
"0.7063168",
"0.70602894",
"0.70499307",
"0.70434546",
"0.70262766",
"0.7022303",
"0.70194674",
"0.7009934",
"0.7002457",
"0.70010525",
"0.69837964",
"0.69837964",
"0.69833004",
"0.69800895",
"0.6976838",
"0.6955409",
"0.69461006",
"0.69298124",
"0.6922066",
"0.6899247",
"0.6898776",
"0.6898481",
"0.68965065",
"0.6875566",
"0.68722117",
"0.6871749",
"0.6861812",
"0.6858325",
"0.68558353",
"0.6855333",
"0.68416315",
"0.68409276",
"0.68206704",
"0.6811789",
"0.68102074",
"0.6806564",
"0.68002665",
"0.6799471",
"0.6791005",
"0.6788732",
"0.67795897",
"0.67666715",
"0.676636",
"0.6760716",
"0.6757039",
"0.67534274",
"0.67523706",
"0.6748118",
"0.67437005",
"0.6730603",
"0.67292696",
"0.6721285",
"0.6716122",
"0.6716026",
"0.6712789",
"0.66993165",
"0.6698476",
"0.66830486",
"0.6679612",
"0.6677676",
"0.6677354",
"0.66709864",
"0.6659658",
"0.66535205",
"0.66490465",
"0.66336495",
"0.6632544",
"0.6631113"
] | 0.7845883 | 3 |
Search for similar usernames using LIKE. | private function searchUsingLike(string $username)
{
$exactMatches = static::where($this->getUsernameColumnName(), $username)->get();
if ($exactMatches) {
return static::where($this->getUsernameColumnName(), 'LIKE', $username.'%')->get();
}
return $exactMatches;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function findSimilarUsernames(string $username)\n {\n $preferRegexp = $this->preferRegexp ?? $this->getModelGeneratorConfig()->getConfig('prefer_regexp', false);\n\n if (!$preferRegexp) {\n return $this->searchUsingLike($username);\n }\n\n try {\n return $this->searchUsingRegexp($username);\n } catch (QueryException $exception) {\n return $this->searchUsingLike($username);\n }\n }",
"function like($str, $searchTerm)\n {\n $searchTerm = strtolower($searchTerm);\n $str = strtolower($_SESSION['username']);\n $pos = strpos($str, $searchTerm);\n if ($pos === false)\n return false;\n else\n return true;\n }",
"function search_for_users($needle)\n {\n $needle = trim($needle);\n if ($needle != '')\n {\n $user = $this->ion_auth->get_user();\n\n $query_string = \"SELECT user_meta.user_id, user_meta.first_name, user_meta.last_name, user_meta.grad_year, school_data.school\n FROM user_meta LEFT JOIN school_data ON user_meta.school_id = school_data.id\n WHERE MATCH(user_meta.first_name, user_meta.last_name) AGAINST (? IN BOOLEAN MODE)\n AND user_meta.user_id <> ?\";\n\n // Generate a string to exclude people the user is already following.\n $following_ids = $this->get_following_ids();\n if (count($following_ids) > 0)\n {\n $query_string .= \" AND user_meta.user_id <> '\" . implode(\"' AND user_meta.user_id <> '\", $following_ids) . \"'\";\n }\n $query_string .= ' LIMIT 15';\n\n $query = $this->db->query($query_string, array(str_replace(' ', '* ', $needle) . '*', $user->id));\n\n // Echo the results\n foreach ($query->result() as $row)\n {\n $this->echo_user_entry($row, 'add following', $profile_links_enabled = false);\n }\n }\n }",
"public function searchUserByName($name){\r\n $result = $this->DB->fetchAll('select * from user where name like ?',array(\"%{$name}%\"));\r\n return $this->formatResult($result);\r\n }",
"static function searchUserByName() : string\n {\n return \"SELECT *\n FROM users\n WHERE LOCATE( :Name , nickname) > 0;\";\n }",
"public function fuzzySearchName($name) {\n $con = mysqli_connect('localhost', 'root', 'root', 'HexDatabase');\n //TODO: Add firstname and surname support\n $query = 'SELECT * FROM User WHERE firstName LIKE \\'%'.$name.'%\\';';\n $results = mysqli_query($con, $query);\n if ($results) {\n return $this->getResultAsJson($results);\n } else {\n return json_encode(null);\n }\n }",
"protected function _suggestUsername($name){\n $name = trim(strtolower($name));\n // pr($name); die('qq');\n $usernameCheck1 = $this->Players->find()->where(['username' => $name])->first();\n // pr($usernameCheck1); die('u name');\n if(!$usernameCheck1){\n $username = $name;\n }else{\n $usernameCheck2 = $this->Players->find()->where(['username LIKE' => $name.'%'])->all()->toArray();\n //pr($usernameCheck2); die('u 2 name');\n if(!count($usernameCheck2)){\n $username = $name;\n }else{\n $username = $name.count($usernameCheck2);\n }\n }\n return $username;\n\n }",
"public function searchUserLike($username) {\n return $this->createQueryBuilder('c')\n ->where('c.username LIKE :username')\n ->setParameter('username', '%'.$username.'%')\n ->getQuery()\n ->getResult();\n }",
"function mentionMeXMLHTTPnameSearch()\n{\n\tglobal $mybb, $db, $cache;\n\n\tif (!$mybb->input['search']) {\n\t\texit;\n\t}\n\n\t$originalName = trim($mybb->input['search']);\n\t$name = $db->escape_string($originalName);\n\t$name = strtr($name,\n\t\tarray(\n\t\t\t'%' => '=%',\n\t\t\t'=' => '==',\n\t\t\t'_' => '=_')\n\t\t);\n\n\t$fieldList = 'username';\n\tif ($mybb->settings['mention_show_avatars']) {\n\t\t$fieldList .= ', avatar';\n\t}\n\n\t$fullText = '';\n\tif ($mybb->settings['mention_full_text_search']) {\n\t\t$fullText = '%';\n\t}\n\n\t$query = $db->simple_select('users', $fieldList, \"username LIKE '{$fullText}{$name}%' ESCAPE '='\");\n\n\tif ($db->num_rows($query) == 0) {\n\t\texit;\n\t}\n\n\t$names = array();\n\twhile ($user = $db->fetch_array($query)) {\n\t\t$username = mb_strtolower($user['username']);\n\t\tif (($fullText === '' &&\n\t\t\tsubstr($username, 0, strlen($originalName)) === $originalName) ||\n\t\t\t($fullText &&\n\t\t\tstrpos($username, $originalName) !== -1)) {\n\t\t\t$names[$username] = $user;\n\t\t}\n\t}\n\n\tif (empty($names)) {\n\t\texit;\n\t}\n\t$json = json_encode($names);\n\n\t// send our headers.\n\theader('Content-type: application/json');\n\techo($json);\n\texit;\n}",
"function like_match($searchParam, $subject) {\n $preg = preg_grep(\"/(.*)\" . strtolower($searchParam) . \"(.*)/\", [strtolower($subject)]);\n if(!empty($preg)){\n return true;\n }\n return false;\n}",
"public function getUsersLike($busqueda){\n $query = \"SELECT * FROM usuario WHERE username LIKE '%$busqueda%' \";\n return $this->consulta($query);\n }",
"public static function search($name) {\n return DB::table('users AS u')\n ->where('u.fullname', 'LIKE', '%'.$name.'%')\n ->orWhere('u.username', 'LIKE', '%'.$name.'%')\n ->selectRaw('u.id, u.fullname, u.profile_image')\n ->get();\n }",
"function find_users_like($session_id, $user_search)\n{\n global $db;\n\n $search = '%';\n $search .= $user_search;\n $search .= '%';\n\n $query = \"SELECT DISTINCT User.user_id, User.user_name FROM User \n WHERE User.user_id NOT IN (SELECT user_id FROM User_Session WHERE session_id = ?) \n AND User.user_name LIKE ?\";\n\n $stmt = $db->prepare($query);\n $stmt->bind_param(\"is\", $session_id, $search);\n $stmt->execute();\n\n $user_set = $stmt->get_result();\n\n $stmt->close();\n\n return $user_set;\n}",
"private function search_for_username($string)\r\n\t{\r\n\t\t$search_string = '%' . $string . '%';\r\n\t\t$results = array();\r\n\t\tglobal $dbCon;\r\n\r\n\t\t$sql = \"SELECT id FROM student WHERE username LIKE ?;\";\r\n\t\t$stmt = $dbCon->prepare($sql); //Prepare Statement\r\n\t\tif ($stmt === false)\r\n\t\t{\r\n\t\t\ttrigger_error('SQL Error: ' . $dbCon->error, E_USER_ERROR);\r\n\t\t}\r\n\t\t$stmt->bind_param('s', $search_string);\r\n\t\t$stmt->execute(); //Execute\r\n\t\t$stmt->bind_result($student_id); //Get ResultSet\r\n\t\twhile ($stmt->fetch())\r\n\t\t{\r\n\t\t\t$results[] = $student_id;\r\n\t\t}\r\n\t\t$stmt->close();\r\n\r\n\t\treturn $results;\r\n\t}",
"function mentionTryName($username = '')\n{\n\t/**\n\t * create another name cache here to save queries if names\n\t * with spaces are used more than once in the same post\n\t */\n\tstatic $nameList;\n\n\tif (!is_array($nameList)) {\n\t\t$nameList = array();\n\t}\n\n\t// no user name supplied\n\tif (!$username) {\n\t\treturn false;\n\t}\n\n\t$username = mb_strtolower($username);\n\n\t// if the name is in this cache (has been searched for before)\n\tif ($nameList[$username]) {\n\t\t// . . . just return the data and save the query\n\t\treturn $nameList[$username];\n\t}\n\n\tglobal $db, $mybb;\n\n\t$searchname = $db->escape_string($username);\n\n\t$fieldList = 'uid, username, usergroup, displaygroup, additionalgroups, ignorelist';\n\tif ($mybb->settings['mention_show_avatars']) {\n\t\t$fieldList .= ', avatar';\n\t}\n\n\t// query the db\n\t$query = $db->simple_select('users', $fieldList, \"LOWER(username)='{$searchname}'\", array('limit' => 1));\n\n\t// result?\n\tif ($db->num_rows($query) !== 1) {\n\t\t// no matches\n\t\treturn false;\n\t}\n\n\t// cache the name\n\t$nameList[$username] = $db->fetch_array($query);\n\n\t// and return it\n\treturn $nameList[$username];\n}",
"public function getUsersMatching($keyword) {\n $sql = 'SELECT id, firstname, mail, role, isAdmin FROM user WHERE firstname LIKE ? OR mail LIKE ? OR role LIKE ?';\n $sth = $this->db->prepare($sql);\n $sth-> execute(array(\"%$keyword%\", \"%$keyword%\", \"%$keyword%\"));\n if ($row = $sth->fetchAll()) {\n return $row;\n }\n\n }",
"function FindUser($User) {\n $User = str_replace('ZZ ', '', $User);\n\n //separa o primeiro nome do sobrenome\n $name_complete = explode(' ', $User);\n $user_name = array_shift($name_complete);\n $user_lastname = implode(' ', $name_complete);\n\n $Read = new WsUsers();\n\n $Read->setUser_name($user_name);\n $Read->setUser_lastname($user_lastname);\n $Result = $Read->Execute()->Query(\"user_name like '%{$user_name}%' AND user_lastname like '%{$user_lastname}%'\");\n\n if (!empty($Result)):\n return $Result[0]->user_id;\n endif;\n}",
"public function users() {\n $matches = array();\n if ($name = $this->input->get('q')) {\n $users = ORM::factory('user')->where('site_id', $this->site->id)->like('searchname', text::searchable($name))->where('status', 1)->find_all();\n foreach ($users as $user) {\n if ($user->id != $this->user->id) { // Can't send a message to yourself.\n $matches[] = (object) array('id' => $user->id, 'name' => $user->name());\n }\n }\n }\n print json_encode($matches);\n die();\n }",
"public function searchUsers($str) {\n return user_find($str);\n }",
"private function searchMembers() {\n $searchStr = $this->postVars['memberSearch'];\n $searchStrArr = array();\n if(preg_match('/\\s/',$searchStr)) {\n $searchStrArr = explode(\" \", $searchStr);\n }\n \n if(empty($searchStrArr)) {\n $query = \"SELECT u.id\n FROM {$this->db->prefix}users AS u\n WHERE u.user_email = '$searchStr'\n UNION\n SELECT u.id\n FROM {$this->db->prefix}users AS u\n JOIN {$this->db->prefix}nhc n ON u.id = n.user_id AND n.nhc_pin = '$searchStr'\n JOIN {$this->db->prefix}usermeta um1 ON um1.user_id = u.id AND um1.meta_key = 'first_name'\n JOIN {$this->db->prefix}usermeta um2 ON um2.user_id = u.id AND um2.meta_key = 'last_name'\n UNION\n SELECT u.id\n FROM {$this->db->prefix}users AS u\n JOIN {$this->db->prefix}nhc n ON u.id = n.user_id\n JOIN {$this->db->prefix}usermeta um1 ON um1.user_id = u.id AND um1.meta_key = 'first_name' AND um1.meta_value like '%$searchStr%'\n JOIN {$this->db->prefix}usermeta um2 ON um2.user_id = u.id AND um2.meta_key = 'last_name'\n UNION\n SELECT u.id\n FROM {$this->db->prefix}users AS u\n JOIN {$this->db->prefix}nhc n ON u.id = n.user_id\n JOIN {$this->db->prefix}usermeta um1 ON um1.user_id = u.id\n JOIN {$this->db->prefix}usermeta um2 ON um2.user_id = u.id AND um2.meta_key = 'last_name' AND um2.meta_value like '%$searchStr%'\";\n //JOIN {$this->db->prefix}usermeta um4 ON um4.user_id = u.id AND um4.meta_key = 'expiration_date' AND um4.meta_value = '$expireDate'\";\n }\n else { // looking specifically for a full name\n $query = \"SELECT u.id\n FROM {$this->db->prefix}users AS u\n JOIN {$this->db->prefix}nhc n ON u.id = n.user_id\n JOIN {$this->db->prefix}usermeta um1 ON um1.user_id = u.id AND um1.meta_key = 'first_name' AND um1.meta_value like '%{$searchStrArr[0]}%'\n JOIN {$this->db->prefix}usermeta um2 ON um2.user_id = u.id AND um2.meta_key = 'last_name' AND um2.meta_value like '%{$searchStrArr[1]}%'\";\n \n }\n \n $membersArr = $this->db->get_results($query, ARRAY_A);\n \n // filter through to weed out any duplicates\n $showArr = array();\n foreach($membersArr as $member) {\n if(!in_array($member['id'], $showArr)) {\n $showArr[] = $member['id'];\n }\n }\n $idStr = implode(\",\", $showArr);\n \n $query = \"SELECT DISTINCT u.id, n.nhc_pin, um1.meta_value AS first_name, um2.meta_value AS last_name, u.user_email, um3.meta_value AS level\n FROM {$this->db->prefix}users AS u\n JOIN {$this->db->prefix}nhc n ON u.id = n.user_id\n JOIN {$this->db->prefix}usermeta um1 ON um1.user_id = u.id AND um1.meta_key = 'first_name'\n JOIN {$this->db->prefix}usermeta um2 ON um2.user_id = u.id AND um2.meta_key = 'last_name'\n JOIN {$this->db->prefix}usermeta um3 ON um3.user_id = u.id AND um3.meta_key = 'member_level'\n WHERE u.id IN ($idStr)\n ORDER BY n.nhc_pin\";\n \n $this->showResults($query, 'search', true);\n }",
"function _generateUserNameSearchSQL($search, $searchMatch, $prefix, &$params) {\n\t\t$first_last = $this->concat($prefix.'first_name', '\\' \\'', $prefix.'last_name');\n\t\t$first_middle_last = $this->concat($prefix.'first_name', '\\' \\'', $prefix.'middle_name', '\\' \\'', $prefix.'last_name');\n\t\t$last_comma_first = $this->concat($prefix.'last_name', '\\', \\'', $prefix.'first_name');\n\t\t$last_comma_first_middle = $this->concat($prefix.'last_name', '\\', \\'', $prefix.'first_name', '\\' \\'', $prefix.'middle_name');\n\t\tif ($searchMatch === 'is') {\n\t\t\t$searchSql = \" AND (LOWER({$prefix}last_name) = LOWER(?) OR LOWER($first_last) = LOWER(?) OR LOWER($first_middle_last) = LOWER(?) OR LOWER($last_comma_first) = LOWER(?) OR LOWER($last_comma_first_middle) = LOWER(?))\";\n\t\t} elseif ($searchMatch === 'contains') {\n\t\t\t$searchSql = \" AND (LOWER({$prefix}last_name) LIKE LOWER(?) OR LOWER($first_last) LIKE LOWER(?) OR LOWER($first_middle_last) LIKE LOWER(?) OR LOWER($last_comma_first) LIKE LOWER(?) OR LOWER($last_comma_first_middle) LIKE LOWER(?))\";\n\t\t\t$search = '%' . $search . '%';\n\t\t} else { // $searchMatch === 'startsWith'\n\t\t\t$searchSql = \" AND (LOWER({$prefix}last_name) LIKE LOWER(?) OR LOWER($first_last) LIKE LOWER(?) OR LOWER($first_middle_last) LIKE LOWER(?) OR LOWER($last_comma_first) LIKE LOWER(?) OR LOWER($last_comma_first_middle) LIKE LOWER(?))\";\n\t\t\t$search = $search . '%';\n\t\t}\n\t\t$params[] = $params[] = $params[] = $params[] = $params[] = $search;\n\t\treturn $searchSql;\n\t}",
"function _generateUserNameSearchSQL($search, $searchMatch, $prefix, &$params) {\n\t\t$first_last = $this->concat($prefix.'first_name', '\\' \\'', $prefix.'last_name');\n\t\t$first_middle_last = $this->concat($prefix.'first_name', '\\' \\'', $prefix.'middle_name', '\\' \\'', $prefix.'last_name');\n\t\t$last_comma_first = $this->concat($prefix.'last_name', '\\', \\'', $prefix.'first_name');\n\t\t$last_comma_first_middle = $this->concat($prefix.'last_name', '\\', \\'', $prefix.'first_name', '\\' \\'', $prefix.'middle_name');\n\t\tif ($searchMatch === 'is') {\n\t\t\t$searchSql = \" AND (LOWER({$prefix}last_name) = LOWER(?) OR LOWER($first_last) = LOWER(?) OR LOWER($first_middle_last) = LOWER(?) OR LOWER($last_comma_first) = LOWER(?) OR LOWER($last_comma_first_middle) = LOWER(?))\";\n\t\t} elseif ($searchMatch === 'contains') {\n\t\t\t$searchSql = \" AND (LOWER({$prefix}last_name) LIKE LOWER(?) OR LOWER($first_last) LIKE LOWER(?) OR LOWER($first_middle_last) LIKE LOWER(?) OR LOWER($last_comma_first) LIKE LOWER(?) OR LOWER($last_comma_first_middle) LIKE LOWER(?))\";\n\t\t\t$search = '%' . $search . '%';\n\t\t} else { // $searchMatch === 'startsWith'\n\t\t\t$searchSql = \" AND (LOWER({$prefix}last_name) LIKE LOWER(?) OR LOWER($first_last) LIKE LOWER(?) OR LOWER($first_middle_last) LIKE LOWER(?) OR LOWER($last_comma_first) LIKE LOWER(?) OR LOWER($last_comma_first_middle) LIKE LOWER(?))\";\n\t\t\t$search = $search . '%';\n\t\t}\n\t\t$params[] = $params[] = $params[] = $params[] = $params[] = $search;\n\t\treturn $searchSql;\n\t}",
"public function username_is_found($str, $user_table = \"admin_user\") {\n\n $id = $this->ci->input->post(\"id\");\n\n $find_conf = array(\"username\" => $str);\n\n // exclude his own ID to search another profile's email. (edit only)\n if ($id) {\n $find_conf[\"id <>\"] = $id;\n }\n\n $result = $this->ci->generic_model->retrieve_one(\n $user_table,\n $find_conf\n );\n\n if ($result) { // there exists an username.\n return TRUE;\n } else { // username is not found.\n $this->ci->form_validation->set_message(\"username_is_found\", \"Username is not found.\");\n return FALSE;\n }\n }",
"function getUsersLike($query, $user){\n $key = \"%\".$query.\"%\";\n $query = $this->getEntityManager()\n ->createQuery('SELECT DISTINCT u\n FROM EntityBundle:User u, EntityBundle:Person p\n WHERE u != :user AND u.person = p AND (p.firstname LIKE :query OR p.lastname LIKE :query)')\n ->setParameter('query', $key)\n ->setParameter('user', $user);\n\n try {\n return $query->getResult();\n } catch (\\Doctrine\\ORM\\NoResultException $e) {\n return null;\n }\n }",
"public static function searchManager_username($keyword)\n\t\t{\n\t\t\t$qry = 'SELECT * FROM manager WHERE last_name LIKE \"%' . $keyword . '%\"';\n\t\t\t$result = mysql_query($qry, $GLOBALS['connection']);\n\t\t\treturn $result;\n\t\t}",
"private function searchUsingRegexp(string $username)\n {\n return static::where($this->getUsernameColumnName(), 'REGEXP', $username.'('.$this->getSeparator().')?([0-9]*)?$')->get();\n }",
"public abstract function find_users($search);",
"public function searchUsers()\n {\n # Set tables to search to a variable.\n $tables = $this->getTables();\n # Set fields to search to a variable.\n $fields = $this->getFields();\n # Set search terms to a variable.\n $search_terms = $this->getSearchTerms();\n # Perform search.\n $this->performSearch($search_terms, $tables, $fields);\n }",
"function findusers() {\n $this->auth(SUPPORT_ADM_LEVEL);\n $search_word = $this->input->post('search');\n if($search_word == '-1'){ //initial listing\n $data['records'] = $this->m_user->getAll(40);\n } else { //regular search\n $data['records'] = $this->m_user->getByWildcard($search_word);\n }\n $data['search_word'] = $search_word;\n $this->load->view('/admin/support/v_users_search_result', $data);\n }",
"public function search_user(Request $request){\n $search = $request->input('term');\n $users = User::where('name', 'like' , \"%$search%\")\n ->orwhere('username', 'like', \"%$search%\")\n ->get();\n return response()->json($users, 200);\n }",
"public function search($term)\n {\n $terms = explode(\" \", $term);\n\n $searchQuery = array();\n foreach ($terms as $term) {\n $term = $this->_localConfig->database()->quote(\"[[:<:]]\" . $term . \"[[:>:]]\");\n $searchQuery[] = \"(users.name regexp $term) * 5 + (users.username regexp $term)\";\n }\n\n $searchQuery = implode(\" + \", $searchQuery);\n\n $query = $this->selectAll();\n $query->columns(new Zend_Db_Expr(\"($searchQuery) as hits\"));\n $query->having('hits > 0');\n\n // We need to reset the ordering that was put on in selectAll()\n $query->reset( Zend_Db_Select::ORDER );\n $query->order(\"hits DESC\");\n\n $rows = $this->_localConfig->database()->fetchAll($query);\n\n $models = array();\n foreach ($rows as $row) {\n $model = $this->_getContainer()->User()->setData($row);\n $models[] = $model;\n }\n\n return $models;\n }",
"function getUsersLastNameLike($in){\r\n $data=new \\Cars\\Data\\Common($this->app);\r\n return $data->getUsersByLastNameInit($in);\r\n\r\n }",
"public function searchUser(){\n $this->validate(request(),[\n 'name' => 'required'\n ]);\n $users =User::where('name',request('name'))->orWhere('name', 'like', '%' . request('name') . '%')->get();\n return response()->json($users);\n }",
"function vUsername( $username )\r\n\t\t{\r\n\t\t\t\treturn preg_match( '/^[a-zA-Z\\d_@.]{2,30}$/i', $username );\r\n\t\t\t\t\r\n\t\t}",
"function staffNameSearch($sessionID, $name){\r\n\t\t$name = str_replace(' ', '%', $name);\r\n\t\t$results = array();\r\n\t\tfor($i=0; $i<sizeof($name); $i++){\r\n\t\t\t$query = \"SELECT ID, CONCAT(FirstName, ' ', MiddleIn, ' ', LastName) AS FullName FROM users WHERE\r\n\t\t\t\t\tCONCAT(FirstName, ' ', MiddleIn, ' ', LastName) LIKE '%$name%'\";\r\n\t\t\t$result = mysql_query($query);\r\n\t\t\t//Cycles through the rows of $result and puts them into $results in the proper format.\r\n\t\t\tfor($j=0; $thisResult = mysql_fetch_assoc($result); $j++){\r\n\t\t\t\tif(!array_key_exists($thisResult['ID'], $results)){\r\n\t\t\t\t\t$results[$thisResult['ID']] = $thisResult['FullName'];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $results;\r\n\t}",
"public function validateUsernameEqual($value, array $context)\n {\n Stopwatch::start('validateUsernameEqual');\n $users = $this->userlist();\n $lc = mb_strtolower($value);\n foreach ($users as $name) {\n if ($name === $value) {\n continue;\n }\n $name = mb_strtolower($name);\n $distance = levenshtein($lc, $name);\n if ($distance < 2) {\n return __('error.name.equalExists', $name);\n }\n }\n Stopwatch::stop('validateUsernameEqual');\n\n return true;\n }",
"function search($text){\ninclude '../imp/call.php';\n \n // let's filter the data that comes in\n $text = htmlspecialchars($text);\n \n\n // prepare the mysql query to select the users \n /* $get_name = $conn->prepare(\"SELECT * FROM u WHERE name LIKE concat('%', :name, '%')\");*/\n $stmtSelect = $conn->prepare(\"SELECT * FROM tbl_user WHERE user_age LIKE concat(:user_age ,'%')\");\n // execute the query\n $stmtSelect -> execute(array('user_age' => $text));\n // show the users on the page\n echo'<div class=\"scrollable\">\n <table>\n <thead>\n <tr>\n <th>S.N</th>\n <th>Name</th>\n <th>Age</th>\n <th>Action</th>\n </tr>\n </thead>\n <tbody>\n ';\n while($names = $stmtSelect->fetch(PDO::FETCH_ASSOC)){\n // show each user as a link\n \n echo ' <tr>\n <td>'.$names['user_name'].'</td>\n <td>'.$names['user_email'].'</td>\n <td>'.$names['user_age'].'</td>\n <td>\n <div align=\"center\">\n <a href=\"\" data-toggle=\"modal\" data-target=\"#mailModal'.$names['id'].'\"><i class=\"fa fa-envelope\" aria-hidden=\"true\"></i>\n </a>\n </div>\n </td>\n </tr>';\n \n }\n echo '</tbody>';\n}",
"public function anyString() {\n\t\treturn new LikeMatch( '%' );\n\t}",
"public function search($query)\n {\n return self::find()\n ->where(['like', 'name', $query])\n ->orWhere(['like', 'username', $query])\n ->orWhere(['like', 'email', $query]);\n }",
"public function searchUsers(Request $request)\n {\n $searchText = $request->get('searchText');\n\n $searchTerms = explode(' ', $searchText);\n\n $query = DB::table('users');\n\n foreach($searchTerms as $term)\n {\n $query->where('name', 'LIKE', '%'. $term .'%');\n }\n\n $results = $query->take(10)->get();\n\n return response()->json($results, 200);\n }",
"public function findByFirstName($pattern)\r\n {\r\n $mysqli = $this->conn;\r\n\r\n $query = $mysqli->prepare(\"SELECT * FROM users WHERE fname LIKE ?\");\r\n\r\n // bind parameters for markers\r\n $like_pattern = \"%\" . $pattern . \"%\";\r\n\r\n $query->bind_param('s', $like_pattern);\r\n\r\n // execute query\r\n $query->execute();\r\n\r\n // get results\r\n $result = $query->get_result();\r\n\r\n if (! $result) {\r\n echo \"Error in the SQL statement\";\r\n return NULL;\r\n exit();\r\n }\r\n\r\n if ($result->num_rows == 0) {\r\n return NULL;\r\n } else {\r\n $index = 0;\r\n $users_array = array();\r\n\r\n while ($row = $result->fetch_assoc()) {\r\n $users_array[$index] = array(\r\n $row[\"ID\"],\r\n $row[\"username\"],\r\n ($row[\"fname\"] . \" \" . $row['lname'])\r\n );\r\n $index ++;\r\n }\r\n\r\n // frees result set and closes connection\r\n $result->free();\r\n $mysqli->close();\r\n\r\n if (count($users_array) > 0)\r\n return $users_array;\r\n return NULL;\r\n }\r\n }",
"private function search_for_name($string)\r\n\t{\r\n\t\t$search_string = '%' . $string . '%';\r\n\t\t$results = array();\r\n\t\tglobal $dbCon;\r\n\r\n\t\t$sql = \"SELECT id FROM student WHERE concat(firstname, ' ', lastname) LIKE ?;\";\r\n\t\t$stmt = $dbCon->prepare($sql); //Prepare Statement\r\n\t\tif ($stmt === false)\r\n\t\t{\r\n\t\t\ttrigger_error('SQL Error: ' . $dbCon->error, E_USER_ERROR);\r\n\t\t}\r\n\t\t$stmt->bind_param('s', $search_string);\r\n\t\t$stmt->execute(); //Execute\r\n\t\t$stmt->bind_result($student_id); //Get ResultSet\r\n\t\twhile ($stmt->fetch())\r\n\t\t{\r\n\t\t\t$results[] = $student_id;\r\n\t\t}\r\n\t\t$stmt->close();\r\n\r\n\t\treturn $results;\r\n\t}",
"public static function search($login) {\n $sql = new Sql();\n return $sql->select(\"SELECT * FROM tb_usuarios WHERE deslogin LIKE :SEARCH ORDER BY deslogin\",array(\n ':SEARCH'=>\"%\".$login.\"%\"\n ));\n \n }",
"function studentNameSearch($sessionID, $name){\r\n\t\t$name = str_replace(' ', '%', $name);\r\n\t\t$results = array();\r\n\t\tfor($i=0; $i<sizeof($name); $i++){\r\n\t\t\t$query = \"SELECT ID, CONCAT(FIRST_NAME, ' ', MIDDLE_NAME, ' ', LAST_NAME) AS FullName FROM X_PNSY_STUDENT WHERE\r\n\t\t\t\t\tCONCAT(FIRST_NAME, ' ', MIDDLE_NAME, ' ', LAST_NAME) LIKE '%$name%'\";\r\n\t\t\t\t$result = mysql_query($query);\r\n\t\t\t\t//Cycles through the rows of $result and puts them into $results in the proper format.\r\n\t\t\t\tfor($j=0; $thisResult = mysql_fetch_assoc($result); $j++){\r\n\t\t\t\t\tif(!array_key_exists($thisResult['ID'], $results)){\r\n\t\t\t\t\t\t$results[$thisResult['ID']] = $thisResult['FullName'];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t}\r\n\t\treturn $results;\r\n\t}",
"function username_in_db ( $ls_username, $link ) {\n\n\t\techo 'in username_in_db:: username:'. $ls_username . '<br>';\n\n\t\t$sql = \"SELECT * FROM `users` WHERE `username` LIKE '$ls_username'\";\n\n\t\techo 'sql='.$sql.\"<br>\";\n\n\t\t$result = mysqli_query( $link, $sql );\n\n\t\tif ( $result ) {\n\n\t\t\techo 'username_in_db:: query returned result<br>';\n\n \t\tif ( mysqli_num_rows( $result ) > 0) {\n\n \t\t\techo 'username_in_db: username '.$ls_username.' found in database<br>';\n\n \t\t\treturn true;\n\n \t\t}\n \t}\n\n \techo 'username_in_db: username '.$ls_username.' NOT found in database<br>';\n\n\t\treturn false;\n\n\t}",
"public function __icontains ( $sField, $mValue )\n {\n return \"$sField LIKE $mValue\";\n }",
"public function get_titles($input) {\n $input = \"%\" . $input . \"%\";\n $stmt = $this->DB->prepare ( \"SELECT * FROM `titles` WHERE name_year LIKE :input\" );\n $stmt->bindParam ( 'input', $input );\n $stmt->execute ();\n return $stmt->fetchAll ( PDO::FETCH_ASSOC );\n\n // TODO: Complete this function so it returns all rows\n // where the parameter is found as a substring, case insensitive\n\n\n\n\n\n }",
"public function get_user_by_concat_name($name_lastname){\n $query = $this->db->query(\"\n SELECT k_id_user\n FROM \n user \n WHERE CONCAT_WS(' ', n_name_user, n_last_name_user) \n LIKE '%$name_lastname';\n \");\n return $query->row();\n }",
"public function like($value);",
"public function actionSearch($s) {\n //redirect a user if not super admin\n if (!Yii::$app->CustomComponents->check_permission('all_users')) {\n return $this->redirect(['site/index']);\n }\n $s = trim($s);\n if (preg_match(\"^[_a-z0-9-]+(\\.[_a-z0-9-]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*(\\.[a-z]{2,3})$^\", $s)) {\n $squery = DvUsers::find()->where(['email' => $s, \"status\" => 1])->all();\n } else {\n $sq = explode(\" \", $s);\n $size = sizeof($sq);\n if ($size > 1) {\n $squery = DvUsers::find()->orWhere(['first_name' => $sq[0]])->orWhere(['first_name' => $sq[1]])->orWhere(['last_name' => $sq[0]])->orWhere(['last_name' => $sq[1]])->andWhere([\"status\" => 1])->all();\n } else {\n $squery = DvUsers::find()->orWhere(['first_name' => $s])->orWhere(['last_name' => $s])->andWhere([\"status\" => 1])->all();\n }\n }\n return $this->render('index', [ 'users' => $squery, 'total_records' => '1']);\n }",
"function iu_mentionusername($string, $from, $posturl){\n\tinclude 'dbparams.php';\n\tpreg_match_all('/@[a-zA-Z0-9_]+/', $string, $matches);\n\t// print_r($matches[1]);\n\tforeach ($matches as $match) {\n\t\tif(in_array($match, $matches)){\n\t\t\tforeach ($match as $name) {\n\t\t\t\t$matchedname = str_replace(\"@\", \"\", $name);//remove '@' from username match\n\t\t\t\t$mentionQuery = @mysqli_query($dblink, \"SELECT user_id FROM users WHERE username = '$matchedname'\");\n\t\t\t\t$mentionRow = mysqli_fetch_assoc($mentionQuery);\n\t\t\t\t$mentionuserid = $mentionRow['user_id'];\n\n\t\t\t\tiu_send_notification($from, $mentionuserid, 'mentionpost', $posturl);\n\t\t\t}\n\t\t}\n\t}\n}",
"public function search(String $term)\n {\n return $this->model->where('username', 'like', '%'.$term.'%')\n ->with('mixes')->get();\n }",
"private function like($needle, $haystack) {\r\n\t\t$needle = strtolower($needle);\r\n\t\t$haystack = strtolower($haystack);\r\n\t\t$regex = '/' . str_replace('%', '.*?', $needle) . '/';\r\n\t\treturn preg_match($regex, $haystack) > 0;\r\n\t}",
"function matchStrings($userValue, $label)\n{\n// debug(\"matchStrings $label\", $userValue);\n\n if(!strcasecmp($userValue, $label)) return true;\n \n $firstWord = substringBefore($label, \" \");\n return startsWith($userValue, $firstWord);\n}",
"public function findUsernameMatch($name) {\r\n \t\t# Set up database query\r\n \t\t$statement = $this->DB->prepare(\"SELECT User_Name, User_ID FROM users WHERE User_Name = :nomen;\");\r\n \t\t$statement->bindParam('nomen', $name);\r\n \t\t$statement->execute();\r\n \t\t$row = $statement->fetch(PDO::FETCH_ASSOC); # row might be empty\r\n \t\t$row['status'] = 'success'; # this makes sure row stores something\r\n \t\treturn json_encode($row);\r\n\r\n\t }",
"public function getAuthorNames($query) \n\t{\n $q = \"SELECT * FROM in_users WHERE full_name LIKE '%\".$query.\"%'\";\n $ps = $this->execute($q);\n $result = $this->getDataRowsAsObjects($ps, 'User');\n return $result;\n }",
"public function search($str) {\n\t\t$sql = \"SELECT * FROM teams WHERE (\";\n\t\t$sql .= \"name like ? \";\n\t\t$sql .= \"OR colour like ?)\";\n\t\t$stmt = $this->dbManager->prepareQuery($sql);\n\t\t\n\t\t$this->dbManager->bindValue($stmt, 1, '%'.$str.'%', $this->dbManager->STRING_TYPE );\n\t\t$this->dbManager->bindValue($stmt, 2, '%'.$str.'%', $this->dbManager->STRING_TYPE );\n\t\t\n\t\t$this->dbManager->executeQuery($stmt);\n\t\t$rows = $this->dbManager->fetchResults ( $stmt );\n\t\t\n\t\treturn ($rows);\n\t}",
"public function check_username(){\n\t\tif(isset($_POST[\"submit\"])){\n\t\t\t$user = $_POST[\"uname\"];\n\t\t\t$query = $this->db->query(\"SELECT * \n\t\t\t\t\t\t\t\t\t\tFROM admin \n\t\t\t\t\t\t\t\t\t\tWHERE username LIKE '$user'\");\n\t\t\treturn $query->num_rows();\n\t\t}\n\t}",
"public function search($name) {\n return $this->db->query(\"SELECT * FROM `user` WHERE `firstname` ='$name' or `lastname`='$name'\")->result();\n //return $this->db->last_query();\n //return $query->result(); \n }",
"public static function getListUserHaveUsernameStartWith($username) {\n $criteria = new CDbCriteria();\n $criteria->addCondition(\"t.username like '%$username%'\");\n $models = Users::model()->findAll($criteria);\n $retVal = array();\n foreach ($models as $model) {\n if (CommonProcess::getUsernameFromFullName($model->first_name) === $username) {\n $retVal[] = $model;\n }\n }\n return $retVal;\n }",
"public function searchContacts($userId, $searchterm)\n { \n $sql = \"SELECT * FROM contacts WHERE ((`firstname` LIKE ?) OR (`lastname` LIKE ?) OR (`phone` LIKE ?) OR (`city` LIKE ?) OR (`birthday` LIKE ?) OR (`email` LIKE ?)) AND (`userid`=?)\";\n $stmt = $this->pdo->prepare($sql);\n $stmt->execute([\"%$searchterm%\", \"%$searchterm%\", \"%$searchterm%\", \"%$searchterm%\", \"%$searchterm%\", \"%$searchterm%\", $userId]);\n return $stmt->fetchAll();\n }",
"private function searchUsers($userCollection, $filter)\t{\n trace('[CMD] '.__METHOD__);\n\n\t\t$filterlist = $filter->getDataArray();\n\t\t$searchlist = array();\n\t\t$exactMatch = false;\n\t\t$specified = false;\n\t\t$result = '';\n\t\tforeach ($filterlist as $key => $value) {\n\t\t\tif ($value == '') {\n\t\t\t\t// ignore empty search fields\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tswitch ($key) {\n\t\t\t\tcase 'gsa_kundnr':\n\t\t\t\t\t// special case; find gsauid by gsa_kundnr\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'exactMatch':\n\t\t\t\t\t// switch match mode\n\t\t\t\t\t$exactMatch = $value;\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\t// copy field to searchlist\n\t\t\t\t\t$specified = true;\n\t\t\t\t\t$searchlist[$key] = $value;\n\t\t\t}\n\t\t}\n\t\tif (! $specified) {\n\t\t\t$result = $this->pi_getLL('msg_searchreq', '[msg_searchreq]');\n\t\t}\n\t\telse {\n\t\t\t$cnt = $userCollection->loadBySearchlist($searchlist, $exactMatch, self::MAX_SEARCHRESULTS);\n\t\t\tif ($cnt > self::MAX_SEARCHRESULTS) {\n\t\t\t\t// to many hits, complain\n\t\t\t\t$result = $this->pi_getLL('msg_toomany', '[msg_toomany]');\n\t\t\t}\n\t\t\telse if (! $cnt) {\n\t\t\t\t// nothing found, complain\n\t\t\t\t$result = $this->pi_getLL('msg_notfound', '[msg_notfound]');\n\t\t\t}\n\t\t}\n\t\ttrace($result);\n\t\treturn $result;\n\t}",
"public function postSearchUsers()\n {\n \n \n $q = Input::get('q');\n $f = User::where( 'name' , 'LIKE' , '%'.$q.'%' )->get();\n \n return Response::json( $f );\n \n }",
"public function searchUserDetails($keywords)\n {\n $result = $this->model->where(\"first_name\", \"LIKE\", '%'.$keywords.'%')\n ->orwhere(\"last_name\", \"LIKE\", '%'.$keywords.'%')\n ->orwhere(\"mobile\", \"LIKE\", '%'.$keywords.'%')\n ->with('user')\n ->paginate(10)\n ->toArray();\n\n return $result;\n }",
"public function search_by_username($username) {\n\n // first, get all users\n $method = \"users.list\";\n $payload = array();\n $result = $this->apicall($method, $payload);\n $users = $result['members'];\n\n $this->debug(\"userlist.json\", json_encode($users));\n\n $key = array_search($username, array_column($users, 'name'));\n\n $this->debug(\"user.json\", json_encode($users[$key]));\n\n return $users[$key];\n\n\n }",
"function getmoname($data)\r\n {\r\n \r\n $query = $this->db->query(\"SELECT username,user_id,firstname FROM `oc_user` where user_group_id='4' and firstname like '%\".$data[\"filter_name\"].\"%' order by firstname asc limit 5 \");\r\n \r\n return $query->rows; \r\n }",
"private function search_user_by($column,$data,$db,$start=0,$limit=10){\n\t\tif (empty($column) || strlen($data)<3){\n\t\t\treturn null;\n\t\t}\n\t\t$data=strtolower($data);\n\t\t$data=Db::escapee($data,true);\n\t\t$sql=Db::create_sql(array(\n\t\t\t\t\"user_id\",\n\t\t\t\t\"first_name\",\n\t\t\t\t\"last_name\"\n\t\t),\n\t\t\t\t'users',\n\t\t\t\t\"$column LIKE '%$data%' AND\n\t\t\t\tstatus=1\",\n\t\t\t\tnull,null,\n\t\t\t\t\"$start,$limit\");\n\t\t\t\treturn empty($db)?$sql:Db::fetch_array($db, $sql);\n\t}",
"function chkusername($str) {\n $this->db->where('username', strtolower($str));\n $query = $this->db->get('user');\n if ($query->num_rows() == 1) {\n $this->form_validation->set_message('chkusername', 'Username is already being used!');\n return false;\n }\n\n return true;\n }",
"public function search_user($username,$surname,$email,$phone){\n if(!empty($username)){$this->db->like('username', $username);}\n if(!empty($surname)){$this->db->where('surname', $surname);}\n\t if(!empty($email)){$this->db->where('email', $email);}\n\t if(!empty($phone)){$this->db->where('phone', $phone);}\n\t // if(!empty($acc_company_name)){$this->db->where('acc_company_name', $acc_company_name);}\n\t \n\t //two not empty with username\n \n if(!empty($username) && !empty($surname)){$this->db->where(array('username' => $username, 'surname' => $surname));}\n if(!empty($username) && !empty($email)){$this->db->where('username',$username); $this->db->where('email', $email);}\n\t if(!empty($username) && !empty($phone)){$this->db->where(array('username' => $username, 'phone' => $phone));}\n\t // if(!empty($username) && !empty($acc_company_name)){$this->db->where(array('username' => $username, 'acc_company_name' => $acc_company_name));}\n\t \n\t //two not empty with surname\n if(!empty($surname) && !empty($username) ){$this->db->where('surname', $surname);$this->db->where('username', $username);}\n\t if(!empty($surname) && !empty($email) ){$this->db->where('surname', $surname);$this->db->where('email', $email);}\n\t if(!empty($surname) && !empty($phone) ){$this->db->where('surname', $surname);$this->db->where('phone', $phone);}\n\t// if(!empty($surname) && !empty($acc_company_name) ){$this->db->where('surname', $surname);$this->db->where('acc_company_name', $acc_company_name;}\n\t \n\t //two not empty with phone\n if(!empty($phone) && !empty($username) ){$this->db->where('phone', $phone);$this->db->where('username', $username);}\n\t if(!empty($phone) && !empty($email) ){$this->db->where('phone', $phone);$this->db->where('email', $email);}\n\t if(!empty($phone) && !empty($surname) ){$this->db->where('phone', $phone);$this->db->where('surname', $surname);}\n//\t if(!empty($phone) && !empty($acc_company_name) ){$this->db->where('phone', $phone);$this->db->where('acc_company_name', $acc_company_name;}\n\t \n\t //two not empty with email\n if(!empty($surname) && !empty($email)){$this->db->where('email' , $email);$this->db->where('surname', $surname);}\n\t if(!empty($username) && !empty($email)){$this->db->where('email' , $email);$this->db->where('username', $username);}\n\t if(!empty($phone) && !empty($email)){$this->db->where('email' , $email);$this->db->where('phone', $phone);}\n\t // if(!empty($acc_company_name) && !empty($email)){$this->db->where('email' , $email);$this->db->where('acc_company_name', $acc_company_name);}\n\t \n\t \n\t //three not empty with username\n if(!empty($username) && !empty($surname) && !empty($email) ){$this->db->like('username', $username);$this->db->where(array('surname' => $surname, 'email' => $email));}\n\t \n\t if(!empty($username) && !empty($surname) && !empty($phone) ){$this->db->like('username', $username);$this->db->where(array('surname' => $surname, 'phone' => $phone));}\n\t \n\t //three not empty with email\n\t if(!empty($username) && !empty($phone) && !empty($email) ){$this->db->like('username', $username); $this->db->or_like('email', $email); $this->db->where('phone', $phone); }\n\t \n\t if(!empty($username) && !empty($surname) && !empty($email) ){$this->db->like('username', $username); $this->db->or_like('email', $email); $this->db->where('surname', $surname); }\n\t \n\t if(!empty($surname) && !empty($phone) && !empty($email) ){$this->db->where('surname', $surname); $this->db->or_like('email', $email); $this->db->where('phone', $phone); }\n\t \n\t \n\t //All Not Empty\n\t \n if(!empty($username)){$this->db->like('username', $username);}\n if(!empty($surname) && empty($username) ){$this->db->like('surname', $surname);}\n if(!empty($username) && !empty($surname) ){$this->db->or_like('surname', $surname);} \n if(empty($surname) && empty($username) && !empty($email)){$this->db->like('email', $email);}\n if(!empty($username) || !empty($surname) ){ if(!empty($email)){$this->db->or_like('email', $email);}}\n if(empty($surname) && empty($username) && empty($email) && !empty($phone) ){$this->db->like('phone', $phone);}\n if(!empty($username) || !empty($surname) || !empty($email) ){ if(!empty($phone)){$this->db->or_like('phone', $phone);}}\n $query = $this->db->get('user');\n return $query->result_array();\n }",
"private function /*bool*/ findUsername(/*string*/ $name) {\n\t\t$variations = array(\n\t\t\t$name,\n\t\t\tstrtolower($name[0]) . substr($name, 1),\n\t\t\tstr_replace(\" \", \"_\", $name),\n\t\t);\n\n\t\t$crowd = $this->getCrowd();\n\t\tforeach ($variations as $v) {\n\t\t\ttry {\n\t\t\t\t$crowd->findPrincipalByName(array(\"in0\" => $this->token, \"in1\" => $v));\n\t\t\t\treturn $v;\n\t\t\t} catch (Exception $e) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}",
"function getAllUsersMatching($terms){\n\t\treturn $this->avalanche->getAllUsersMatching($terms);\n\t}",
"public function get_matching_users(Request $request) {\n $searchstring = $request->searchstring;\n $not_ids = $request->not_ids;\n\n $matching_users = User::select('id', 'first_name', 'last_name', 'birth_date')\n ->whereNotIn('id', $not_ids)\n ->where(function($query) use ($searchstring) {\n $query->where('first_name', 'like', '%'.$searchstring.'%')\n ->orWhere('last_name', 'like', '%'.$searchstring.'%')\n ->orWhere(DB::raw(\"CONCAT(`first_name`, ' ', `last_name`)\"), 'like', '%'.$searchstring.'%')\n ->orWhere(DB::raw(\"CONCAT(`last_name`, ' ', `first_name`)\"), 'like', '%'.$searchstring.'%');\n })\n ->orderBy('last_name')\n ->orderBy('first_name')\n ->limit(5)\n ->get();\n\n return $matching_users;\n }",
"public function searchLike($searchField, $value)\n {\n return \" UPPER($searchField) LIKE UPPER('%{$value}%') \";\n }",
"public function setUsernameRegexPattern($pattern);",
"public function personal_username($full_name){\r\n $random = mt_rand(00000, 99999);\r\n $username = url_title($full_name.$random);\r\n\r\n $query = $this->db->get_where('user', ['khojeko_username' => $username]);\r\n if($query->num_rows() == 0 )\r\n return $username;\r\n else\r\n $this->personal_username($full_name);\r\n }",
"function regexcheckusername($username){\n\t$regex_pattern=\"/^\\s*([a-zA-Z0-9]+[a-zA-Z0-9_-]*)+[a-zA-Z0-9]\\s*$/\"; //the displayname must begin and end with alphanumeric\n\treturn preg_match($regex_pattern,$username);//returns 1 if the username was valid\n}",
"function findFriends($name)\n\t{\t\n\t\t$arr = explode(\" \", trim(mysql_real_escape_string($name)));\n\t\t\n\t\tif (sizeof($arr) == 0)\n\t\t{\n\t\t\t$GLOBALS[\"_PLATFORM\"]->sandboxHeader('HTTP/1.1 404 Not Found');\n\t\t\tdie();\n\t\t}\n\t\t\n\t\t$uid = getUserId();\n\t\t\n\t\t$cond = implode(\"|\", $arr);\n\t\t\n\t\t$res = getDBResultsArray(\n\t\t\t\"SELECT user_id AS id, first_name, last_name, img_url \n\t\t\tFROM user_table \n\t\t\tWHERE user_id <> $uid\n\t\t\tAND (first_name REGEXP '$cond' OR last_name REGEXP '$cond')\n\t\t\tAND user_id NOT IN (\n\t\t\t\tSELECT user_a\n\t\t\t\tFROM friend_map\n\t\t\t\tWHERE user_b = $uid\n\t\t\t\tUNION SELECT user_b\n\t\t\t\tFROM friend_map\n\t\t\t\tWHERE user_a = $uid\n\t\t\t);\"\n\t\t);\n\t\t\n\t\techo json_encode($res);\n\t}",
"public function findUsersBySubstring($substring) {\n $qb = $this->createQueryBuilder('u')\n ->andWhere('u.isActive = 1')\n ->andWhere('u.email IS NOT NULL OR u.anonymousEmail IS NOT NULL')\n ->andWhere('u.email LIKE :string OR u.username LIKE :string OR u.anonymousEmail LIKE :string')\n ->setParameter('string', '%'.$substring.'%')\n ->getQuery();\n $users = $qb->execute();\n $result = array();\n /** @var User $user */\n foreach($users as $user) {\n if($user->getEmail() === null)\n $mail = explode('@', $user->getAnonymousEmail());\n else\n $mail = explode('@', $user->getEmail());\n $email = $mail[0].\"@ ... \";\n $result[] = strtolower($user->getUsername()).\" (\".$email.\")\";\n }\n return $result;\n }",
"public static function usernames($text = '') {\n\t\t$matches = [];\n\t\t$regex = '/' . self::REGEX_MATCH_TAG . '|' . self::REGEX_CHAR_BACK . self::REGEX_USERNAME . '/i';\n\t\tpreg_match_all($regex, $text, $matches);\n\t\t$results = array_filter($matches[2]);\n\t\treturn array_unique($results);\n\t}",
"function like ($value) {\n return ' like \\''.$value.'\\'';\n }",
"static function checkForUserName($user)\n {\n $users = R::getAll('SELECT * FROM user');\n\n foreach ($users as $u) {\n if ($u['name'] == $user) {\n return true;\n }\n }\n\n return false;\n }",
"function contactsByUserName( $name, $order ){\r\n\t\t$name = str_replace(' ', '%', $name);\r\n\t\t$return = array();\r\n\t\t$query = \"SELECT distinct c.ID, c.* from users u, contacts c, `contacts-users` cu WHERE\r\n\t\t\t\tu.id = cu.userid and\r\n\t\t\t\tcu.contactid = c.id and\r\n\t\t\t\tCONCAT(u.FirstName, ' ', u.MiddleIn, ' ', u.LastName) LIKE '%$name%'\";\r\n// Michael Thompson * 12/07/2005 * Added Below line to tack order onto sql sentence\r\n if ($order != \"\") $query .= \" ORDER BY $order\";\r\n\t\t$result = mysql_query($query);\r\n\t\twhile( $row = mysql_fetch_assoc($result) ) {\r\n\t\t\tarray_push( $return, $row );\r\n\t\t}\r\n\t\treturn $return;\r\n\t}",
"public function seachByName($query)\n {\n return $this->model->where('name', 'like', \"%\" . $query . \"%\");\n }",
"public function getUsernameRegexPattern();",
"public function getSearchUser($value)\n {\n $users = User::where(function ($q) use ($value) {\n return $q->where('username', 'like', '%' . $value . '%');\n })->latest()->take(10)->get(); //end of users obj\n if ($value == '*.*') {\n return redirect()->route('user.getUser');\n }\n return response()->json($users);\n }",
"public function searchByName($query);",
"private function userNameValidate($uName){\n //Search Pattern\n if(preg_match(\"/^[a-zA-Z0-9]*$/\",$uName)){\n $result = true;\n }else{\n $result = false;\n }\n return $result;\n }",
"public function username_is_available($str, $user_table = \"admin_user\") {\n\n $result = ! $this->username_is_found($str, $user_table);\n\n if (!$result) {\n $this->ci->form_validation->set_message(\"username_is_available\", \"Username is already exist.\");\n }\n\n return $result;\n }",
"public function like($column,$data,$wildCardPlacement);",
"function findByusername($n){\r\n \r\n $db = new Database();\r\n \r\n \r\n \r\n \r\n \r\n $connection = $db->getConnnection();\r\n \r\n $stmt = $connection->prepare(\"SELECT idUsers, username, email FROM users WHERE username LIKE ?\");\r\n \r\n if(!$stmt) {\r\n echo \"Something wrong in the binding process. \";\r\n exit;\r\n }\r\n \r\n $like_n = \"%\" . $n . \"%\";\r\n \r\n $stmt->bind_param(\"s\", $like_n);\r\n \r\n $stmt->execute();\r\n \r\n \r\n $stmt->store_result();\r\n \r\n $numRows = $stmt->num_rows;\r\n \r\n \r\n \r\n $stmt->bind_result($id, $username, $email);\r\n \r\n $person_array = array();\r\n \r\n while( $stmt->fetch()){\r\n \r\n \r\n \r\n // create a person object\r\n $p = Array($id, $username, $email);\r\n \r\n // pusha that peron onto the array\r\n \r\n array_push($person_array, $p);\r\n }\r\n return $person_array;\r\n }",
"public static function _username($value)\n\t{\n\t\treturn preg_match(self::usernameRegExp, $value);\n\t}",
"function friendSearchHandler() {\n global $inputs;\n\n $keyword = $inputs['keyword'];\n $res = getAll(\"SELECT a.name,a.email \n FROM member a \n WHERE a.name LIKE '%$keyword%' \n AND a.id NOT IN (\n SELECT apply_member_id \n FROM member_friend_apply \n WHERE status = 0)\"\n );\n\n formatOutput(true, 'success',$res);\n}",
"function BuscarStr($s) {\n\n $str = \" (s_usuarios.nombre ILIKE '%$s%' \";\n $str.= \" OR s_usuarios.usuario ILIKE '%$s%' )\";\n\n return $str;\n\n }",
"function like($pattern, $subject)\t{\n\t\t$pattern = str_replace('%', '.*', preg_quote($pattern));\n\t\treturn (bool) preg_match(\"/^{$pattern}$/i\", $subject);\n\t}",
"public function search(string $q)\n {\n return User::where('privilege', '>', 0)\n ->where(function ($query) use ($q) {\n $query->where('username', 'like', \"%{$q}%\")\n ->orWhere('email', 'like', \"%{$q}%\");\n })\n ->limit(10)\n ->get();\n }",
"public function search_user($data)\r\n\t{\r\n\t\t$telp = $data['telp'];\r\n\t\t$ada = $this->db->get_where('tb_juragan',array('telp' => $telp))->num_rows();\r\n\t\tif ($ada != 1) {\r\n\t\t\t# code...\r\n\t\t\treturn TRUE;\r\n\t\t} else {\r\n\t\t\treturn FALSE;\r\n\t\t}\r\n\t}",
"static function simpleSearchUser($string = '', $order = \"id\", $begin = 0)\r\n {\r\n $tableUser = DatabaseManager::getNameTable('TABLE_USER');\r\n $tableChurch = DatabaseManager::getNameTable('TABLE_CHURCH');\r\n\r\n $query = \"SELECT $tableUser.* \r\n FROM $tableUser \r\n JOIN $tableChurch \r\n ON $tableUser.idChurch = $tableChurch.id\r\n WHERE $tableUser.username LIKE '%$string%' OR\r\n $tableUser.type LIKE '%$string%' OR\r\n $tableChurch.name LIKE '%$string%' OR\r\n $tableUser.id LIKE '%$string%'\";\r\n\r\n if ($order == 'nameChild')\r\n {\r\n $query = $query . \" ORDER BY $tablePerson.lastname1\";\r\n }\r\n else if ($order == 'nameChurch')\r\n {\r\n $query = $query . \" ORDER BY $tableChurch.name\";\r\n }\r\n else\r\n {\r\n $query = $query . \" ORDER BY $tableUser.id\";\r\n }\r\n\r\n $query = $query. \" LIMIT \" . strval($begin * 10) . \", 11 \";\r\n\r\n $arrayUsers = DatabaseManager::multiFetchAssoc($query);\r\n $users = array();\r\n\r\n if ($arrayUsers === NULL)\r\n {\r\n return null;\r\n }\r\n else\r\n {\r\n $i = 0;\r\n foreach ($arrayUsers as $user) \r\n {\r\n if ($i == 10)\r\n {\r\n continue;\r\n }\r\n\r\n $users[] = self::ArrayToUser($user);\r\n $i++;\r\n }\r\n\r\n return $users;\r\n }\r\n }",
"public function SearchCustomer($string) {\n \n //replace troublesome special characters with escaped versions to make them searchable\n $characters = array('/\\\\\\/', '/\\*/', '/\\?/', '/\\^/', '/\\./', '/\\+/', '/\\$/', '/\\|/', '/\\(/', '/\\)/', '/\\[/', '/\\]/', '/\\{/', '/\\}/', '/\\,/');\n $replacements = array('\\\\\\\\\\\\', '\\*', '\\?', '\\^', '\\.', '\\+', '\\$', '\\|', '\\(', '\\)', '\\[', '\\]', '\\{', '\\}', '\\,',);\n $string = preg_replace($characters, $replacements, $string);\n \n //modify the search string for regex (replace all white space with | for use with RLIKE query)\n $search = preg_replace('/\\s+/','|', $string);\n \n //set up the query\n $this->sql = \"SELECT *\n FROM customers\n WHERE CONCAT_WS(' ', firstName, lastName) RLIKE :search\";\n \n //execute the query\n $this->RunAdvancedQuery([\n ':search' => $search,\n ]);\n }",
"public function _replyToModifyMySQLWhereClauseToSearchUsers( $oWPQuery ) {\n \n global $wpdb;\n if ( $oWPQuery->get( 'q' ) ) {\n $_sSearchTerm = $oWPQuery->get( 'q' );\n $oWPQuery->query_where .= \" AND \" . $wpdb->users . \".display_name LIKE '%\" . esc_sql( $wpdb->esc_like( $_sSearchTerm ) ) . \"%'\";\n } \n \n }",
"public static function getPlayersByName($searchString) {\n \tCommonDao::connectToDb();\n \t$query = \"select * from player\n where first_name like '%$searchString%'\n \t or last_name like '%$searchString%'\n \t order by last_name, first_name\";\n \treturn PlayerDao::createPlayersFromQuery($query);\n }"
] | [
"0.73186076",
"0.6943806",
"0.6847151",
"0.6836033",
"0.66249436",
"0.658887",
"0.65877783",
"0.6481886",
"0.6288706",
"0.625853",
"0.62211645",
"0.62122476",
"0.6207571",
"0.6172583",
"0.61368746",
"0.61207384",
"0.610137",
"0.6099805",
"0.6097742",
"0.60674465",
"0.6035184",
"0.6035184",
"0.60210896",
"0.59607524",
"0.5923472",
"0.5921942",
"0.5890416",
"0.5875547",
"0.5872641",
"0.5851628",
"0.5847859",
"0.58368325",
"0.5824001",
"0.5804548",
"0.57734436",
"0.57466584",
"0.57188505",
"0.569831",
"0.5679886",
"0.5676771",
"0.56752545",
"0.5659567",
"0.56557447",
"0.56431574",
"0.5638798",
"0.56283945",
"0.56265235",
"0.562598",
"0.56256104",
"0.560255",
"0.5601994",
"0.55892825",
"0.5585902",
"0.5572611",
"0.5563314",
"0.5554871",
"0.55548185",
"0.5552142",
"0.5550677",
"0.55504066",
"0.5538036",
"0.55348384",
"0.55322427",
"0.5529333",
"0.55284464",
"0.55270845",
"0.5526923",
"0.5511466",
"0.54855007",
"0.5472122",
"0.54613596",
"0.5447251",
"0.5445622",
"0.54425406",
"0.54423374",
"0.5420282",
"0.54176843",
"0.5414004",
"0.5401818",
"0.53977865",
"0.5392746",
"0.53899336",
"0.53874534",
"0.53827906",
"0.5375696",
"0.5367248",
"0.53655165",
"0.53646374",
"0.5356617",
"0.5351068",
"0.53493655",
"0.5343092",
"0.53356993",
"0.53340006",
"0.5318726",
"0.53125614",
"0.5310645",
"0.5307761",
"0.53050214",
"0.53021926"
] | 0.73956454 | 0 |
Search for similar usernames using REGEXP. This will fail on some databases, so like should be used as a backup. | private function searchUsingRegexp(string $username)
{
return static::where($this->getUsernameColumnName(), 'REGEXP', $username.'('.$this->getSeparator().')?([0-9]*)?$')->get();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function findSimilarUsernames(string $username)\n {\n $preferRegexp = $this->preferRegexp ?? $this->getModelGeneratorConfig()->getConfig('prefer_regexp', false);\n\n if (!$preferRegexp) {\n return $this->searchUsingLike($username);\n }\n\n try {\n return $this->searchUsingRegexp($username);\n } catch (QueryException $exception) {\n return $this->searchUsingLike($username);\n }\n }",
"public function getUsernameRegexPattern();",
"function vUsername( $username )\r\n\t\t{\r\n\t\t\t\treturn preg_match( '/^[a-zA-Z\\d_@.]{2,30}$/i', $username );\r\n\t\t\t\t\r\n\t\t}",
"static function searchUserByName() : string\n {\n return \"SELECT *\n FROM users\n WHERE LOCATE( :Name , nickname) > 0;\";\n }",
"public function setUsernameRegexPattern($pattern);",
"function regexcheckusername($username){\n\t$regex_pattern=\"/^\\s*([a-zA-Z0-9]+[a-zA-Z0-9_-]*)+[a-zA-Z0-9]\\s*$/\"; //the displayname must begin and end with alphanumeric\n\treturn preg_match($regex_pattern,$username);//returns 1 if the username was valid\n}",
"function regex_username($uname){\n return preg_match('/^[a-zA-Z0-9]+$/',$uname);\n}",
"function validate_username($username)\r\n\t{\r\n\t\t//return preg_match(REGEX_USERNAME, $username);\r\n\t\treturn preg_match(REGEX_USERNAME, $username);\r\n\t}",
"function search_for_users($needle)\n {\n $needle = trim($needle);\n if ($needle != '')\n {\n $user = $this->ion_auth->get_user();\n\n $query_string = \"SELECT user_meta.user_id, user_meta.first_name, user_meta.last_name, user_meta.grad_year, school_data.school\n FROM user_meta LEFT JOIN school_data ON user_meta.school_id = school_data.id\n WHERE MATCH(user_meta.first_name, user_meta.last_name) AGAINST (? IN BOOLEAN MODE)\n AND user_meta.user_id <> ?\";\n\n // Generate a string to exclude people the user is already following.\n $following_ids = $this->get_following_ids();\n if (count($following_ids) > 0)\n {\n $query_string .= \" AND user_meta.user_id <> '\" . implode(\"' AND user_meta.user_id <> '\", $following_ids) . \"'\";\n }\n $query_string .= ' LIMIT 15';\n\n $query = $this->db->query($query_string, array(str_replace(' ', '* ', $needle) . '*', $user->id));\n\n // Echo the results\n foreach ($query->result() as $row)\n {\n $this->echo_user_entry($row, 'add following', $profile_links_enabled = false);\n }\n }\n }",
"private function searchUsingLike(string $username)\n {\n $exactMatches = static::where($this->getUsernameColumnName(), $username)->get();\n\n if ($exactMatches) {\n return static::where($this->getUsernameColumnName(), 'LIKE', $username.'%')->get();\n }\n\n return $exactMatches;\n }",
"function verifyUserName($name) {\r\n if (preg_match('/^[a-zA-Z0-9\\ \\\\._\\'\"-]{4,50}$/', $name) != 1) { // no match\r\n return \"Name must be 4-50 characters long and consist of letters, digits, \"\r\n . \"spaces, dots, underscores, apostrophies, or minus sign.\";\r\n }\r\n return TRUE;\r\n}",
"function valid_username($username)\n{\n\t$filter = preg_replace(\"/[^a-z\\d\\-=\\?!@:\\.]/i\", \"\", $username);\n\t\n\tif($filter == $username){\n\t\treturn $username; //preg_match('#^[a-z]{1,2}[a-z0-9-_.-]+$#i', $username);\n\t}\n}",
"function FindUser($User) {\n $User = str_replace('ZZ ', '', $User);\n\n //separa o primeiro nome do sobrenome\n $name_complete = explode(' ', $User);\n $user_name = array_shift($name_complete);\n $user_lastname = implode(' ', $name_complete);\n\n $Read = new WsUsers();\n\n $Read->setUser_name($user_name);\n $Read->setUser_lastname($user_lastname);\n $Result = $Read->Execute()->Query(\"user_name like '%{$user_name}%' AND user_lastname like '%{$user_lastname}%'\");\n\n if (!empty($Result)):\n return $Result[0]->user_id;\n endif;\n}",
"private function userNameValidate($uName){\n //Search Pattern\n if(preg_match(\"/^[a-zA-Z0-9]*$/\",$uName)){\n $result = true;\n }else{\n $result = false;\n }\n return $result;\n }",
"public static function usernames($text = '') {\n\t\t$matches = [];\n\t\t$regex = '/' . self::REGEX_MATCH_TAG . '|' . self::REGEX_CHAR_BACK . self::REGEX_USERNAME . '/i';\n\t\tpreg_match_all($regex, $text, $matches);\n\t\t$results = array_filter($matches[2]);\n\t\treturn array_unique($results);\n\t}",
"public function searchUsers($str) {\n return user_find($str);\n }",
"protected function _suggestUsername($name){\n $name = trim(strtolower($name));\n // pr($name); die('qq');\n $usernameCheck1 = $this->Players->find()->where(['username' => $name])->first();\n // pr($usernameCheck1); die('u name');\n if(!$usernameCheck1){\n $username = $name;\n }else{\n $usernameCheck2 = $this->Players->find()->where(['username LIKE' => $name.'%'])->all()->toArray();\n //pr($usernameCheck2); die('u 2 name');\n if(!count($usernameCheck2)){\n $username = $name;\n }else{\n $username = $name.count($usernameCheck2);\n }\n }\n return $username;\n\n }",
"protected function get_query_regex() {\n\t\tglobal $wpdb;\n\n\t\tif ( ! $this->query_regex ) {\n\t\t\t$this->query_regex = array(\n\t\t\t\tsprintf(\n\t\t\t\t\t'/^SELECT \\* FROM %s WHERE (user_email) = \\'.*\\'(?:\\sLIMIT\\s1)?$/',\n\t\t\t\t\tpreg_quote( $wpdb->users, '/' )\n\t\t\t\t),\n\t\t\t);\n\t\t}\n\n\t\treturn $this->query_regex;\n\t}",
"function like($str, $searchTerm)\n {\n $searchTerm = strtolower($searchTerm);\n $str = strtolower($_SESSION['username']);\n $pos = strpos($str, $searchTerm);\n if ($pos === false)\n return false;\n else\n return true;\n }",
"public function fuzzySearchName($name) {\n $con = mysqli_connect('localhost', 'root', 'root', 'HexDatabase');\n //TODO: Add firstname and surname support\n $query = 'SELECT * FROM User WHERE firstName LIKE \\'%'.$name.'%\\';';\n $results = mysqli_query($con, $query);\n if ($results) {\n return $this->getResultAsJson($results);\n } else {\n return json_encode(null);\n }\n }",
"function account_namevalid() {\n if (strspn($_POST['clientusername'],\"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-\") == 0) {\n return false;\n }\n \n // must contain all legal characters\n if (strspn($_POST['clientusername'],\"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_\") != strlen($_POST['clientusername'])) {\n return false;\n }\n\n // min and max length\n if (strlen($_POST['clientusername']) < 5) {\n return false;\n }\n if (strlen($_POST['clientusername']) > 25) {\n return false;\n }\n\n // illegal names\n if (eregi(\"^((root)|(bin)|(daemon)|(adm)|(lp)|(sync)|(shutdown)|(halt)|(mail)|(news)|(uucp)|(operator)|(games)|(mysql)|(httpd)|(nobody)|(dummy)|(www)|(cvs)|(shell)|(ftp)|(irc)|(debian)|(ns)|(download))$\", $_POST['username'])) {\n return false;\n }\n if (eregi(\"^(anoncvs_)\", $_POST['clientusername'])) {\n return false;\n }\n\nreturn true;\n}",
"public function searchUserByName($name){\r\n $result = $this->DB->fetchAll('select * from user where name like ?',array(\"%{$name}%\"));\r\n return $this->formatResult($result);\r\n }",
"function validate_username($username)\n{\n\tglobal $db, $lang, $userdata;\n\n\t// Remove doubled up spaces\n\t$username = str_compact($username);\n\t$username = phpbb_clean_username($username);\n\n\t$sql = \"SELECT username FROM bb_users WHERE username = '$username'\";\n\n\tif ($row = $db->fetch_row($sql))\n\t{\n\t\tif (($userdata['session_logged_in'] && $row['username'] != $userdata['username']) || !$userdata['session_logged_in'])\n\t\t{\n\t\t\treturn array('error' => true, 'error_msg' => $lang['Username_taken']);\n\t\t}\n\t}\n\n\t$sql = \"SELECT disallow_username\n\t\tFROM bb_disallow\";\n\tif ($result = $db->sql_query($sql))\n\t{\n\t\tif ($row = $db->sql_fetchrow($result))\n\t\t{\n\t\t\tdo\n\t\t\t{\n\t\t\t\tif (preg_match(\"#\\b(\" . str_replace(\"\\*\", \".*?\", preg_quote($row['disallow_username'], '#')) . \")\\b#i\", $username))\n\t\t\t\t{\n\t\t\t\t\t$db->sql_freeresult($result);\n\t\t\t\t\treturn array('error' => true, 'error_msg' => $lang['Username_disallowed']);\n\t\t\t\t}\n\t\t\t}\n\t\t\twhile($row = $db->sql_fetchrow($result));\n\t\t}\n\t}\n\t$db->sql_freeresult($result);\n\n\t$sql = \"SELECT word\n\t\tFROM bb_words\";\n\tif ($result = $db->sql_query($sql))\n\t{\n\t\tif ($row = $db->sql_fetchrow($result))\n\t\t{\n\t\t\tdo\n\t\t\t{\n\t\t\t\tif (preg_match(\"#\\b(\" . str_replace(\"\\*\", \".*?\", preg_quote($row['word'], '#')) . \")\\b#i\", $username))\n\t\t\t\t{\n\t\t\t\t\t$db->sql_freeresult($result);\n\t\t\t\t\treturn array('error' => true, 'error_msg' => $lang['Username_disallowed']);\n\t\t\t\t}\n\t\t\t}\n\t\t\twhile ($row = $db->sql_fetchrow($result));\n\t\t}\n\t}\n\t$db->sql_freeresult($result);\n\n\t// Don't allow \" and ALT-255 in username.\n\t// if (strstr($username, '\"') || strstr($username, '"') || strstr($username, chr(160)))\n\t// {\n\t// \treturn array('error' => true, 'error_msg' => $lang['Username_invalid']);\n\t// }\n\n\treturn array('error' => false, 'error_msg' => '');\n}",
"function mentionTryName($username = '')\n{\n\t/**\n\t * create another name cache here to save queries if names\n\t * with spaces are used more than once in the same post\n\t */\n\tstatic $nameList;\n\n\tif (!is_array($nameList)) {\n\t\t$nameList = array();\n\t}\n\n\t// no user name supplied\n\tif (!$username) {\n\t\treturn false;\n\t}\n\n\t$username = mb_strtolower($username);\n\n\t// if the name is in this cache (has been searched for before)\n\tif ($nameList[$username]) {\n\t\t// . . . just return the data and save the query\n\t\treturn $nameList[$username];\n\t}\n\n\tglobal $db, $mybb;\n\n\t$searchname = $db->escape_string($username);\n\n\t$fieldList = 'uid, username, usergroup, displaygroup, additionalgroups, ignorelist';\n\tif ($mybb->settings['mention_show_avatars']) {\n\t\t$fieldList .= ', avatar';\n\t}\n\n\t// query the db\n\t$query = $db->simple_select('users', $fieldList, \"LOWER(username)='{$searchname}'\", array('limit' => 1));\n\n\t// result?\n\tif ($db->num_rows($query) !== 1) {\n\t\t// no matches\n\t\treturn false;\n\t}\n\n\t// cache the name\n\t$nameList[$username] = $db->fetch_array($query);\n\n\t// and return it\n\treturn $nameList[$username];\n}",
"function validateUsername(&$errors, $field_list, $field_name, $enteredUser)\n{\n\t$UsernamePat = '/^[a-zA-Z0-9]+$/'; //username regex\n\tif (!isset($field_list[$field_name])|| empty($field_list[$field_name])) //check if empty\n\t\t$errors[$field_name] = ' Required';\n\telse if (!preg_match($UsernamePat, $field_list[$field_name])) //check if entry is valid\n\t\t$errors[$field_name] = ' Invalid';\n\telse { //checks if username has been used\n\t\t$pdo = new PDO('mysql:host=mysql.ahtomsk.com;dbname=brisfi', 'brisfi_user', 'test1234');\n\t\t$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\n\t\ttry\t{\n\t\t\t$query = $pdo->prepare(\"SELECT * \".\n\t\t\t\t\t\t\t\t\"FROM users \".\n\t\t\t\t\t\t\t\t\"WHERE username = '$enteredUser'\");\n\t\t\t$query->execute();\n\t\t}\n\t\tcatch (PDOException $e) \n\t\t{\n\t\t\techo $e->getMessage();\n\t\t}\n\n\t\t$rowCount = $query->rowCount();\n\n\t\tif($rowCount > 0){\n\t\t$errors[$field_name] = ' Username already in use';\n\t\t}\n\t}\n}",
"public function testRegressionIssue2UsernameRegexDoesntSupportHyphens()\n {\n $regex = TestableAtWrapper::getQueueRegex();\n $test_strings = [\n '17 Mon Nov 15 10:55:00 2010 a simon',\n '18 Mon Nov 15 10:55:00 2010 a simons-username',\n '2 2010-11-15 10:53 a root',\n '3 2010-11-15 10:54 a root-username-',\n ];\n $m = 0;\n foreach ($test_strings as $test) {\n $m += preg_match($regex, $test);\n }\n $this->assertSame($m, count($test_strings));\n }",
"function chkusername($str) {\n $this->db->where('username', strtolower($str));\n $query = $this->db->get('user');\n if ($query->num_rows() == 1) {\n $this->form_validation->set_message('chkusername', 'Username is already being used!');\n return false;\n }\n\n return true;\n }",
"public static function _username($value)\n\t{\n\t\treturn preg_match(self::usernameRegExp, $value);\n\t}",
"public function validateUsernameEqual($value, array $context)\n {\n Stopwatch::start('validateUsernameEqual');\n $users = $this->userlist();\n $lc = mb_strtolower($value);\n foreach ($users as $name) {\n if ($name === $value) {\n continue;\n }\n $name = mb_strtolower($name);\n $distance = levenshtein($lc, $name);\n if ($distance < 2) {\n return __('error.name.equalExists', $name);\n }\n }\n Stopwatch::stop('validateUsernameEqual');\n\n return true;\n }",
"public function validateRealname() {\r\n $leng = mb_strlen($this->data[$this->name]['RealName']);\r\n if ($leng > 128) {\r\n return FALSE;\r\n } else if ($leng > 64) {\r\n if (mb_ereg(self::_REGEX_FULLWITH, $this->data[$this->name]['RealName']) !== false) {\r\n return FALSE;\r\n }\r\n }\r\n return TRUE;\r\n }",
"function login_user($username, $pwd){\n global $db;\n $username = addslashes($username);\n $pwd = addslashes($pwd);\n $pattern = \"/^\\w+((-\\w+)|(\\.\\w+))*\\@[A-Za-z-0-9]+((\\.|-)[A-Za-z-0-9]+)*\\.[A-Za-z-0-9]+$/\";\n if(preg_match($pattern, $username)){\n $email_check = sorter_email($username, $pwd);\n } else {\n $email_check = sorter_user($username, $pwd);\n }\n return $email_check;\n}",
"function pwordMatches(){\n\t\t//assume pword does not match that in system\n\t\t$match = false;\n\t\ttry{//try to est connection to db \n\t\t\t$user_db = new SQLite3('users.db');\n\t\t}catch(Exception $ex){ //if cannot catch exception \n\t\t\techo $ex->getMessage(); \n\t\t}\n\t\t//query for all usernames\n\t\t$statement = 'SELECT Username, Password FROM users;';\n\t\t$run = $user_db->query($statement); \n\n\t\t$pword = $_SESSION['password'];\n\t\t$pword = hash('md2', $pword); \n\t\tif($run){//query did not have error\n\t\t\twhile($row = $run->fetchArray()){\n\t\t\t\tif(trim($row['Username']) === trim($_POST['name'])){//if provided username is the same as that queried\t\n\t\t\t\t\tif($pword === trim($row['Password'])){//if provided pword matches that for the provided username\n\t\t\t\t\t\t//password matches\n\t\t\t\t\t\t$match = true; \n\t\t\t\t\t\t//break out of loop\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t}\n\t\t}\n\t\t$user_db->close(); \n\t\treturn $match; \t\n\t}",
"public function username_is_found($str, $user_table = \"admin_user\") {\n\n $id = $this->ci->input->post(\"id\");\n\n $find_conf = array(\"username\" => $str);\n\n // exclude his own ID to search another profile's email. (edit only)\n if ($id) {\n $find_conf[\"id <>\"] = $id;\n }\n\n $result = $this->ci->generic_model->retrieve_one(\n $user_table,\n $find_conf\n );\n\n if ($result) { // there exists an username.\n return TRUE;\n } else { // username is not found.\n $this->ci->form_validation->set_message(\"username_is_found\", \"Username is not found.\");\n return FALSE;\n }\n }",
"function _generateUserNameSearchSQL($search, $searchMatch, $prefix, &$params) {\n\t\t$first_last = $this->concat($prefix.'first_name', '\\' \\'', $prefix.'last_name');\n\t\t$first_middle_last = $this->concat($prefix.'first_name', '\\' \\'', $prefix.'middle_name', '\\' \\'', $prefix.'last_name');\n\t\t$last_comma_first = $this->concat($prefix.'last_name', '\\', \\'', $prefix.'first_name');\n\t\t$last_comma_first_middle = $this->concat($prefix.'last_name', '\\', \\'', $prefix.'first_name', '\\' \\'', $prefix.'middle_name');\n\t\tif ($searchMatch === 'is') {\n\t\t\t$searchSql = \" AND (LOWER({$prefix}last_name) = LOWER(?) OR LOWER($first_last) = LOWER(?) OR LOWER($first_middle_last) = LOWER(?) OR LOWER($last_comma_first) = LOWER(?) OR LOWER($last_comma_first_middle) = LOWER(?))\";\n\t\t} elseif ($searchMatch === 'contains') {\n\t\t\t$searchSql = \" AND (LOWER({$prefix}last_name) LIKE LOWER(?) OR LOWER($first_last) LIKE LOWER(?) OR LOWER($first_middle_last) LIKE LOWER(?) OR LOWER($last_comma_first) LIKE LOWER(?) OR LOWER($last_comma_first_middle) LIKE LOWER(?))\";\n\t\t\t$search = '%' . $search . '%';\n\t\t} else { // $searchMatch === 'startsWith'\n\t\t\t$searchSql = \" AND (LOWER({$prefix}last_name) LIKE LOWER(?) OR LOWER($first_last) LIKE LOWER(?) OR LOWER($first_middle_last) LIKE LOWER(?) OR LOWER($last_comma_first) LIKE LOWER(?) OR LOWER($last_comma_first_middle) LIKE LOWER(?))\";\n\t\t\t$search = $search . '%';\n\t\t}\n\t\t$params[] = $params[] = $params[] = $params[] = $params[] = $search;\n\t\treturn $searchSql;\n\t}",
"function _generateUserNameSearchSQL($search, $searchMatch, $prefix, &$params) {\n\t\t$first_last = $this->concat($prefix.'first_name', '\\' \\'', $prefix.'last_name');\n\t\t$first_middle_last = $this->concat($prefix.'first_name', '\\' \\'', $prefix.'middle_name', '\\' \\'', $prefix.'last_name');\n\t\t$last_comma_first = $this->concat($prefix.'last_name', '\\', \\'', $prefix.'first_name');\n\t\t$last_comma_first_middle = $this->concat($prefix.'last_name', '\\', \\'', $prefix.'first_name', '\\' \\'', $prefix.'middle_name');\n\t\tif ($searchMatch === 'is') {\n\t\t\t$searchSql = \" AND (LOWER({$prefix}last_name) = LOWER(?) OR LOWER($first_last) = LOWER(?) OR LOWER($first_middle_last) = LOWER(?) OR LOWER($last_comma_first) = LOWER(?) OR LOWER($last_comma_first_middle) = LOWER(?))\";\n\t\t} elseif ($searchMatch === 'contains') {\n\t\t\t$searchSql = \" AND (LOWER({$prefix}last_name) LIKE LOWER(?) OR LOWER($first_last) LIKE LOWER(?) OR LOWER($first_middle_last) LIKE LOWER(?) OR LOWER($last_comma_first) LIKE LOWER(?) OR LOWER($last_comma_first_middle) LIKE LOWER(?))\";\n\t\t\t$search = '%' . $search . '%';\n\t\t} else { // $searchMatch === 'startsWith'\n\t\t\t$searchSql = \" AND (LOWER({$prefix}last_name) LIKE LOWER(?) OR LOWER($first_last) LIKE LOWER(?) OR LOWER($first_middle_last) LIKE LOWER(?) OR LOWER($last_comma_first) LIKE LOWER(?) OR LOWER($last_comma_first_middle) LIKE LOWER(?))\";\n\t\t\t$search = $search . '%';\n\t\t}\n\t\t$params[] = $params[] = $params[] = $params[] = $params[] = $search;\n\t\treturn $searchSql;\n\t}",
"private function validateUsername() {\r\n $val = trim($this->data['username');\r\n \r\n if( empty($val) ) { \r\n $this->addError('username', 'username cannot be empty');\r\n } else {\r\n if(preg_match('/^[a-aA-Z0-9]{6,12}$/', $val)) {\r\n $this->addError('username', 'username must 6-12 chars $ alphanumeric')\r\n }\r\n } \r\n }",
"function test_uname($uname){\n //but may be useful when debugging\n $result = \"\";\n $unamelength = strlen($uname);\n //test length\n if ($unamelength < 3) $result = \"Invalid username: make it longer\";\n if ($unamelength > 25) $result = \"Invalid username: make it shorter\";\n //test for the word 'guest'\n if (strpos($uname, 'guest') !== false) $result=\"This word is restricted.\";\n //test for bad characters\n if (preg_match(\"/[^a-zA-Z0-9-_]/\", $uname)) $result = \"Invalid username\";\n return $result;\n}",
"public function getUsersMatching($keyword) {\n $sql = 'SELECT id, firstname, mail, role, isAdmin FROM user WHERE firstname LIKE ? OR mail LIKE ? OR role LIKE ?';\n $sth = $this->db->prepare($sql);\n $sth-> execute(array(\"%$keyword%\", \"%$keyword%\", \"%$keyword%\"));\n if ($row = $sth->fetchAll()) {\n return $row;\n }\n\n }",
"private function /*bool*/ findUsername(/*string*/ $name) {\n\t\t$variations = array(\n\t\t\t$name,\n\t\t\tstrtolower($name[0]) . substr($name, 1),\n\t\t\tstr_replace(\" \", \"_\", $name),\n\t\t);\n\n\t\t$crowd = $this->getCrowd();\n\t\tforeach ($variations as $v) {\n\t\t\ttry {\n\t\t\t\t$crowd->findPrincipalByName(array(\"in0\" => $this->token, \"in1\" => $v));\n\t\t\t\treturn $v;\n\t\t\t} catch (Exception $e) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}",
"function username_in_db ( $ls_username, $link ) {\n\n\t\techo 'in username_in_db:: username:'. $ls_username . '<br>';\n\n\t\t$sql = \"SELECT * FROM `users` WHERE `username` LIKE '$ls_username'\";\n\n\t\techo 'sql='.$sql.\"<br>\";\n\n\t\t$result = mysqli_query( $link, $sql );\n\n\t\tif ( $result ) {\n\n\t\t\techo 'username_in_db:: query returned result<br>';\n\n \t\tif ( mysqli_num_rows( $result ) > 0) {\n\n \t\t\techo 'username_in_db: username '.$ls_username.' found in database<br>';\n\n \t\t\treturn true;\n\n \t\t}\n \t}\n\n \techo 'username_in_db: username '.$ls_username.' NOT found in database<br>';\n\n\t\treturn false;\n\n\t}",
"public function findByFirstName($pattern)\r\n {\r\n $mysqli = $this->conn;\r\n\r\n $query = $mysqli->prepare(\"SELECT * FROM users WHERE fname LIKE ?\");\r\n\r\n // bind parameters for markers\r\n $like_pattern = \"%\" . $pattern . \"%\";\r\n\r\n $query->bind_param('s', $like_pattern);\r\n\r\n // execute query\r\n $query->execute();\r\n\r\n // get results\r\n $result = $query->get_result();\r\n\r\n if (! $result) {\r\n echo \"Error in the SQL statement\";\r\n return NULL;\r\n exit();\r\n }\r\n\r\n if ($result->num_rows == 0) {\r\n return NULL;\r\n } else {\r\n $index = 0;\r\n $users_array = array();\r\n\r\n while ($row = $result->fetch_assoc()) {\r\n $users_array[$index] = array(\r\n $row[\"ID\"],\r\n $row[\"username\"],\r\n ($row[\"fname\"] . \" \" . $row['lname'])\r\n );\r\n $index ++;\r\n }\r\n\r\n // frees result set and closes connection\r\n $result->free();\r\n $mysqli->close();\r\n\r\n if (count($users_array) > 0)\r\n return $users_array;\r\n return NULL;\r\n }\r\n }",
"function filterName($field){\n // Sanitize user name\n $field = filter_var(trim($field), FILTER_SANITIZE_STRING);\n\n // Validate user name\n if(filter_var($field, FILTER_VALIDATE_REGEXP, array(\"options\"=>array(\"regexp\"=>\"/^[a-zA-Z\\s]+/\")))){\n return $field;\n }else{\n return FALSE;\n }\n}",
"function find_users_like($session_id, $user_search)\n{\n global $db;\n\n $search = '%';\n $search .= $user_search;\n $search .= '%';\n\n $query = \"SELECT DISTINCT User.user_id, User.user_name FROM User \n WHERE User.user_id NOT IN (SELECT user_id FROM User_Session WHERE session_id = ?) \n AND User.user_name LIKE ?\";\n\n $stmt = $db->prepare($query);\n $stmt->bind_param(\"is\", $session_id, $search);\n $stmt->execute();\n\n $user_set = $stmt->get_result();\n\n $stmt->close();\n\n return $user_set;\n}",
"public static function searchManager_username($keyword)\n\t\t{\n\t\t\t$qry = 'SELECT * FROM manager WHERE last_name LIKE \"%' . $keyword . '%\"';\n\t\t\t$result = mysql_query($qry, $GLOBALS['connection']);\n\t\t\treturn $result;\n\t\t}",
"function is_dyndns_username($uname) {\n\tif (!is_string($uname))\n\treturn false;\n\n\tif (preg_match(\"/[^a-z0-9\\-.@_]/i\", $uname))\n\treturn false;\n\telse\n\treturn true;\n}",
"function validateUsername($nombre){\n if(strlen($nombre) < 4){\n return false;\n }\n\n if(!preg_match(\"/^([A-Z|Ñ|a-z|ñ|Á|É|Í|Ó|Ú|á|é|í|ó|ú]+\\s{0,1})+$/\", $nombre)){\n return false;\n }\n\n return true;\n}",
"public function username_is_available($str, $user_table = \"admin_user\") {\n\n $result = ! $this->username_is_found($str, $user_table);\n\n if (!$result) {\n $this->ci->form_validation->set_message(\"username_is_available\", \"Username is already exist.\");\n }\n\n return $result;\n }",
"public static function validateUsername($username){\n\t\treturn preg_match('/^[A-Z0-9]{2,20}$/i', $username);\n\t}",
"private function checkUsername($name){\n\t\t\tif(strlen($name) < 3)\n\t\t\t\tthrow new UserFewCharException();\n\t\t\tif($this->userList->getUsers()->getUserByName($name) != null)\n\t\t\t\tthrow new UserExistsException();\n\t\t\tif($name != strip_tags($name))\n\t\t\t\tthrow new UserBadCharException();\n\t\t\treturn true;\n\t\t}",
"private function validateUserName($un){\n if(strlen($un)<2 || strlen($un)>25){\n array_push($this->errorArray, Constants::$userNameCharecters);\n return;\n }\n #SQL QUERY\n $query = $this->con->prepare(\"SELECT * FROM users WHERE userName=:un\");\n $query->bindValue(':un', $un); #bind the value to user name\n $query->execute();\n\n if($query->rowCount() !=0){\n array_push($this->errorArray,Constants::$userNameTaken);\n }\n\n }",
"function like_match($searchParam, $subject) {\n $preg = preg_grep(\"/(.*)\" . strtolower($searchParam) . \"(.*)/\", [strtolower($subject)]);\n if(!empty($preg)){\n return true;\n }\n return false;\n}",
"abstract public function getRegexMatchingTableNames();",
"private function search_for_username($string)\r\n\t{\r\n\t\t$search_string = '%' . $string . '%';\r\n\t\t$results = array();\r\n\t\tglobal $dbCon;\r\n\r\n\t\t$sql = \"SELECT id FROM student WHERE username LIKE ?;\";\r\n\t\t$stmt = $dbCon->prepare($sql); //Prepare Statement\r\n\t\tif ($stmt === false)\r\n\t\t{\r\n\t\t\ttrigger_error('SQL Error: ' . $dbCon->error, E_USER_ERROR);\r\n\t\t}\r\n\t\t$stmt->bind_param('s', $search_string);\r\n\t\t$stmt->execute(); //Execute\r\n\t\t$stmt->bind_result($student_id); //Get ResultSet\r\n\t\twhile ($stmt->fetch())\r\n\t\t{\r\n\t\t\t$results[] = $student_id;\r\n\t\t}\r\n\t\t$stmt->close();\r\n\r\n\t\treturn $results;\r\n\t}",
"function _validateUsername($name)\n {\n return trim(substr(preg_replace('/[^A-Za-z0-9_ \\-]/', '',$name),0,24)); \n }",
"function filterName($field) {\n // Limpiar el nombre del usuario\n $sanitizeField = filter_var(trim($field), FILTER_SANITIZE_STRING);\n\n // Validate user name\n if (filter_var($sanitizeField, FILTER_VALIDATE_REGEXP, array(\"options\" => array(\"regexp\" => \"/^[a-zA-Z\\s]+$/\")))) {\n return $sanitizeField;\n } else {\n return false;\n }\n}",
"function validateUserName($name)\n {\n /**condition for validating the type and size of user input string\n *takes user input name as a parameter for validating with the set conditons\n */\n if (preg_match('/[a-zA-Z]{3}/', $name)) {\n return true;\n }\n }",
"public function users() {\n $matches = array();\n if ($name = $this->input->get('q')) {\n $users = ORM::factory('user')->where('site_id', $this->site->id)->like('searchname', text::searchable($name))->where('status', 1)->find_all();\n foreach ($users as $user) {\n if ($user->id != $this->user->id) { // Can't send a message to yourself.\n $matches[] = (object) array('id' => $user->id, 'name' => $user->name());\n }\n }\n }\n print json_encode($matches);\n die();\n }",
"public function get_matching_members($pattern, $limit = null)\n {\n $rows = $this->connection->query('SELECT * FROM ' . $this->connection->get_table_prefix() . 'users WHERE username LIKE \\'' . db_encode_like($pattern) . '\\' AND uid<>' . strval($this->get_guest_id()) . ' ORDER BY lastactive DESC', $limit);\n sort_maps_by($rows, 'username');\n return $rows;\n }",
"function isFreeUsername($username, $connection) {\n\t$namecheckquery = mysqli_query($connection, \"select name from users where name = '\".$username.\"';\");\n\t$namecheck = mysqli_num_rows($namecheckquery);\n\n\treturn !$namecheck;\n}",
"function mentionMeXMLHTTPnameSearch()\n{\n\tglobal $mybb, $db, $cache;\n\n\tif (!$mybb->input['search']) {\n\t\texit;\n\t}\n\n\t$originalName = trim($mybb->input['search']);\n\t$name = $db->escape_string($originalName);\n\t$name = strtr($name,\n\t\tarray(\n\t\t\t'%' => '=%',\n\t\t\t'=' => '==',\n\t\t\t'_' => '=_')\n\t\t);\n\n\t$fieldList = 'username';\n\tif ($mybb->settings['mention_show_avatars']) {\n\t\t$fieldList .= ', avatar';\n\t}\n\n\t$fullText = '';\n\tif ($mybb->settings['mention_full_text_search']) {\n\t\t$fullText = '%';\n\t}\n\n\t$query = $db->simple_select('users', $fieldList, \"username LIKE '{$fullText}{$name}%' ESCAPE '='\");\n\n\tif ($db->num_rows($query) == 0) {\n\t\texit;\n\t}\n\n\t$names = array();\n\twhile ($user = $db->fetch_array($query)) {\n\t\t$username = mb_strtolower($user['username']);\n\t\tif (($fullText === '' &&\n\t\t\tsubstr($username, 0, strlen($originalName)) === $originalName) ||\n\t\t\t($fullText &&\n\t\t\tstrpos($username, $originalName) !== -1)) {\n\t\t\t$names[$username] = $user;\n\t\t}\n\t}\n\n\tif (empty($names)) {\n\t\texit;\n\t}\n\t$json = json_encode($names);\n\n\t// send our headers.\n\theader('Content-type: application/json');\n\techo($json);\n\texit;\n}",
"function check_user_exist($username) {\n\t$username = mysql_escape_string($username);\n\t// Make a list of words to postfix on username for suggest\n\t$suggest = array('007', '1', 'theman', 'rocks');\n\t//$suggest = array();\n\t$sql = \"SELECT `username` FROM `users` WHERE `username` = '$username'\";\n\t$result = mysql_query($sql);\n\tif(mysql_num_rows($result) > 0) {\n\t\t// Username not available\n\t\t$avail[0] = 'no';\n\t\t$i = 2;\n\t\t// Loop through suggested ones checking them\n\t\tforeach($suggest AS $postfix) {\n\t\t\t$sql = \"SELECT `username` FROM `users` WHERE `username` = '\".$username.$postfix.\"'\";\n\t\t\t$result = mysql_query($sql);\n\t\t\tif(mysql_num_rows($result) < 1) {\n\t\t\t\t$avail[$i] = $username.$postfix;\n\t\t\t\t$i ++;\n\t\t\t}\n\t\t}\n\t\t$avail[1] = $i - 1;\n\t\treturn $avail;\n\t}\n\t// Username is available\n\treturn array('yes');\n}",
"function iu_mentionusername($string, $from, $posturl){\n\tinclude 'dbparams.php';\n\tpreg_match_all('/@[a-zA-Z0-9_]+/', $string, $matches);\n\t// print_r($matches[1]);\n\tforeach ($matches as $match) {\n\t\tif(in_array($match, $matches)){\n\t\t\tforeach ($match as $name) {\n\t\t\t\t$matchedname = str_replace(\"@\", \"\", $name);//remove '@' from username match\n\t\t\t\t$mentionQuery = @mysqli_query($dblink, \"SELECT user_id FROM users WHERE username = '$matchedname'\");\n\t\t\t\t$mentionRow = mysqli_fetch_assoc($mentionQuery);\n\t\t\t\t$mentionuserid = $mentionRow['user_id'];\n\n\t\t\t\tiu_send_notification($from, $mentionuserid, 'mentionpost', $posturl);\n\t\t\t}\n\t\t}\n\t}\n}",
"function validateUsername($username, $conn) {\n\t\t\t$sql = 'SELECT * FROM users WHERE user_name=\\''.$username.'\\'';\n\t\t\t// echo $sq;.'<br>';\n\n\t\t\t//Prepare sql using conn and returns the statement identifier\n\t\t\t$stid = oci_parse($conn, $sql);\n\t\t\t//Execute a statement returned from oci_parse()\n\t\t\t$res=oci_execute($stid);\n\t\t\t//if error, retrieve the error using the oci_error() function & output an error message\n\t\t\tif (!$res) {\n\t\t\t\t$err = oci_error($stid); \n\t\t\t\techo htmlentities($err['message']);\n\t\t\t}\n\n\t\t\t$results = oci_fetch_array($stid, OCI_ASSOC);\n\t\t\treturn $results;\n\t\t}",
"public function check_new_username($username){\n\t\t\t$error['error_exists'] = false;\n\t\t\t$error['error_message'] = false;\n\n\t\t\tif (strlen($username) < $this->min_user_name_length){\n\t\t\t\t$error['error_exists'] = true;\n\t\t\t\t$error['error_message'] = $this->len_user_name_error_msg;\n\t\t\t}\n\t\t\telse if (strlen($username) >= $this->max_user_name_length){\n\t\t\t\t$error['error_exists'] = true;\n\t\t\t\t$error['error_message'] = $this->len_user_name_error_msg;\n\t\t\t}\n\n\t\t\telse if (preg_match($this->main_user_name_char_regex, $username)){\n\t\t\t\t$error['error_exists'] = true;\n\t\t\t\t$error['error_message'] = $this->char_user_name_error_msg;\n\t\t\t}\n\n\t\t\treturn $error;\n\n\t\t}",
"public function Add_validate_user_name($value)\n\t{\n\t\tif(0 != $this->GetOne('id',array('user_name'=>'=?'),$value) )\n\t\t{\n\t\t\t$this->error_msg = DOLang::Get('Do not allow duplicated users!');\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"private function searchMembers() {\n $searchStr = $this->postVars['memberSearch'];\n $searchStrArr = array();\n if(preg_match('/\\s/',$searchStr)) {\n $searchStrArr = explode(\" \", $searchStr);\n }\n \n if(empty($searchStrArr)) {\n $query = \"SELECT u.id\n FROM {$this->db->prefix}users AS u\n WHERE u.user_email = '$searchStr'\n UNION\n SELECT u.id\n FROM {$this->db->prefix}users AS u\n JOIN {$this->db->prefix}nhc n ON u.id = n.user_id AND n.nhc_pin = '$searchStr'\n JOIN {$this->db->prefix}usermeta um1 ON um1.user_id = u.id AND um1.meta_key = 'first_name'\n JOIN {$this->db->prefix}usermeta um2 ON um2.user_id = u.id AND um2.meta_key = 'last_name'\n UNION\n SELECT u.id\n FROM {$this->db->prefix}users AS u\n JOIN {$this->db->prefix}nhc n ON u.id = n.user_id\n JOIN {$this->db->prefix}usermeta um1 ON um1.user_id = u.id AND um1.meta_key = 'first_name' AND um1.meta_value like '%$searchStr%'\n JOIN {$this->db->prefix}usermeta um2 ON um2.user_id = u.id AND um2.meta_key = 'last_name'\n UNION\n SELECT u.id\n FROM {$this->db->prefix}users AS u\n JOIN {$this->db->prefix}nhc n ON u.id = n.user_id\n JOIN {$this->db->prefix}usermeta um1 ON um1.user_id = u.id\n JOIN {$this->db->prefix}usermeta um2 ON um2.user_id = u.id AND um2.meta_key = 'last_name' AND um2.meta_value like '%$searchStr%'\";\n //JOIN {$this->db->prefix}usermeta um4 ON um4.user_id = u.id AND um4.meta_key = 'expiration_date' AND um4.meta_value = '$expireDate'\";\n }\n else { // looking specifically for a full name\n $query = \"SELECT u.id\n FROM {$this->db->prefix}users AS u\n JOIN {$this->db->prefix}nhc n ON u.id = n.user_id\n JOIN {$this->db->prefix}usermeta um1 ON um1.user_id = u.id AND um1.meta_key = 'first_name' AND um1.meta_value like '%{$searchStrArr[0]}%'\n JOIN {$this->db->prefix}usermeta um2 ON um2.user_id = u.id AND um2.meta_key = 'last_name' AND um2.meta_value like '%{$searchStrArr[1]}%'\";\n \n }\n \n $membersArr = $this->db->get_results($query, ARRAY_A);\n \n // filter through to weed out any duplicates\n $showArr = array();\n foreach($membersArr as $member) {\n if(!in_array($member['id'], $showArr)) {\n $showArr[] = $member['id'];\n }\n }\n $idStr = implode(\",\", $showArr);\n \n $query = \"SELECT DISTINCT u.id, n.nhc_pin, um1.meta_value AS first_name, um2.meta_value AS last_name, u.user_email, um3.meta_value AS level\n FROM {$this->db->prefix}users AS u\n JOIN {$this->db->prefix}nhc n ON u.id = n.user_id\n JOIN {$this->db->prefix}usermeta um1 ON um1.user_id = u.id AND um1.meta_key = 'first_name'\n JOIN {$this->db->prefix}usermeta um2 ON um2.user_id = u.id AND um2.meta_key = 'last_name'\n JOIN {$this->db->prefix}usermeta um3 ON um3.user_id = u.id AND um3.meta_key = 'member_level'\n WHERE u.id IN ($idStr)\n ORDER BY n.nhc_pin\";\n \n $this->showResults($query, 'search', true);\n }",
"public function _unique_username ($str){\n\t\t// Do NOT validate if email already exists\n\t\t// UNLESS it's the email for the current user\n\t\t\n\t\t$id = $this->session->userdata('id');\n\t\t$this->db->where('username', $this->input->post('username'));\n\t\t!$id || $this->db->where('id !=', $id);\n\t\t$user = $this->user_m->get();\n\t\t\n\t\tif (count($user)) {\n\t\t\t$this->form_validation->set_message('_unique_username', '%s should be unique');\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\treturn TRUE;\n\t}",
"static function checkForUserName($user)\n {\n $users = R::getAll('SELECT * FROM user');\n\n foreach ($users as $u) {\n if ($u['name'] == $user) {\n return true;\n }\n }\n\n return false;\n }",
"function usernameInvalid($username, $ldapServer, $ldapDN, $ldapGeneralUser, $ldapGeneralPassword){\n\t$username = addslashes($username);\t\n\t\n\t//Authenticate in LDAP\n\t$ldap = ldap_connect($ldapServer);\t\n\t$ldapBind = ldap_bind($ldap, $ldapGeneralUser, $ldapGeneralPassword);\n\tif ($ldapBind){\n\t\t$results = ldap_search($ldap, $ldapDN, \"samaccountname=\".$username);\t\t\n\t\t$data = ldap_get_entries($ldap, $results);\t\n\t\t//$data[0] = true;\n\t\t//print_r($username);\t\t\n\t\tif ( $data[0]){\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}",
"function isUsernameUsed($username) {\r\n $users = retrieveUsers(0);\r\n\r\n // Check if username already exist\r\n foreach ($users as $user) {\r\n if($user['username'] == $username) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n}",
"public function username_check($str){\n\t\tif($this->user_model->exist_row_check('username', $str) > 0){\n $this->form_validation->set_error_delimiters('', '');\n\t\t\t$this->form_validation->set_message('username_check', 'Username telah digunakan');\n\t\t\treturn FALSE;\n\t\t}\n\t\telse{\n\t\t\treturn TRUE;\n\t\t}\n\t}",
"public function findUsersBySubstring($substring) {\n $qb = $this->createQueryBuilder('u')\n ->andWhere('u.isActive = 1')\n ->andWhere('u.email IS NOT NULL OR u.anonymousEmail IS NOT NULL')\n ->andWhere('u.email LIKE :string OR u.username LIKE :string OR u.anonymousEmail LIKE :string')\n ->setParameter('string', '%'.$substring.'%')\n ->getQuery();\n $users = $qb->execute();\n $result = array();\n /** @var User $user */\n foreach($users as $user) {\n if($user->getEmail() === null)\n $mail = explode('@', $user->getAnonymousEmail());\n else\n $mail = explode('@', $user->getEmail());\n $email = $mail[0].\"@ ... \";\n $result[] = strtolower($user->getUsername()).\" (\".$email.\")\";\n }\n return $result;\n }",
"private function suggestLoginName($loginName) {\n $loginName = preg_replace('/[\\W_]+/u', '-', strtolower(trim($loginName)));\n //get the entity manager\n $em = $this->getDoctrine()->getManager();\n //get the user repo\n $userRepository = $em->getRepository('ObjectsUserBundle:User');\n //try to check if the given name does not exist\n $user = $userRepository->findOneByLoginName($loginName);\n if (!$user) {\n //valid login name\n return $loginName;\n }\n //get a valid one from the database\n return $userRepository->getValidLoginName($loginName);\n }",
"public abstract function find_users($search);",
"public static function validateUsername($username)\n {\n return preg_match('/^[A-Z0-9]{2,20}$/i', $username);\n }",
"public static function validateUsername($username)\n {\n return preg_match('/^[A-Z0-9]{2,20}$/i', $username);\n }",
"function _isValidUsername($username) {\n\t\treturn ($username && strpos($username, '@') !== false && preg_match('/@.*\\..*$/', $username));\n\t}",
"public static function isValidUserName(string $user) : bool {\n\t\treturn strlen($user) <= 50 && preg_match('/^[a-zA-Z0-9]+$/', $user) === 1;\n\t}",
"protected function testNameExp()\n {\n $exp = '/^([A-Z]+\\s[A-Z]+|[a-z]+\\s[a-z]+)$/';\n\n $names = array(\n 'Bill Smith','BILL SMITH','bILL SMITH',\n 'bill smith','von Richter',\"O'Rielly\",'Greg McReynold','Joe-Schmoe',\n 'JOE berthera',\n 'PRINCE', 'BILLY JOE JNR',\"PETER O'PETERSON\", // Should match but does not\n );\n foreach($names as $name)\n {\n $matched = preg_match($exp,$name);\n if ($matched) echo \"Matched: $name\\n\";\n else echo \"No Match: $name\\n\";\n }\n }",
"function staffNameSearch($sessionID, $name){\r\n\t\t$name = str_replace(' ', '%', $name);\r\n\t\t$results = array();\r\n\t\tfor($i=0; $i<sizeof($name); $i++){\r\n\t\t\t$query = \"SELECT ID, CONCAT(FirstName, ' ', MiddleIn, ' ', LastName) AS FullName FROM users WHERE\r\n\t\t\t\t\tCONCAT(FirstName, ' ', MiddleIn, ' ', LastName) LIKE '%$name%'\";\r\n\t\t\t$result = mysql_query($query);\r\n\t\t\t//Cycles through the rows of $result and puts them into $results in the proper format.\r\n\t\t\tfor($j=0; $thisResult = mysql_fetch_assoc($result); $j++){\r\n\t\t\t\tif(!array_key_exists($thisResult['ID'], $results)){\r\n\t\t\t\t\t$results[$thisResult['ID']] = $thisResult['FullName'];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $results;\r\n\t}",
"public function get_user_by_concat_name($name_lastname){\n $query = $this->db->query(\"\n SELECT k_id_user\n FROM \n user \n WHERE CONCAT_WS(' ', n_name_user, n_last_name_user) \n LIKE '%$name_lastname';\n \");\n return $query->row();\n }",
"function password_matches_username( $ls_username, $ls_password, $link ) {\n\n\t\t$sql = \"SELECT * from `users` WHERE `username` LIKE '$ls_username' AND `password` LIKE '$ls_password'\";\n\n\t\techo 'sql='.$sql;\n\n\t\t$result = mysqli_query( $link, $sql );\n\n\t\tif ( $result ) {\n\n\t\t\techo 'password_matches_username returned a result';\n\n\t\t\tif ( mysqli_num_rows( $result ) > 0 ) {\n\n\t\t\t\techo 'username '.$ls_username . ' and password ' . $ls_password . ' are correct!';\n\n\t\t\t\treturn true; //user should be allowed to log in.\n\n\t\t\t}\n\n\n\t\t}\n\n\t\treturn false;\n\n\t}",
"public function username_check($str) {\n // return FALSE;\n return TRUE;\n }",
"function uname_exists($uname){\n include 'connection.php';\n $query = \"SELECT username FROM admin_users WHERE username = '$uname'\";\n $result = $connection->query($query);\n $rows = $result->num_rows;\n for($i=0; $i<$rows; $i++){\n $result->data_seek($i);\n $row = $result->fetch_array(MYSQLI_ASSOC);\n if($row['username'] == $uname){\n return true;\n }\n else return false;\n }\n}",
"public function check_username(){\n\t\tif(isset($_POST[\"submit\"])){\n\t\t\t$user = $_POST[\"uname\"];\n\t\t\t$query = $this->db->query(\"SELECT * \n\t\t\t\t\t\t\t\t\t\tFROM admin \n\t\t\t\t\t\t\t\t\t\tWHERE username LIKE '$user'\");\n\t\t\treturn $query->num_rows();\n\t\t}\n\t}",
"function hasUsername($formvalues) {\n\t\topenDatabaseConnection();\t\t\n\t\t$usernamequery = \"SELECT * FROM employee WHERE (username='\".$formvalues['username'].\"' OR emailaddress='\".$formvalues['emailaddress'].\"')\";\n\t\t$usernameresult = mysql_query($usernamequery);\n\t\t# handle the query execution error gracefully\n\t\tif (mysql_error() != \"\") {\n\t\t\t# database errors occured\n\t\t\t$error_msg = \"A system error occured, please try again\";\n\t\t}else {\n\t\t\tif (mysql_num_rows($usernameresult) == 0) {\n\t\t\t\t$error_msg = \"\";\n\t\t\t}else{\n\t\t\t\t$error_msg = \"The username <b>'\".$formvalues['username'].\"'</b> or email address <b>'\".$formvalues['emailaddress'].\"'</b> is already in use, please select another one.\";\n\t\t\t}\n\t\t}\n\t\treturn $error_msg;\n\t }",
"public function regexp( Application_Model_User $antaUser, $filters ){\r\t\t\r\t\t$orderBy = implode(\",\", empty($filters->orders)? array(\"date DESC\", \"id_document DESC\",\"position ASC\"):$filters->orders );\r\t\t\r\t\t# create result set object\r\t\t$matches = new Anta_Frog_Matches(); \r\t\t$whereClause = \"\";\r\t\t$binds = array();\r\t\t\r\t\t# 1. filter documents by documents id\r\t\tif( !(empty( $filters->docs ))){\r\t\t\t$whereClause .= \" id_document IN (\".implode(\",\",array_fill( 0, count($filters->docs), \"?\" )).\" ) \";\r\t\t\t$binds = array_merge( $binds, $filters->docs );\r\t\t}\r\t\t\r\t\t# 2. filter documents by document tags\r\t\tif( !(empty( $filters->tags ))){\r\t\t\t$whereClause .= (strlen($whereClause)>0?\"AND \":\"\").\" id_document IN ( \r\t\t\t\tSELECT id_document FROM anta_{$antaUser->username}.`documents_tags` \r\t\t\t\tNATURAL JOIN anta_{$antaUser->username}.`tags` \r\t\t\t\tWHERE id_tag IN (\".implode(\",\",array_fill( 0, count($filters->tags), \"?\" )).\" ) )\";\r\t\t\t$binds = array_merge( $binds, $filters->tags );\r\t\t}\r\t\t\r\t\t$startTime = microtime(true);\r\t\t# get a list of sentences that matches\r\t\t$query = \"\r\t\t\tSELECT SQL_CALC_FOUND_ROWS title, DATE_FORMAT( do.date,'%d/%m/%Y' ) as date, content, position, id_sentence, id_document \r\t\t\tFROM (\r\t\t\t\tSELECT id_document, title, date FROM anta_{$antaUser->username}.documents \r\t\t\t\t\".( strlen( $whereClause )>0?\"WHERE {$whereClause}\":\"\").\"\r\t\t\t\t\r\t\t\t) do\r\t\t\tINNER JOIN anta_{$antaUser->username}.sentences se USING( id_document ) \r\t\t\tWHERE se.content REGEXP ? ORDER BY {$orderBy} LIMIT {$filters->offset},{$filters->limit}\"\r\t\t;\r\t\t\r\t\t$mysqli = Anta_Core::getMysqliConnection();\r\t\t$stmt = $mysqli->query( $query, array_merge( $binds, array($filters->query) ) );\r\t\t\r\t\t\r\t\t\r\t\t// create a list of different document. size property is the number of sentences\r\t\twhile( $row = $stmt->fetchObject() ){\r\t\t\tif( !isset( $matches->documents[ $row->id_document ] ) ){ \r\t\t\t\t$matches->documents[ $row->id_document ] = array(\r\t\t\t\t\t\"title\" => $row->title,\r\t\t\t\t\t\"date\" => $row->date,\r\t\t\t\t\t\"tags\" => Application_Model_DocumentsMapper::getTags( $antaUser, $row->id_document ),\r\t\t\t\t\t\"size\" => Application_Model_SentencesMapper::getNumberOfSentences( $antaUser, $row->id_document )\r\t\t\t\t);\r\t\t\t}\r\t\t\t\r\t\t\t$matches->sentences[ $row->id_sentence ] = new Application_Model_Sentence( $row->id_sentence, $row->content, $row->id_document, $row->position, $row->date );\r\t\t\t\r\t\t}\r\t\t\r\t\t// get total items\r\t\t$stmt = $mysqli->query(\"SELECT FOUND_ROWS() as totalItems\");\r\t\t$matches->totalItems = $stmt->fetchObject()->totalItems;\r\t\t\r\t\t$checkPointA = microtime(true) - $startTime;\r\t\t$startTime = microtime(true);\r\t\t\r\t\t// test, again... find all documents id containing that regexp\r\t\t$stmt = $mysqli->query(\r\t\t\t\"SELECT DISTINCT id_document FROM anta_{$antaUser->username}.documents do\r\t\t\t\tINNER JOIN anta_{$antaUser->username}.sentences se USING( id_document ) \r\t\t\tWHERE se.content REGEXP ? \", array($filters->query)\r\t\t);\r\t\t$ids = array();\r\t\twhile( $row = $stmt->fetchObject() ){\r\t\t\t$ids[] = $row->id_document;\r\t\t}\r\t\t\t\t\t\t\r\t\t\r\t\t// computate tags statistics, top FIVE for each category using filter in id_documents\r\t\tforeach( Application_Model_CategoriesMapper::getAll( $antaUser ) as $category ){\r\t\t\t\r\t\t\t$matches->categories[ $category->content ] = array();\r\t\t\t$query = \"SELECT dt.id_tag, dtd.content, count(distinct dt.`id_document`) AS `number_of_documents`\r\t\t\t\tFROM \r\t\t\t\t\tanta_{$antaUser->username}.documents_tags dt \r\t\t\t\t\t\r\t\t\t\tINNER JOIN\r\t\t\t\t\tanta_{$antaUser->username}.`tags` dtd\r\t\t\t\t\tUSING ( id_tag ) \r\t\t\t\tWHERE id_document IN(\".implode(\",\",$ids).\") AND {$whereClause} \".( strlen( $whereClause )>0? \"AND \":\"\" ).\" id_category = ? \r\t\t\t\tGROUP BY dtd.id_tag ORDER BY `number_of_documents` DESC LIMIT 0,5\";\r\t\t\t\t\r\t\t\t$stmt = $mysqli->query($query, array_merge( $binds,array( $category->id ) ) );\r\t\t\twhile( $row = $stmt->fetchObject() ){\r\t\t\t\t$matches->categories[ $category->content ][ $row->id_tag ] = $row;\r\t\t\t}\r\t\t\r\t\t};\r\t\t$checkPointB = microtime(true) - $startTime;\r\t\techo $checkPointA.\", \".$checkPointB;\r\t\treturn $matches;\r\t\t// \r\t\t\r\t\t\r\t}",
"function username_check($username)\r\n\t{\r\n\t\tif ( $user = $this->generic_model->get_where_single_row('users', array('username' => $username))) \r\n\t\t{\r\n\t\t\t$this->form_validation->set_message('username_check', 'This %s is already registered.');\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\telse { return true; }\t\t\r\n\t}",
"public function validUsername($user)\n {\n $invalidNames = ['god', 'mod', 'modje', 'spot', 'spotje', 'spotmod',\n 'admin', 'drazix', 'moderator', 'superuser', 'supervisor',\n 'spotnet', 'spotnetmod', 'administrator', 'spotweb',\n 'root', 'anonymous', 'spotlite', ];\n\n $validUsername = !in_array(strtolower($user), $invalidNames);\n if ($validUsername) {\n $validUsername = strlen($user) >= 3;\n } // if\n\n return $validUsername;\n }",
"function isValid($username) {\n\treturn !preg_match('/[^a-z0-9.\\-_]/i', $username);\n}",
"function validatePasswordUsername(&$Model, $data, $params) {\r\n\t\tif ($this->settings[$Model->alias]['passwordPolicy'] == 'weak' || !isset($Model->data[$Model->alias][$params[1]])) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t$key = key($data);\r\n\t\t$value = $data[$key];\r\n\t\t$compare = $Model->data[$Model->alias][$params[0]];\r\n\t\t$username = $Model->data[$Model->alias][$params[1]];\r\n\t\tif (strpos($compare, $username) !== false) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"function usernameExists($username)\r\n{\r\n\tglobal $db,$db_table_prefix;\r\n\r\n \tif(returns_result(\"SELECT Active FROM \".$db_table_prefix.\"Users WHERE Username_Clean = '\".$db->sql_escape(sanitize($username)).\"' LIMIT 1\") > 0)\r\n\t\treturn true;\r\n\telse\r\n\t\treturn false;\r\n}",
"public function checkname(){\t\t\n\t\tDB::query(\"select * from webchat_users where `name`='\".DB::esc($this->name).\"'\");\t\t\n\t\treturn DB::getMySQLiObject();\n\t}",
"private function checkAccount($username)\n {\n $this->db->select('username');\n //where $username = username AND email is LIKE '%@ehealth.com'\n $this->db->where('username', $username);\n $this->db->like('email', 'ehealth.com', 'before');\n //from the users table\n $query = $this->db->get('users');\n return $query->result();\n }",
"public static function isUsername (string $username): bool {\n $length = strlen($username);\n return !str_contains($username, '__') && $length >= 4 && $length <= 33 && preg_match('/^@?([a-zA-Z])(\\w{4,31})$/', $username);\n }",
"public function personal_username($full_name){\r\n $random = mt_rand(00000, 99999);\r\n $username = url_title($full_name.$random);\r\n\r\n $query = $this->db->get_where('user', ['khojeko_username' => $username]);\r\n if($query->num_rows() == 0 )\r\n return $username;\r\n else\r\n $this->personal_username($full_name);\r\n }",
"function getUsersLastNameLike($in){\r\n $data=new \\Cars\\Data\\Common($this->app);\r\n return $data->getUsersByLastNameInit($in);\r\n\r\n }",
"function getAllUsersMatching($terms){\n\t\treturn $this->avalanche->getAllUsersMatching($terms);\n\t}",
"public function searchUsers()\n {\n # Set tables to search to a variable.\n $tables = $this->getTables();\n # Set fields to search to a variable.\n $fields = $this->getFields();\n # Set search terms to a variable.\n $search_terms = $this->getSearchTerms();\n # Perform search.\n $this->performSearch($search_terms, $tables, $fields);\n }",
"function check_username(){\n $usernameErr = '';\n if(empty($_POST[\"username\"])){\n $usernameErr = \"Please enter a username\";\n }\n else{\n $username = $_POST['username'];\n if(!preg_match(\"/^[a-zA-Z0-9_]+$/\", $username)) {\n $usernameErr = \"Alpha lower, upper and underscore only for username\";\n }\n else{//username is ok\n $usernameErr = \"ok\";\n }\n }\n return $usernameErr;\n\n}"
] | [
"0.68244237",
"0.6714767",
"0.6496078",
"0.63577366",
"0.6214287",
"0.6056695",
"0.6040509",
"0.6009636",
"0.5998991",
"0.59309703",
"0.5866985",
"0.5843499",
"0.576543",
"0.574847",
"0.5740015",
"0.5717076",
"0.5714146",
"0.57130927",
"0.5698051",
"0.5696463",
"0.5682797",
"0.56823677",
"0.5657922",
"0.56575656",
"0.56507486",
"0.561448",
"0.5603394",
"0.5584968",
"0.55162984",
"0.54956657",
"0.54762334",
"0.5453896",
"0.5452524",
"0.54410154",
"0.54410154",
"0.54248446",
"0.54210407",
"0.54199034",
"0.54108214",
"0.54051834",
"0.54050815",
"0.53868294",
"0.5361482",
"0.5342054",
"0.53333503",
"0.53304094",
"0.5323327",
"0.53148437",
"0.5301775",
"0.5295357",
"0.5282738",
"0.52585965",
"0.52505517",
"0.5241877",
"0.5236672",
"0.5235428",
"0.52297974",
"0.52243984",
"0.5220295",
"0.5217495",
"0.52122325",
"0.52038944",
"0.5202803",
"0.519153",
"0.5188192",
"0.5183244",
"0.51825243",
"0.5179326",
"0.5175755",
"0.5175289",
"0.51691025",
"0.51591706",
"0.5156871",
"0.514632",
"0.5141227",
"0.5141227",
"0.5139947",
"0.51379037",
"0.51343083",
"0.5134177",
"0.51319474",
"0.51272404",
"0.51265645",
"0.51253855",
"0.51242656",
"0.51112044",
"0.5104253",
"0.51038754",
"0.5101851",
"0.5094357",
"0.5094228",
"0.5089127",
"0.5083664",
"0.5082985",
"0.5082173",
"0.5066766",
"0.50654346",
"0.505611",
"0.50539124",
"0.5053448"
] | 0.63068175 | 4 |
Alias for getUsernameColumnName for backwards compatibility. | private function getColumn(): string
{
return $this->getUsernameColumnName();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getUsernameColumnName(): string\n {\n return $this->usernameColumn ?? $this->getModelGeneratorConfig()->getConfig('column', 'username');\n }",
"public function getColumnName();",
"public function getFrontEndUserGroupColumnName() {}",
"public function column_username($user)\n {\n }",
"public function column_name($user)\n {\n }",
"abstract function getProfileColumnName($field_name);",
"public function getColumnName()\n {\n return $this->columnName;\n }",
"public function getColumnName() {\n return $this->columnName;\n }",
"public function getNameColumn()\n {\n return $this->nameColumn;\n }",
"public function username()\n {\n return backpack_authentication_column();\n }",
"abstract public static function get_column_name(): string;",
"protected function getUuidColumnName() {\n\n $uuidColumn = null;\n\n if ( ! $this->uuidFieldName ) {\n\n $this->initializeHasUuid();\n }\n\n return $this->uuidFieldName;\n }",
"protected function getSkuColumnName()\n {\n return $this->skuColumnName;\n }",
"protected static function column_name(): mixed\n\t{\n\t\treturn self::$query->column_name;\n\t}",
"public function getCreatorColumnName() {}",
"protected function getColumnName($alias)\n {\n return $this->aliases[$alias] ?? $alias;\n }",
"public static function username() {\n return 'user_id';\n }",
"function GetUserNameField($table = \"\")\n{\n\tglobal $cUserNameField;\n\treturn $cUserNameField;\n}",
"public function ensureColumnName(string $name): string;",
"public function getConstantColumnName()\n { if ($this->getPeerName()) {\n return strtoupper($this->getPeerName());\n }\n\n return strtoupper($this->getName());\n }",
"protected function getStaticDatabaseColumnName() {\r\n return self::$_databaseColumnName;\r\n }",
"protected function getStaticDatabaseColumnName() {\r\n return self::$_databaseColumnName;\r\n }",
"protected function getStaticDatabaseColumnName() {\r\n return self::$_databaseColumnName;\r\n }",
"protected function getStaticDatabaseColumnName() {\r\n return self::$_databaseColumnName;\r\n }",
"public function getName()\n {\n return $this['column_name'];\n }",
"public function get_username($colum, $table){\n\t\t$this->runQuery('SELECT ' . $column . ' FROM ' . $table . ' WHERE pkID = \"' . $_SESSION['userID'] . '\"');\n\t\t$row = $this->getResult();\n\t\t$this->name = $row['' . $column. ''];\n\t\treturn $this;\n\t\t\n\t}",
"public function getUserName() {}",
"public function getUsername();",
"public function getUsername();",
"public function getUsername();",
"public function getUsername();",
"public function getUsername();",
"public function loginUsername()\n {\n return property_exists($this, 'username') ? $this->username : 'email';\n }",
"public function getUserName();",
"public function getTranslationOriginColumnName() {}",
"public function getSearchColumnName()\n {\n return $this->searchColumnName;\n }",
"public function getEmailColumn()\n {\n\n return $this->getProfileColumnName('email');\n }",
"public function getUsername() {}",
"public function quoteSimpleColumnName(string $name): string;",
"public function getUsername() {\n }",
"public function referenceColumnName();",
"public function getNameOrUsername() {\n return $this->getName() ? : $this->username;\n }",
"public function quoteColumnName($columnName);",
"public function getUsername()\n {\n return $this->wrapped->getUsername();\n }",
"public function GetUserName ();",
"public function getUsername()\n {\n return $this->get(self::_USERNAME);\n }",
"public function username() {\n return $this->db['username'];\n }",
"public function getUsername(): string;",
"public function getName()\n {\n return parent::getUsername();\n }",
"protected function username()\n {\n return 'username';\n }",
"public function getUsername()\n {\n }",
"public function getUsername()\n {\n }",
"function username(){\n return strtolower($this->user->username);\n }",
"public function getNameOrUsername() {\n return $this->getName() ?: $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->nickname;\n }",
"public function get_username() {\n\t\t//$login_results = DB::query(\"Select id, userid, user_ip, user_ip_2, last_action FROM logins\");\n\t\t$table = $this->getTableFormat(\"users\");\n\t\t$username = DB::queryFirstField(\"SELECT username FROM $table WHERE username=%i\", $this->userid);\n\t\treturn $username;\n\n\t}",
"public function username()\n {\n return 'username';\n }",
"public function username()\n {\n return 'username';\n }",
"public function username()\n {\n return 'username';\n }",
"public function username()\n {\n return 'username';\n }",
"public function getUserName()\n {\n return $this->getUserAttribute(static::ATTRIBUTE_NAME);\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"protected function setName()\n {\n return self::$tbl_user;\n }",
"public function extractColumnName($column);",
"public function getFacebookUidColumn()\n {\n\n return $this->getProfileColumnName('facebook_uid');\n }",
"public function getUsername(): string\n {\n return (string) $this->login;\n }",
"public function getUsername(): string\n {\n return (string) $this->login;\n }"
] | [
"0.833809",
"0.74434745",
"0.68835133",
"0.68434656",
"0.6806118",
"0.6771873",
"0.67511886",
"0.67086375",
"0.6689292",
"0.665468",
"0.6491683",
"0.64727765",
"0.6428062",
"0.640624",
"0.63698393",
"0.63567996",
"0.635169",
"0.6328611",
"0.6318929",
"0.6293386",
"0.62755406",
"0.62755406",
"0.62755406",
"0.62755406",
"0.62419635",
"0.6210664",
"0.62092364",
"0.61669743",
"0.61669743",
"0.61669743",
"0.61669743",
"0.61669743",
"0.61584145",
"0.6157173",
"0.6150715",
"0.61501914",
"0.61498284",
"0.61356384",
"0.6119126",
"0.61176246",
"0.6109459",
"0.60914445",
"0.6083401",
"0.6082458",
"0.6064154",
"0.6047539",
"0.60426545",
"0.6036454",
"0.6035955",
"0.6029854",
"0.6012069",
"0.6012069",
"0.59968996",
"0.59806144",
"0.59802747",
"0.59739405",
"0.5970769",
"0.5970769",
"0.5970769",
"0.5970769",
"0.5962256",
"0.59580344",
"0.59580344",
"0.59580344",
"0.59580344",
"0.59580344",
"0.59580344",
"0.59580344",
"0.59580344",
"0.59580344",
"0.59580344",
"0.59580344",
"0.59580344",
"0.59580344",
"0.59580344",
"0.59580344",
"0.59580344",
"0.59580344",
"0.59580344",
"0.59580344",
"0.59580344",
"0.59580344",
"0.59580344",
"0.59580344",
"0.59580344",
"0.59580344",
"0.59580344",
"0.59580344",
"0.59580344",
"0.59580344",
"0.59580344",
"0.59580344",
"0.59580344",
"0.59580344",
"0.59580344",
"0.59546643",
"0.59519315",
"0.59425473",
"0.59422845",
"0.59422845"
] | 0.79381543 | 1 |
Get the username column name. | public function getUsernameColumnName(): string
{
return $this->usernameColumn ?? $this->getModelGeneratorConfig()->getConfig('column', 'username');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function getColumn(): string\n {\n return $this->getUsernameColumnName();\n }",
"public function username()\n {\n return backpack_authentication_column();\n }",
"public static function username() {\n return 'user_id';\n }",
"public function username() {\n return $this->db['username'];\n }",
"public function get_username() {\n\t\t//$login_results = DB::query(\"Select id, userid, user_ip, user_ip_2, last_action FROM logins\");\n\t\t$table = $this->getTableFormat(\"users\");\n\t\t$username = DB::queryFirstField(\"SELECT username FROM $table WHERE username=%i\", $this->userid);\n\t\treturn $username;\n\n\t}",
"public function column_username($user)\n {\n }",
"public function getUserName()\n {\n return $this->getUserAttribute(static::ATTRIBUTE_NAME);\n }",
"public function getUserName()\n {\n return $this->formattedData['username'];\n }",
"public function getNameColumn()\n {\n return $this->nameColumn;\n }",
"public function column_name($user)\n {\n }",
"public function getUsername()\n {\n return $this->get(self::_USERNAME);\n }",
"public function getUserNameIdentifier()\n {\n return $this->user_name;\n }",
"public function getUsername()\n {\n return $this->getName();\n }",
"public function username(){\n \treturn $this->users->name.' '.$this->users->ape;\n }",
"public function getNameOrUsername() {\n return $this->getName() ? : $this->username;\n }",
"protected static function column_name(): mixed\n\t{\n\t\treturn self::$query->column_name;\n\t}",
"public function getUserName()\n {\n return $this->user_name;\n }",
"public function getName()\n {\n return $this['column_name'];\n }",
"public function getUserName() {\n if (isset($this->rUser)) {\n return $this->rUser->getFullName();\n }\n return '';\n }",
"public function name()\n\t{\n\t\treturn User::info('Username');\n\t}",
"public function getUsername() {\n return $this->getValue('username');\n }",
"public function getUserName() {\n\t\treturn ($this->userName);\n\t}",
"function getUserName() {\n\t\treturn $this->nickname;\n\t\t/*\n\t\tif(!$this->user_name) {\n\t\t\t$this->sql(\"SELECT nickname FROM \".UT_USE.\" WHERE id = \".$this->user_id);\n\t\t\t$this->user_name = $this->getQueryResult(0, \"nickname\");\n \t\t}\n\t\treturn $this->user_name;\n\t\t*/\n\t}",
"public function loginUsername()\n {\n return property_exists($this, 'username') ? $this->username : 'email';\n }",
"public function getUserName() : string\n {\n return $this->userName;\n }",
"public function getUserName() : string\n {\n return $this->userName;\n }",
"public function getUserName()\n {\n return $this->getName();\n }",
"public static function username()\n {\n $username = self::variable(self::USERNAME);\n\n return $username;\n }",
"public function getUsername()\n {\n return $this->getUserIdentifier();\n }",
"public function getColumnName();",
"public function getUserName() {\n\t\tif(($username=$this->getState('__username'))!==null) return $username;\n\t\telse return NULL;\n\t}",
"public function getUsername()\n {\n return $this->wrapped->getUsername();\n }",
"public function getUsername()\n\t{\n\t\treturn $this->{config('auth.username.field')};\n\t}",
"protected function username()\n {\n return 'username';\n }",
"public function getUserName()\r\n {\r\n return $this->user->username;\r\n }",
"public function getUsername()\n {\n return $this->getLogin();\n }",
"public function getUserName()\n {\n return $this->user->name;\n }",
"public function getUsername(): string\n {\n return (string) $this->login;\n }",
"public function getUsername(): string\n {\n return (string) $this->login;\n }",
"public function getUsername(): string\n {\n return (string) $this->login;\n }",
"public function getUsername(): string\n {\n return (string) $this->login;\n }",
"public function getFrontEndUserGroupColumnName() {}",
"public function getUsername()\r\n\t{\r\n\t\treturn $this->admin['user'];\r\n\t}",
"public function getNameOrUsername() {\n return $this->getName() ?: $this->username;\n }",
"public function getUserName()\n {\n return $this->userName;\n }",
"public function getUserName()\n {\n return $this->userName;\n }",
"public function getUsername(): string\n {\n return $this->username;\n }",
"public function getUsername(): string\n {\n return $this->username;\n }",
"public function getUsername(): string\n {\n return $this->username;\n }",
"public function getUserName() {\n\t\treturn $this->userName;\n\t}",
"public function getUserName() {\n\t\treturn $this->userName;\n\t}",
"public function username()\n {\n return 'username';\n }",
"public function username()\n {\n return 'username';\n }",
"public function username()\n {\n return 'username';\n }",
"public function username()\n {\n return 'username';\n }",
"public function getUsername()\n {\n return (string) $this->username;\n }",
"public function userName()\n {\n return $this->bean->user()->name();\n }",
"public function getUserName() {\n return $this->userName;\n }",
"public function getUsername()\n {\n return empty($this->username) ? 'anonymous' : $this->username;\n }",
"public function getUserName()\n {\n return substr($this->email, 0, strpos($this->email, '@'));\n }",
"public function getUserName()\n {\n if (array_key_exists(\"userName\", $this->_propDict)) {\n return $this->_propDict[\"userName\"];\n } else {\n return null;\n }\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername()\n {\n return $this->company_id.'+'.$this->username;\n }",
"public function getuserName()\n {\n return $this->userName;\n }",
"public function getUserUsername () {\n\t\treturn ($this->userUsername);\n\t}",
"public function username(){\n return 'user_name';\n }",
"public function getUsername(): string {\n return $this->username;\n }"
] | [
"0.8438552",
"0.77026516",
"0.7644313",
"0.7595003",
"0.74217266",
"0.73610795",
"0.73353124",
"0.7290394",
"0.7233597",
"0.71988547",
"0.71946585",
"0.7169115",
"0.71624476",
"0.71230555",
"0.70969915",
"0.70937234",
"0.7084786",
"0.70772237",
"0.7074892",
"0.7073811",
"0.7053503",
"0.70522165",
"0.704526",
"0.7030782",
"0.70285785",
"0.70285785",
"0.70071",
"0.7004635",
"0.70026165",
"0.7001045",
"0.6996157",
"0.69956374",
"0.6986999",
"0.69733745",
"0.69697803",
"0.69548124",
"0.6951181",
"0.6945632",
"0.6945632",
"0.6945632",
"0.6945632",
"0.6943624",
"0.69409686",
"0.6938047",
"0.693708",
"0.693708",
"0.6922247",
"0.6922247",
"0.6922247",
"0.691674",
"0.691674",
"0.6915954",
"0.6915954",
"0.6915954",
"0.6915954",
"0.69157284",
"0.6905536",
"0.6893617",
"0.688737",
"0.68869585",
"0.6886643",
"0.6886387",
"0.6886387",
"0.6886387",
"0.6886387",
"0.6886387",
"0.6886387",
"0.6886387",
"0.6886387",
"0.6886387",
"0.6886387",
"0.6886387",
"0.6886387",
"0.6886387",
"0.6886387",
"0.6886387",
"0.6886387",
"0.6886387",
"0.6886387",
"0.6886387",
"0.6886387",
"0.6886387",
"0.6886387",
"0.6886387",
"0.6886387",
"0.6886387",
"0.6886387",
"0.6886387",
"0.6886387",
"0.6886387",
"0.6886387",
"0.6886387",
"0.6886387",
"0.6886387",
"0.6886387",
"0.68848413",
"0.68788636",
"0.6878816",
"0.6877189",
"0.68709254"
] | 0.879286 | 0 |
Get the username separator. | private function getSeparator(): string
{
return $this->getModelGeneratorConfig()->getConfig('separator', '');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getUsername() : string\n {\n return explode(':', $this->uri->getUserInfo() ?: '')[0];\n }",
"public function getUsername()\n {\n return $this->company_id.'+'.$this->username;\n }",
"public function getSeparatorCharacter()\n\t{\n\t\treturn '_';\n\t}",
"public function getUsername(): string\n {\n return (string) $this->pseudo;\n }",
"public function separator(): string;",
"private function retrieve_sep() {\n\t\treturn WPSEO_Utils::get_title_separator();\n\t}",
"public function username(){\n \treturn $this->users->name.' '.$this->users->ape;\n }",
"public function getSeparator();",
"public function getUsername(): string\n {\n return (string) $this->login;\n }",
"public function getUsername(): string\n {\n return (string) $this->login;\n }",
"public function getUsername(): string\n {\n return (string) $this->login;\n }",
"public function getUsername(): string\n {\n return (string) $this->login;\n }",
"public function getUsername(): string\n {\n return (string) $this->nickname;\n }",
"public function username(): string\n\t{\n\t\treturn \"username\";\n\t}",
"public function username() {\n if ($this->proxy_user)\n return $this->proxy_user;\n\n return '';\n }",
"public static function username() {\n return 'user_id';\n }",
"public static function username()\n {\n $username = self::variable(self::USERNAME);\n\n return $username;\n }",
"public function getUsername(): string\n {\n return $this->getCorreo();\n }",
"public function getUsername()\n {\n return $this->getLogin();\n }",
"public function getAutoCompleteUserName() {\n// $retVal = $this->username;\n// if (!empty($this->last_name)) {\n// $retVal .= ' - ' . $this->last_name;\n// }\n// if (!empty($this->first_name)) {\n// $retVal .= ' ' . $this->first_name;\n// }\n $arr = array(\n $this->getFullName(),\n $this->getRoleName(),\n $this->getAgentName(),\n );\n $retVal = implode(' - ', $arr);\n\n return $retVal;\n }",
"public function getSeparator()\n {\n return $this->separator;\n }",
"public function getSeparator()\n {\n return $this->separator;\n }",
"protected function username()\n {\n return 'username';\n }",
"public function getUserName()\n {\n return $this->formattedData['username'];\n }",
"public function getUserName()\n {\n return substr($this->email, 0, strpos($this->email, '@'));\n }",
"public function getUsername() {\n // TODO: Implement getUsername() method.\n return $this->getLogin();\n }",
"public function getUsername(): string\n {\n return $this->username;\n }",
"public function getUsername(): string\n {\n return $this->username;\n }",
"public function getUsername(): string\n {\n return $this->username;\n }",
"public function getNameOrUsername() {\n return $this->getName() ? : $this->username;\n }",
"public function getUsername()\n {\n return $this->getNickname();\n }",
"public function getUserOrProperName()\n {\n $person = $this->getPerson();\n if (strtolower($person->getEmail()) != strtolower($this->username)) {\n return $this->username;\n } else {\n $init = substr($person->getFirstname(), 0, 1);\n return \"{$init}. {$person->getLastname()}\";\n }\n }",
"public function getFieldsSeparator();",
"public function getUsername()\n {\n return $this->get(self::_USERNAME);\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function getUsername(): string\n {\n return (string) $this->username;\n }",
"public function get_username() {\n\t\t//$login_results = DB::query(\"Select id, userid, user_ip, user_ip_2, last_action FROM logins\");\n\t\t$table = $this->getTableFormat(\"users\");\n\t\t$username = DB::queryFirstField(\"SELECT username FROM $table WHERE username=%i\", $this->userid);\n\t\treturn $username;\n\n\t}",
"public function getUserName() : string\n {\n return $this->userName;\n }",
"public function getUserName() : string\n {\n return $this->userName;\n }",
"public function getSeparator() {\n return $this->_separator;\n }",
"function cjpopups_create_unique_username($user_login_string, $separator = '', $first = 1){\n\tif(strpos($user_login_string, '@')){\n\t $user_login = explode('@', $user_login_string);\n\t $user_login = $user_login[0];\n }else{\n \t$user_login = str_replace('-', '_', sanitize_title($user_login_string));\n }\n if(!username_exists($user_login)){\n return $user_login;\n }else{\n preg_match('/(.+)'.$separator.'([0-9]+)$/', $user_login, $match);\n $new_user_login = isset($match[2]) ? $match[1].$separator.($match[2] + 1) : $user_login.$separator.$first;\n if(!username_exists( $new_user_login )){\n \treturn $new_user_login;\n }else{\n \treturn cjpopups_create_unique_username($new_user_login, $separator = '', $first = 1);\n }\n }\n}",
"public function getUsername()\n {\n return $this->login;\n }",
"public function getUsername()\n {\n return $this->login;\n }",
"public function getUsername();",
"public function getUsername();",
"public function getUsername();",
"public function getUsername();",
"public function getUsername();",
"public function getSeparator()\n {\n return $this->_sSeparator;\n }",
"public function getUsername(): string {\n return $this->username;\n }",
"public function getSeparator()\n {\n return $this->getOption('separator');\n }",
"public function getSeparator()\n\t{\n\t\treturn $this->_separator;\n\t}",
"public function getUsername()\n {\n return empty($this->username) ? 'anonymous' : $this->username;\n }",
"public function getFullName()\n {\n if (! $this->_getVar('user_name')) {\n $name = ltrim($this->_getVar('user_first_name') . ' ') .\n ltrim($this->_getVar('user_surname_prefix') . ' ') .\n $this->_getVar('user_last_name');\n\n if (! $name) {\n // Use obfuscated login name\n $name = $this->getLoginName();\n $name = substr($name, 0, 3) . str_repeat('*', max(5, strlen($name) - 2));\n }\n\n $this->_setVar('user_name', $name);\n\n // \\MUtil_Echo::track($name);\n }\n\n return $this->_getVar('user_name');\n }",
"function getUserName() {\n return $this->userName . \".guest\";\n }",
"public function getUsername() {}",
"function get_username()\n\t{\n\t\t$username = explode('/',$_SERVER['PHP_SELF']);\n\t\t$username = explode('.',$username[$this->uri_segment]);\n\t\treturn $this->username = $username[0];\n\t}",
"public function getUsername(): string\n {\n return (string)$this->username;\n }",
"public function getUsername(): string\n {\n return (string)$this->username;\n }",
"public function loginUsername()\n {\n return 'username';\n }",
"public function loginUsername()\n {\n return 'username';\n }",
"public function getUsername()\n {\n return (string) $this->username;\n }",
"Public Function getUserName()\n\t{\n\t\treturn $this->firstName . ' ' . $this->lastName;\n\t}",
"public function username()\n {\n return 'username';\n }",
"public function username()\n {\n return 'username';\n }",
"public function username()\n {\n return 'username';\n }",
"public function username()\n {\n return 'username';\n }",
"protected function getUniqueIdentifierSeparator(): string\n {\n return '-';\n }",
"public function get_strUsername()\n {\n return $this->strUsername;\n }"
] | [
"0.6888869",
"0.6585118",
"0.6571701",
"0.6551361",
"0.65278155",
"0.6439287",
"0.6417153",
"0.6412697",
"0.63857436",
"0.63857436",
"0.63857436",
"0.63857436",
"0.63692605",
"0.62867004",
"0.6280606",
"0.62644374",
"0.6253215",
"0.6227347",
"0.6221849",
"0.62177336",
"0.61959004",
"0.61959004",
"0.6189902",
"0.6184349",
"0.6181932",
"0.6173828",
"0.61476916",
"0.61476916",
"0.61476916",
"0.6145791",
"0.6140723",
"0.6130525",
"0.61173934",
"0.6107629",
"0.6106605",
"0.6106605",
"0.6106605",
"0.6106605",
"0.6106605",
"0.6106605",
"0.6106605",
"0.6106605",
"0.6106605",
"0.6106605",
"0.6106605",
"0.6106605",
"0.6106605",
"0.6106605",
"0.6106605",
"0.6106605",
"0.6106605",
"0.6106605",
"0.6106605",
"0.6106605",
"0.6106605",
"0.6106605",
"0.6106605",
"0.6106605",
"0.6106605",
"0.6106605",
"0.6106605",
"0.6106605",
"0.6106605",
"0.6106605",
"0.6106605",
"0.6106605",
"0.6106605",
"0.6106605",
"0.6104352",
"0.60984313",
"0.60984313",
"0.6091676",
"0.6085986",
"0.60831803",
"0.60831803",
"0.6083022",
"0.6083022",
"0.6083022",
"0.6083022",
"0.6083022",
"0.6082556",
"0.60809565",
"0.6076828",
"0.6076327",
"0.60751987",
"0.60667866",
"0.6063412",
"0.6048226",
"0.60450745",
"0.6005579",
"0.6005579",
"0.6001968",
"0.6001968",
"0.59995806",
"0.5997284",
"0.5995733",
"0.5995733",
"0.5995733",
"0.5995733",
"0.5989811",
"0.59808767"
] | 0.0 | -1 |
Get the model specific generator config. Since a model could extend the GeneratesUsernames trait, we need to check if it has any specific config that would change the behaviour of this trait. Eventually will deprecate the generatorConfig and change it to simply return an array that will then be passed to the generator. | private function getModelGeneratorConfig(): Generator
{
$generator = new Generator();
if (method_exists($this, 'generatorConfig')) {
$this->generatorConfig($generator);
}
return $generator;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getGeneratorConfig()\n {\n return $this->database->getGeneratorConfig();\n }",
"protected function coreGenerators()\n {\n return [\n 'ultimate' => ['class' => 'dlds\\giixer\\generators\\ultimate\\Generator'],\n 'model' => ['class' => 'dlds\\giixer\\generators\\model\\Generator'],\n 'crud' => ['class' => 'dlds\\giixer\\generators\\crud\\Generator'],\n 'module' => ['class' => 'yii\\gii\\generators\\module\\Generator'],\n 'extension' => ['class' => 'yii\\gii\\generators\\extension\\Generator'],\n ];\n }",
"protected function getIndexerConfigurationGenerator() {\n\t\t$this->showProgressMessage('Going to get indexing configurations.');\n\t\t$configGenerator = t3lib_div::makeInstance('tx_mnogosearch_configgenerator');\n\t\t/* @var $configGenerator tx_mnogosearch_configgenerator */\n\t\t$configGenerator->setCommandLineOptions($this->commandLineOptions);\n\t\treturn $configGenerator;\n\t}",
"public function getConfig()\n {\n return $this->traitGetConfig();\n }",
"protected function getGeneratorConfigPath(): string\n {\n if (null === $this->genConfigPath) {\n\n /**\n * @var $container LightServiceContainerInterface\n */\n $container = $this->getContextVar(\"container\");\n $appDir = $container->getApplicationDir();\n $planet = $this->getContextVar(\"planet\");\n $galaxy = $this->getContextVar(\"galaxy\");\n $planetDir = $this->getContextVar(\"planetDir\");\n $createFile = $this->getContextVar(\"createFile\");\n $tablePrefix = DeveloperWizardGenericHelper::getTablePrefix($planetDir, $createFile);\n $this->genConfigPath = $appDir . \"/config/data/$galaxy.$planet/Ling.Light_BreezeGenerator/$tablePrefix.generated.byml\";\n }\n return $this->genConfigPath;\n }",
"private function getConfigPath()\n {\n return config_path('generators.php');\n }",
"public function getModelsConfiguration()\n {\n $ret = NULL;\n if ($this->_configuredModels) {\n return ModelConfiguration::getFrontendConfigForModels($this->_configuredModels, $this->_applicationName);\n }\n \n return $ret;\n }",
"public function getGenerator()\n {\n return $this->generator;\n }",
"public function getAppConfig()\n {\n return [\n 'authentication' => [\n 'default_redirect_to' => '/',\n ],\n 'view_helpers' => [\n 'aliases' => [\n 'isUser' => Helper\\IsUser::class,\n 'sanitizeHtml' => Helper\\SanitizeHtml::class,\n ],\n 'factories' => [\n Helper\\IsUser::class => Helper\\IsUserFactory::class,\n Helper\\SanitizeHtml::class => InvokableFactory::class,\n ],\n ],\n ];\n }",
"public function generator()\n {\n return $this->generator;\n }",
"public function getGeneratorParameters() {\r\n\t\t$this->initGeneratorParameters();\r\n\t\treturn $this->generator_parameters->getParameters();\r\n\t}",
"public function getDependencyConfig()\n {\n return [\n 'delegators' => [\n \\Mezzio\\Application::class => [\n \\Mezzio\\Container\\ApplicationConfigInjectionDelegator::class,\n ],\n ],\n 'factories' => [\n AuthenticationMiddleware::class =>\n AuthenticationMiddlewareFactory::class,\n LoginPageAction::class => LoginPageFactory::class,\n UserTableAuthentication::class =>\n UserAuthenticationFactory::class,\n Middleware\\WhoopsErrorResponseGenerator::class =>\n Container\\WhoopsErrorResponseGeneratorFactory::class,\n SanitizeHtml::class => InvokableFactory::class,\n /*\n * Register a class that will handle the user authentication.\n * The one registered here provides only a\n generic sample implementation\n * and is not meant to be taken seriously.\n *\n * UserTableAuthentication::class =>\n UserAuthenticationFactory::class,\n * */\n ],\n 'aliases' => [\n UserAuthenticationInterface::class => UserTableAuthentication::class,\n /*\n * This is a sample setup whereby the specific\n implementation is never\n * referenced anywhere in the codebase, instead\n using a generic alias.\n *\n * UserAuthenticationInterface::class =>\n UserTableAuthentication::class\n * */\n ],\n ];\n }",
"public function pathAndValuesDataProvider(): ?\\Generator\n {\n yield ['config.custom/models_namespace', 'Models'];\n yield ['config.custom/path.a.b.c.d', \"true\"];\n yield ['config.hashing/bcrypt.rounds', \"50\"];\n yield ['config.hashing/argon.memory', \"2048\"];\n yield ['config.app/name', 'newName'];\n yield ['config.app/env', 'alpha'];\n // one more time\n yield ['config.app/name', 'Gregory'];\n yield ['config.app/env', 'delta'];\n }",
"protected function generateBreezeConfig()\n {\n\n $genConfPath = $this->getGeneratorConfigPath();\n $this->infoMessage(\"Creating generator conf file in $genConfPath.\");\n\n $galaxy = $this->getContextVar(\"galaxy\");\n $planet = $this->getContextVar(\"planet\");\n $createFile = $this->getContextVar(\"createFile\");\n\n $prefixes = $this->getTablePrefixes();\n $mainPrefix = array_shift($prefixes);\n\n\n DeveloperWizardBreezeGeneratorHelper::spawnConfFile($genConfPath, [\n \"galaxyName\" => $galaxy,\n \"planetName\" => $planet,\n \"createFilePath\" => $createFile,\n \"prefix\" => $mainPrefix,\n \"otherPrefixes\" => $prefixes,\n ]);\n return null;\n }",
"protected function _getConfig()\n {\n return Mage::getSingleton('customgrid/column_renderer_config_collection');\n }",
"public function getGenerator()\n\t{\n\t\treturn $this->_generator;\n\t}",
"protected function _getConfigModel()\n {\n if (!$this->hasConfigModel()) {\n $this->setConfigModel(Mage::getConfig());\n }\n\n return $this->getConfigModel();\n }",
"protected function _getConfig()\n {\n return $this->_vendor;\n }",
"protected function getModelConfiguration()\n {\n return app('sleeping_owl')->getModel(get_class($this->getModel()));\n }",
"public function setGeneratorConfig(GeneratorConfigInterface $config);",
"public function _getConfigModel()\n {\n return Mage::getModel(self::CONFIG);\n }",
"protected abstract static function getConfig(): array;",
"private function getConfigModel()\n {\n return Mage::getSingleton('wallee_payment/system_config');\n }",
"public function getGenerator();",
"public function getGenerator();",
"public function getConfig()\n {\n $provider = new ConfigProvider();\n return [\n 'service_manager' => $provider->getDependencyConfig(),\n ];\n }",
"public function getConfig()\n {\n $provider = new ConfigProvider();\n return [\n 'service_manager' => $provider->getDependencyConfig(),\n ];\n }",
"public static function getUserModel(): string\n {\n return config('laravel-server-analytics.user_model');\n }",
"public function getConfiguration()\n {\n return self::$config_array;\n }",
"public function getConfig()\n {\n $template = $this->getGiftCardTemplate();\n $config = [\n 'text' => $this->getOptions('text'),\n 'size' => $this->getOptions('size'),\n 'color' => $this->getOptions('color'),\n 'image' => $this->getOptions('image'),\n 'design' => $template->getDesign(),\n 'name' => $template->getName(),\n 'store_id' => $template->getStoreId(),\n 'action' => $this->getActions(),\n 'formKey' => $this->formKey->getFormKey(),\n 'imageList' => $this->getImageList(),\n 'template_id' => $this->getTemplateId(),\n ];\n return $config;\n }",
"private function getGiftOptionsConfigJson()\n {\n return $this->configProvider->getConfig();\n }",
"public function getBuilderConfig()\n {\n return $this->builder_config;\n }",
"function getGenerator() {\n\n /** @var \\DOMAttr $elem */\n $elem=$this->queryAll(\"wadl:doc/@*[local-name()='generatedBy']\")->item(0);\n return $elem instanceof \\DOMAttr?[$elem->prefix,$elem->namespaceURI,$elem->value]:false;\n }",
"private function generateConfig()\n {\n if ('' == $this->config->getName()) {\n throw new \\InvalidArgumentException('No module name given');\n }\n $target = sprintf(\n '%s/app/code/%s/%s/%s/etc/config.xml',\n $this->config->getPath(),\n $this->config->getCodePool(),\n $this->config->getNamespace(),\n $this->config->getName() \n );\n \n $this->renderFile($this->skeletonDir, 'config.xml', $target, array(\n 'config' => $this->config,\n ));\n \n \n $target = sprintf(\n '%s/app/etc/modules/%s_%s.xml',\n $this->config->getPath(),\n $this->config->getNamespace(),\n $this->config->getName() \n );\n \n $this->renderFile($this->skeletonDir, 'Module.xml', $target, array(\n 'config' => $this->config,\n )); \n }",
"public function model()\n {\n return Config::class;\n }",
"protected function getConfigHelper()\n {\n return $this->_configHelper;\n }",
"public function getImageGenerators(): Collection\n {\n return collect(config('medialibrary.image_generators'));\n }",
"public function getViewHelperConfig()\n {\n return [\n 'invokables' => [\n 'applicationCalendar' => 'Application\\View\\Helper\\ApplicationCalendar',\n 'applicationSetting' => 'Application\\View\\Helper\\ApplicationSetting',\n 'applicationRoute' => 'Application\\View\\Helper\\ApplicationRoute',\n 'applicationRandId' => 'Application\\View\\Helper\\ApplicationRandId',\n 'applicationDate' => 'Application\\View\\Helper\\ApplicationDate',\n 'applicationHumanDate' => 'Application\\View\\Helper\\ApplicationHumanDate',\n 'applicationIp' => 'Application\\View\\Helper\\ApplicationIp',\n 'applicationFileSize' => 'Application\\View\\Helper\\ApplicationFileSize'\n ],\n 'factories' => [\n 'applicationBooleanValue' => function() {\n return new \\Application\\View\\Helper\\ApplicationBooleanValue($this->serviceLocator->get('Translator'));\n },\n 'applicationAdminMenu' => function() {\n $adminMenu = $this->serviceLocator\n ->get('Application\\Model\\ModelManager')\n ->getInstance('Application\\Model\\ApplicationAdminMenu');\n\n return new \\Application\\View\\Helper\\ApplicationAdminMenu($adminMenu->getMenu());\n },\n 'applicationFlashMessage' => function() {\n $flashMessenger = $this->serviceLocator\n ->get('ControllerPluginManager')\n ->get('flashMessenger');\n \n $messages = new \\Application\\View\\Helper\\ApplicationFlashMessage();\n $messages->setFlashMessenger($flashMessenger);\n \n return $messages;\n },\n 'applicationConfig' => function() {\n return new \\Application\\View\\Helper\\ApplicationConfig($this->serviceLocator->get('config'));\n },\n ]\n ];\n }",
"public function getConfig() {\r\n\r\n\t}",
"public function getDependencyConfig()\n {\n return [\n // Legacy Zend Framework aliases\n 'aliases' => [\n \\Zend\\Paginator\\AdapterPluginManager::class => AdapterPluginManager::class,\n \\Zend\\Paginator\\ScrollingStylePluginManager::class => ScrollingStylePluginManager::class,\n ],\n 'factories' => [\n AdapterPluginManager::class => AdapterPluginManagerFactory::class,\n ScrollingStylePluginManager::class => ScrollingStylePluginManagerFactory::class,\n ],\n ];\n }",
"public function getConfig()\n {\n return $this['config'];\n }",
"public function getModelConfiguration()\n\t{\n\t\treturn $this->configuration;\n\t}",
"public function getGen() {}",
"public function getGen() {}",
"public function getConfig(): array;",
"public function provides()\n {\n return array_values($this->generators);\n }",
"public static function getRequiredConfig()\n {\n return self::$requiredConfig;\n }",
"public function getActivatorSettings()\n {\n return (object) $this->config->userActivators[static::class];\n }",
"public function getCustomerConfig();",
"protected function getEditableConfigNames() {\n return ['select_registration_roles.settings'];\n }",
"public function getServiceConfig()\n {\n return array(\n 'factories' => array(\n 'Newsletter\\Model\\AdminConfigTable' => function($sm) {\n $tableGateway = $sm->get('AdminConfigTableGateway');\n $table = new AdminConfigTable($tableGateway);\n return $table;\n\t\t\t\t },\n\t\t\t\t 'AdminConfigTableGateway' => function ($sm) {\n $dbAdapter = $sm->get('Zend\\Db\\Adapter\\Adapter');\n $resultSetPrototype = new ResultSet();\n $resultSetPrototype->setArrayObjectPrototype(new Config());\n return new TableGateway('admin_config', $dbAdapter, null, $resultSetPrototype);\n\t\t\t\t },\n\t\t\t\t 'Newsletter\\Model\\EmailsubscriptionTable' => function($sm) {\n $tableGateway = $sm->get('EmailsubscriptionTableGateway');\n $table = new EmailsubscriptionTable($tableGateway);\n return $table;\n\t\t\t\t },\n\t\t\t\t 'EmailsubscriptionTableGateway' => function ($sm) {\n $dbAdapter = $sm->get('Zend\\Db\\Adapter\\Adapter');\n $resultSetPrototype = new ResultSet();\n $resultSetPrototype->setArrayObjectPrototype(new Emailsubscription());\n return new TableGateway('email_subscription', $dbAdapter, null, $resultSetPrototype);\n\t\t\t\t },\n\t\t\t ),\n\t\t\t);\n\t\t }",
"protected function getEditableConfigNames()\n {\n return [];\n }",
"public function getConfig()\n {\n return $this->config;\n }",
"public function getConfig()\n {\n return $this->config;\n }",
"public function getConfig()\n {\n return $this->config;\n }",
"public function getConfig()\n {\n return $this->config;\n }",
"public function getConfig()\n {\n return $this->config;\n }",
"public function getConfig()\n {\n return $this->config;\n }",
"public function getConfig()\n {\n return $this->config;\n }",
"public function getConfig()\n {\n return $this->config;\n }",
"public function getConfig()\n {\n return $this->config;\n }",
"public function getConfig()\n {\n return $this->config;\n }",
"public function getConfig()\n {\n return $this->config;\n }",
"public function getConfig()\n {\n return $this->config;\n }",
"public function getConfig()\n {\n return $this->config;\n }",
"public function getConfig()\n {\n return $this->config;\n }",
"public function getConfig()\n {\n return $this->config;\n }",
"public function getConfig();",
"public function getConfig();",
"public function getConfig();",
"public function getConfig();",
"public function getConfig();",
"public function getConfig();",
"public function getConfig();",
"public function getConfig();",
"abstract protected function getConfig();",
"private function prepareConfiguration()\n {\n $configuration = array();\n\n foreach ($this->configProvider->getIds() as $entityConfigId) {\n $className = $entityConfigId->getClassName();\n $fields = $this->configProvider->filter(\n function (ConfigInterface $fieldConfig) {\n return $fieldConfig->is('available_in_template');\n },\n $className\n );\n\n if (count($fields)) {\n $configuration[$className] = array();\n foreach ($fields as $fieldConfig) {\n $configuration[$className][] = 'get' . strtolower($fieldConfig->getId()->getFieldName());\n }\n }\n }\n\n return $configuration;\n }",
"private function get_configurations()\n {\n return [\n Configuration\\Comments::class,\n Configuration\\Editor::class,\n Configuration\\Media::class,\n Configuration\\Misc::class,\n Configuration\\Menu::class,\n Configuration\\Plugins::class,\n ];\n }",
"public function getConfig() {}",
"protected function getMapping() : array\n {\n return [\n 'defaultValue' => [\n 'get' => 'config.hasDefaultValue() ? config.getDefaultValue() : null',\n 'set' => 'array[\"hasDefaultValue\"] ? config.setDefaultValue(array[\"defaultValue\"]) : \"\"',\n 'types' => []\n ],\n 'hasDefaultValue' => [\n 'get' => 'config.hasDefaultValue()',\n 'set' => 'null',\n 'types' => ['bool']\n ],\n 'description' => [\n 'get' => 'config.getDescription()',\n 'set' => 'config.setDescription(array[\"description\"])',\n 'types' => ['string', 'null']\n ],\n 'requiredState' => [\n 'get' => 'config.isRequired()',\n 'set' => 'array[\"requiredState\"] ? config.setRequired() : config.setUnRequired()',\n 'types' => ['bool']\n ]\n ];\n }",
"public function getConfig() {\n $configFiles = [\n 4 => 'laravel-haml::config',\n 5 => 'laravel-haml',\n 6 => 'haml'\n ];\n\n\t\t$key = $configFiles[$this->version()];\n\t\treturn $this->app->make('config')->get($key);\n\t}",
"public function getConfiguration(): array;",
"public function getConfiguration(): array;",
"public function getConfig()\n {\n return Mage::getModel(\"postident/config\");\n }",
"public function getConfig()\n {\n return $this->config;\n }",
"public function getConfig()\n {\n return $this->get('config');\n }",
"public function getConfig() {\r\n return $this->config;\r\n }",
"public function getConfig() \n {\n return $this->config;\n }",
"public function generatorNameProvider()\n {\n return [[\"a string\"]];\n }",
"public function getConfig()\n {\n return [\n 'payment' => [\n EWallet::CODE => [\n 'redirectUrl' => $this->helperData->getEWalletRedirectUrl(),\n 'subtypes' => [\n [\n 'name' => 'pagseguro',\n 'image' => $this->assetRepository->getUrl('Uol_BoaCompra::images/pagseguro-logo.png')\n ],\n [\n 'name' => 'paypal',\n 'image' => $this->assetRepository->getUrl('Uol_BoaCompra::images/paypal-logo.png')\n ],\n ]\n ]\n ]\n ];\n }",
"protected function findGenerators()\n\t{\n\t\t$generators=array();\n\t\t$n=count($this->generatorPaths);\n\t\tfor($i=$n-1;$i>=0;--$i)\n\t\t{\n\t\t\t$alias=$this->generatorPaths[$i];\n\t\t\t$path=Yii::getPathOfAlias($alias);\n\t\t\tif($path===false || !is_dir($path))\n\t\t\t\tcontinue;\n\n\t\t\t$names=scandir($path);\n\t\t\tforeach($names as $name)\n\t\t\t{\n\t\t\t\tif($name[0]!=='.' && is_dir($path.'/'.$name))\n\t\t\t\t{\n\t\t\t\t\t$className=ucfirst($name).'Generator';\n\t\t\t\t\tif(is_file(\"$path/$name/$className.php\"))\n\t\t\t\t\t{\n\t\t\t\t\t\t$generators[$name]=array(\n\t\t\t\t\t\t\t'class'=>\"$alias.$name.$className\",\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\tif(isset($generators[$name]) && is_dir(\"$path/$name/templates\"))\n\t\t\t\t\t{\n\t\t\t\t\t\t$templatePath=\"$path/$name/templates\";\n\t\t\t\t\t\t$dirs=scandir($templatePath);\n\t\t\t\t\t\tforeach($dirs as $dir)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif($dir[0]!=='.' && is_dir($templatePath.'/'.$dir))\n\t\t\t\t\t\t\t\t$generators[$name]['templates'][$dir]=strtr($templatePath.'/'.$dir,array('/'=>DIRECTORY_SEPARATOR,'\\\\'=>DIRECTORY_SEPARATOR));\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\treturn $generators;\n\t}",
"public function getConfigClass() {\n return SVDatasetExporterConfiguration::class;\n }",
"protected function getConfiguration() {}",
"public function getFormGenerator()\n\t{\n\t\treturn $this -> _generator;\n\t}",
"public function getHelpersConfiguration();",
"public function provideExistingFormOptionsCustomConfiguration(): Generator\n {\n yield [\n [],\n [],\n ];\n\n yield [\n [\n 'option1' => 'value1',\n 'option2' => 'value2',\n ],\n [\n 'option1' => 'value1',\n 'option2' => 'value2',\n ],\n ];\n }",
"public function getConfigModule() {\n return $this->configModule;\n }",
"public function config()\r\n {\r\n return function (ConfigDB $config) {\r\n\r\n $config->titleTitle = 'ФИО';\r\n\r\n $config->hasOne = [\r\n 'User' => [\r\n 'user_id' => 'id',\r\n 'deleted_by' => 'id',\r\n 'created_by' => 'id',\r\n 'modified_by' => 'id',\r\n ],\r\n 'PlaceCountry' => [\r\n 'place_country_id' => 'id',\r\n ],\r\n 'UserCompany' => [\r\n 'user_company_id' => 'id',\r\n ],\r\n ];\r\n $config->hasMany = [\r\n 'EyufDocument' => [\r\n 'eyuf_scholar_id' => 'id',\r\n ],\r\n 'EyufFile' => [\r\n 'eyuf_scholar_id' => 'id',\r\n ],\r\n 'EyufInvoice' => [\r\n 'eyuf_scholar_id' => 'id',\r\n ],\r\n 'EyufReport' => [\r\n 'eyuf_scholar_id' => 'id',\r\n ],\r\n 'EyufTicket' => [\r\n 'eyuf_scholar_id' => 'id',\r\n ],\r\n ];\r\n $config->title = Az::l('Стипендиат');\r\n\r\n return $config;\r\n };\r\n }",
"public function getConfig()\n\t{\n\t\treturn $this->config;\n\t}",
"public function getConfig()\n\t{\n\t\treturn $this->config;\n\t}"
] | [
"0.728027",
"0.5777113",
"0.5775435",
"0.5678496",
"0.56554544",
"0.5619798",
"0.5557239",
"0.55403304",
"0.5513188",
"0.55023575",
"0.5497083",
"0.547021",
"0.5453373",
"0.5358906",
"0.5358226",
"0.5326922",
"0.5326106",
"0.5317825",
"0.5314144",
"0.5311939",
"0.5292985",
"0.5257425",
"0.52348197",
"0.52313393",
"0.52313393",
"0.5224001",
"0.5224001",
"0.521826",
"0.5193111",
"0.5186845",
"0.51400596",
"0.51381075",
"0.5132877",
"0.5132241",
"0.5123232",
"0.51220727",
"0.5111363",
"0.51055425",
"0.5099542",
"0.5095125",
"0.5092665",
"0.50897396",
"0.50848824",
"0.50848824",
"0.5077233",
"0.5074341",
"0.5070743",
"0.50704855",
"0.506981",
"0.5064162",
"0.5060607",
"0.5059511",
"0.5041102",
"0.5041102",
"0.5041102",
"0.5041102",
"0.5041102",
"0.5041102",
"0.5041102",
"0.5041102",
"0.5041102",
"0.5041102",
"0.5041102",
"0.5041102",
"0.5041102",
"0.5041102",
"0.5041102",
"0.50410897",
"0.50410897",
"0.50410897",
"0.50410897",
"0.50410897",
"0.50410897",
"0.50410897",
"0.50410897",
"0.503916",
"0.5039156",
"0.503379",
"0.5032845",
"0.5032529",
"0.5031567",
"0.5030258",
"0.5030258",
"0.50250876",
"0.5023684",
"0.50208104",
"0.5018775",
"0.5018072",
"0.50167435",
"0.5011369",
"0.4995007",
"0.4992526",
"0.49891922",
"0.49823344",
"0.4982081",
"0.4980472",
"0.49789137",
"0.4977008",
"0.49686784",
"0.49686784"
] | 0.71254706 | 1 |
Display Attribute List details. | public function index()
{
return view('admin.attribute.attr_list');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Product Attributes\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the attributes.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/productsattributes/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( ProductsAttributes::grid() )->datagrid ();\n\t}",
"function list_attributes() {\n\t\t$attributes = $this->get_attributes();\n\t\tif ($attributes && sizeof($attributes)>0) :\n\t\t\t\n\t\t\techo '<table cellspacing=\"0\" class=\"shop_attributes\">';\n\t\t\t$alt = 1;\n\t\t\tforeach ($attributes as $attribute) :\n\t\t\t\tif ($attribute['visible'] == 'no') continue;\n\t\t\t\t$alt = $alt*-1;\n\t\t\t\techo '<tr class=\"';\n\t\t\t\tif ($alt==1) echo 'alt';\n\t\t\t\techo '\"><th>'.wptexturize($attribute['name']).'</th><td>';\n\t\t\t\t\n\t\t\t\tif (is_array($attribute['value'])) $attribute['value'] = implode(', ', $attribute['value']);\n\t\t\t\t\n\t\t\t\techo wpautop(wptexturize($attribute['value']));\n\t\t\t\t\n\t\t\t\techo '</td></tr>';\n\t\t\tendforeach;\n\t\t\techo '</table>';\n\n\t\tendif;\n\t}",
"public function getIndex()\n {\n $attributes = $this->attribute->findAll();\n\n $this->view('admin.attribute.list', compact('attributes'));\n }",
"public function listAttractionAction() {\n $attractionService = $this->_service->getService('District_Service_Attraction');\n \n $attractions = $attractionService->getAllAttractions();\n \n $this->view->assign('attractions', $attractions);\n \n $this->_helper->actionStack('layout', 'index', 'default');\n \n $this->_helper->layout->setLayout('article');\n }",
"public function getAttributesList()\n {\n }",
"public function index()\n {\n return view('admins.attributes.list');\n }",
"public function index()\n {\n $attributes = $this->attributeRepository->listAttributes();\n \n $this->setPageTitle('Attributs', 'List des attributs');\n return view('admin.attributes.index', compact('attributes'));\n }",
"public function index()\n {\n // $allAttributes = ModelAttributes::all();\n // $modelAttributes = new ModelAttributes();\n\n // $attr = [];\n // $attrItems = [];\n\n // foreach ($allAttributes as $attribute) {\n // // echo $attribute->name;\n \n // array_push($attr, [\n // 'name' => $attribute->name\n // ]);\n\n // $items = $modelAttributes->listItemsByAttributeId($attribute->id);\n // foreach($items as $item) {\n \n // array_push($attr, [$item->value, $item->qtty]);\n\n // // echo $item->value;\n // // echo $item->qtty;\n // // echo \"<br>\";\n // }\n // // echo \"<hr>\";\n // }\n\n \n\n $modelAttributes = new ModelAttributes();\n $listAllItems = $modelAttributes->listAllItems();\n\n return view('attributes.index', [\n 'listAttributes' => ModelAttributes::all()]\n );\n }",
"public function index()\n\t{\n $attributes = $this->showAttribute->getTopAttributesWithSite(\n\t\t\tapp('veer')->siteId\n\t\t); \n\t\t\n\t\treturn $this->viewIndex('attributes', $attributes);\n\t}",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $attributes = $em->getRepository('ProductBundle:Attribute')->findAll();\n\n return $this->render('Admin2Bundle:Attribute:index.html.twig', array(\n 'attributes' => $attributes,\n ));\n }",
"public function index()\n {\n //获得所有商品属性数据\n $data = Attr::get()->toarray();\n $attrs =Arr::tree($data, \"aname\", 'id', 'pid');\n return view(\"admin.attrs.lists\",compact(\"attrs\"));\n }",
"public function index()\n { \n $attributes_details = AttributesDetail::all();\n return view('admin.attributes-detail.index', compact('attributes_details'));\n }",
"public function getAttributesList() {\n return $this->_get(9);\n }",
"public function show(Attribute $attrID)\n {\n //\n }",
"public function getAttributesList() {\n return $this->_get(24);\n }",
"public function getAttributesList() {\n return $this->_get(2);\n }",
"public function getAttributesList() {\n return $this->_get(15);\n }",
"public function getAttributesList() {\n return $this->_get(15);\n }",
"public function show(Attribute $attribute)\n {\n //\n }",
"public function getAttributesList() {\n return $this->_get(3);\n }",
"function listAttributes(){\n\n\t//Database connection\n\tglobal $mysqli;\n\n\t//The href paths for the pages\n\tglobal $cms_attribute;\n\tglobal $cms_addAttribute;\n\tglobal $cms_viewAttribute;\n\tglobal $cms_editAttribute;\n\tglobal $cms_deleteAttribute;\n\n\t//The selected continent\n\t$continent_id=$_GET[\"continent_id\"];\n\t$continent_name=$_GET[\"continent_name\"];\n\n\t//Database selection of the continent\n\t$sql_listAttributes=\"SELECT * FROM attributes WHERE continent_id=\".d($mysqli, $continent_id).\";\";\n\t$res_listAttributes=mysqli_query($mysqli, $sql_listAttributes);\n\n\t//Continent attribute table header\n\techo \"<div class=\\\"main\\\">\n\t\t<table>\n\t\t<tr><th>Attribute</th><th>UX</th><th>View</th><th>Edit</th><th>Delete</th></tr>\";\n\n\t//Table body, drawn from the database\n\tif($res_listAttributes->num_rows>0){\n\n\t\twhile($row=$res_listAttributes->fetch_assoc()){\n\n\t\t\techo \"<tr><td><a href=\\\"\".$cms_attribute.\"?continent_id=\".u($continent_id).\"&continent_name=\".h($row[\"continent_name\"]).\"&attribute_id=\".u($row[\"attribute_id\"]).\"&attribute_name=\".h($row[\"attribute_name\"]).\"\\\">\".h($row[\"attribute_name\"]).\"</a></td>\n\t\t\t\t<td>\".$row[\"ux\"].\"</td>\n\t\t\t\t<td><a href=\\\"\".$cms_viewAttribute.\"?continent_id=\".u($row[\"continent_id\"]).\"&attribute_id=\".u($row[\"attribute_id\"]).\"\\\">View</a></td>\n\t\t\t\t<td><a href=\\\"\".$cms_editAttribute.\"?continent_id=\".u($row[\"continent_id\"]).\"&attribute_id=\".u($row[\"attribute_id\"]).\"\\\">Edit</a></td>\n\t\t\t\t<td><a href=\\\"\".$cms_deleteAttribute.\"?continent_id=\".u($row[\"continent_id\"]).\"&attribute_id=\".u($row[\"attribute_id\"]).\"\\\">Delete</a></td></tr>\";\n\n\t\t}\n\n\t}\n\n\t//End of table and add attribute link\n\techo \"</table>\n\t\t<p><a href=\\\"\".$cms_addAttribute.\"?continent_id=\".u($continent_id).\"&continent_name=\".h(u($continent_name)).\"\\\">Add Attribute</a></p>\";\n\n\t$res_listAttributes->close(); \n\t$mysqli->close();\n\n}",
"public function index()\n {\n //\n \n \n $attr = Attribute::latest()->with('attributetype')->get();\n \n \n return view('attributes.index',[\n 'attributes'=>$attr]);\n }",
"public function indexattr()\n {\n $attr = Attribute::all();\n $category_id= Input::get('category_id');\n $category_name= Input::get('category_name');\n // $data = array('category_id' => $category_id,\n // 'category_name' => $category_name);\n\n return view('backend.CategoryPageListattributes',compact(\"attr\"))->with(array('category_id' => $category_id,\n 'category_name' => $category_name));\n }",
"public function list()\n {\n $attrs = Attribute::all();\n $html = view('partials.table-tbody.table-attribute', compact('attrs'))->render();\n\n return response()->json(['html' => $html], 200);\n }",
"public function index( )\n {\n $this->repository->pushCriteria(app('Prettus\\Repository\\Criteria\\RequestCriteria'));\n $this->repository->pushCriteria(app(AttributeOrderByCriteria::class));\n if(request()->has('name')){\n $this->repository->pushCriteria(app(AttributeFilterByCriteria::class));\n }\n $attributes = $this->repository->with('attribute_values')->paginate();\n\n //dd(AttributeValue::with('attribute')->get()->toArray());\n if (request()->wantsJson()) {\n\n return response()->json([\n 'data' => $attributes,\n ]);\n }\n\n return view('admin.attributes.index', compact('attributes'));\n }",
"public function getAttributesList() {\n return $this->_get(7);\n }",
"public function index()\n {\n $attributesGroup = AttributeGroup::paginate(10);\n\n return view('admin.attributes.index', compact('attributesGroup'));\n }",
"public function attributes();",
"public function indexAction() {\n\t\t$redirector = Zend_Controller_Action_HelperBroker::getStaticHelper ( 'redirector' );\n\t\t$redirector->gotoUrl ( '/admin/productsattributes/list' );\n\t}",
"public function actionIndex()\r\n {\r\n $searchModel = new AttributesSearch();\r\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\r\n\r\n return $this->render('index', [\r\n 'searchModel' => $searchModel,\r\n 'dataProvider' => $dataProvider,\r\n ]);\r\n }",
"public function actionAttributesList()\r\n {\r\n $condition = Yii::$app->request->post()['condition'];\r\n $condition['type'] = 'goods-info';\r\n return ApiGoodsinfo::getOaGoodsInfoList($condition);\r\n }",
"function action_unique_attribute_list() {\n $this->layout = null;\n\n $this->model = DB::model('Model')->fetch($_REQUEST['model_id']);\n if ($this->model->value['id']) {\n $this->model->bindMany('Attribute');\n }\n }",
"function viewAttribute(){\n\n\t//Database connection\n\tglobal $mysqli;\n\t\n\t//Hrefs\n\tglobal $cms_viewItem;\n\tglobal $cms_viewAttribute;\n\n\t//Selected continent and attribute\n\t$continent_id=$_GET[\"continent_id\"];\n\t$attribute_id=$_GET[\"attribute_id\"];\n\n\t//Database attribute selection for the page\n\t$sql_viewAttribute=\"SELECT * FROM attributes WHERE continent_id=\".d($mysqli, $continent_id).\" AND attribute_id=\".d($mysqli, $attribute_id).\";\";\n\t$res_viewAttribute=mysqli_query($mysqli, $sql_viewAttribute);\n\t$sql_viewAttributeBody=\"SELECT * FROM attributes WHERE continent_id=\".d($mysqli, $continent_id).\" AND attribute_id=\".d($mysqli, $attribute_id).\";\";\n\t$res_viewAttributeBody=mysqli_query($mysqli, $sql_viewAttributeBody);\n\n\t//Database attribute selection for the nav pane\n\t$sql_listAttributes=\"SELECT * FROM attributes WHERE continent_id=\".d($mysqli, $continent_id).\";\";\n\t$res_listAttributes=mysqli_query($mysqli, $sql_listAttributes);\n\n\t//Database item selection for the nav pane\n\t$sql_listItems=\"SELECT * FROM items WHERE continent_id=\".d($mysqli, $continent_id).\" AND attribute_id=\".d($mysqli, $attribute_id).\" ORDER BY pg;\";\n\n\t//The page display\n\tif($res_viewAttribute){\n\n\t\t//The attribute page header\n\t\twhile($title=$res_viewAttribute->fetch_assoc()){\n\n\t\t\t$continent_title=ucfirst($title[\"continent_name\"]);\n\t\t\t$attribute_title=ucfirst($title[\"attribute_name\"]);\n\n\t\t\techo \"<div class=\\\"heading\\\">\n\t\t\t\t<h2><a href=\\\"\".$cms_viewAttribute.\"?continent_id=\".$continent_id.\"&attribute_id=\".$attribute_id.\"\\\">\".h($continent_title).\" \".h($attribute_title).\"\";\n\t\t\t\t\n\t\t\tif($title[\"ux\"]==\"Hidden\" || $title[\"ux\"]==\"hidden\"){\n\t\t\t \n\t\t\t echo \"*\";\n\t\t\t \n\t\t\t}\n\t\t\t\n\t\t\techo \"</a></h2>\n\t\t\t\t</div>\";\n\n\t\t}\n\n\t\t//The nav pane\n\t\tif($res_listAttributes){\n\n\t\t\techo \"<div class=\\\"navpane\\\">\n\t\t\t\t<nav>\";\n\n\t\t\t//Listed attributes\n\t\t\twhile($row=$res_listAttributes->fetch_assoc()){\n\n\t\t\t\techo \"<p><a href=\\\"\".$cms_viewAttribute.\"?continent_id=\".u($row[\"continent_id\"]).\"&attribute_id=\".u($row[\"attribute_id\"]).\"\\\">\".h(ucfirst($row[\"attribute_name\"])).\"\";\n\t\t\t\t\n\t\t\t\tif($row[\"ux\"]==\"Hidden\" || $row[\"ux\"]==\"hidden\"){\n\t\t\t\t\n\t\t\t\t echo \"*\";\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\techo \"</a></p><br>\";\n\t\t\t\t\t\n\t\t\t\t\t//Listed items under the selected attribute\n\t\t\t\t\t\n\t\t\t\tif($row[\"attribute_id\"]==$attribute_id){\n\t\t\t\t\t \n\t\t\t $res_listItems=mysqli_query($mysqli, $sql_listItems);\n\t\t\t\t\t\n\t\t\t\t if($res_listItems){\n\n\t\t\t\t while($item=$res_listItems->fetch_assoc()){\n\n\t\t\t\t\t \t if($item[\"attribute_id\"]==$attribute_id){\n\n\t\t\t\t\t \t\t\techo\"</div><div class=\\\"navpanesub\\\">\n\t\t\t\t\t \t\t\t <p><a href=\\\"\".$cms_viewItem.\"?continent_id=\".u($item[\"continent_id\"]).\"&attribute_id=\".u($item[\"attribute_id\"]).\"&title=\".u($item[\"title\"]).\"\\\">\".h(ucfirst($item[\"title\"])).\"\";\n\t\t\t\t\t \t\t\t \n\t\t\t\t\t \t\t\tif($item[\"ux\"]==\"Hidden\" || $item[\"ux\"]==\"hidden\"){\n\t\t\t\t\t \t\t\t \n\t\t\t\t\t \t\t\t echo \"*\"; \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\t\n\t\t\t\t\t \t\t\techo \"</a></p>\n\t\t\t\t\t\t \t\t </div><div class=\\\"navpane\\\">\";\n\n\t\t\t\t\t\t \t}\n\n\t\t\t\t \t }\n\n\t\t\t\t }\n\n\t\t\t}\n\n\t\t\t\t \n\n\t\t}\n\n\t\t\techo \"</nav>\n\t\t\t </div>\";\n\n\t\t}\n\n\t\t//The image and body of the attribute page\n\t\twhile($page=$res_viewAttributeBody->fetch_assoc()){\n\n\t\t\t$continent_title=ucfirst($page[\"continent_name\"]);\n\t\t\t$description_path=$page[\"description_path\"];\n\n\t\t\techo \"<div class=\\\"main\\\">\n\t\t\t\t<img src=\\\"../\".$page[\"image_path\"].\"\\\" alt=\\\"Map of \".h($continent_title).\"\\\" height=\\\"600\\\" width=\\\"800\\\"><br>\n\t\t\t\t<p>\".h(file_get_contents(\"../\".$description_path.\"\")).\"</p>\";\n\t\t\t\n\n\t\t}\n\t\t\n\t}\n\n //Database disconnect\n $res_viewAttribute->close();\n $res_viewAttributeBody->close();\n $res_listAttributes->close();\n $res_listItems->close();\n $mysqli->close();\n\n}",
"public function getAttributeSetDetails();",
"public function getAttributes() {}",
"public function getAttributes() {}",
"public function getAttributes();",
"public function getAttributes();",
"public function getAttributes();",
"public function getAttributes();",
"public function getAttributes();",
"public function getAttributes();",
"public function getAttributes();",
"public function getAttributes();",
"public function getAttributes();",
"public function getAttrList() {\n\treturn $this->attrList;\n }",
"public function show($id)\n {\n $attribute = Attribute::find($id);\n $attributes_details = $attribute->attribute_details()->get();\n return view('admin.attributes-detail.index', compact('attributes_details', 'attribute'));\n }",
"public function getPropertyDetails(){\n $objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance ();\n return $objectManager->get ( 'Apptha\\Airhotels\\Model\\Attributes' );\n }",
"public function renderLinkAttributeFields() {}",
"public function renderLinkAttributeFields() {}",
"public function get_attributes()\n {\n }",
"public function get_attributes()\n {\n }",
"public function getAttributes(){ }",
"public function index()\n {\n\n $products = DB::table('products_attribute')->select('products_attribute.product_attribute_id','products.name','attributes.name_attribute')\n ->leftJoin('products', 'products.product_id', '=', 'products_attribute.product_id')\n ->leftJoin('attributes', 'attributes.attribute_id', '=', 'products_attribute.attribute_id')\n ->simplePaginate(5);\n\n\n return view('admin/catalog/product_attribute/index', compact('products'));\n }",
"public function show(ProductAttributes $productAttributes)\n {\n //\n }",
"public function getAttributes()\n {\n }",
"public function listProductAttributes(): Collection\n {\n return $this->model->attributes()->get();\n }",
"function getAttributes()\n {\n }",
"static function getAttributesInfo ()\n {\n return array (\n 'section1' => array (\n 'name' => _('Argonaut mirror settings'),\n 'attrs' => array (\n new StringAttribute (\n _('Local debian mirror directory'),\n '',\n 'argonautMirrorDir',\n FALSE,\n '/srv/www/debian'\n )\n )\n ),\n 'section2' => array (\n 'name' => _('Argonaut Debconf Crawler configuration'),\n 'attrs' => array (\n new StringAttribute (\n _('Local packages folder'),\n _('Folder in which the crawler will store packages during analysis'),\n 'argonautCrawlerPackagesFolder',\n FALSE,\n '/var/cache/argonaut/packages'\n )\n )\n ),\n 'section3' => array (\n 'name' => _('Argonaut Repository configuration'),\n 'attrs' => array (\n new StringAttribute (\n _('Proxy'),\n '',\n 'argonautLdap2repProxy',\n FALSE\n ),\n new StringAttribute (\n _('Log directory'), '',\n 'argonautLdap2repLogDir', FALSE,\n '/var/log/argonaut/'\n ),\n new BooleanAttribute (\n _('Errors'),\n '',\n 'argonautLdap2repErrors',\n FALSE,\n TRUE\n ),\n new BooleanAttribute (\n _('Source'),\n '',\n 'argonautLdap2repSource',\n FALSE,\n FALSE\n ),\n new BooleanAttribute (\n _('GPG Check'),\n '',\n 'argonautLdap2repGPGCheck',\n FALSE,\n FALSE\n ),\n new BooleanAttribute (\n _('Contents'),\n '',\n 'argonautLdap2repContents',\n FALSE,\n FALSE\n ),\n new BooleanAttribute (\n _('Verbose'),\n _('Wether to activate verbose mode'),\n 'argonautLdap2repVerbose',\n FALSE,\n FALSE\n ),\n )\n )\n );\n }",
"function GetAttributes();",
"static function renderAttributes($attributes = null)\n {\n if (is_array($attributes))\n {\n foreach($attributes as $name => $value)\n {\n echo ' '.$name.'=\"'.textH8($value).'\"';\n }\n }\n }",
"public function edit(ProductAttributeList $attribute)\n {\n echo json_encode($attribute);\n }",
"public function show(Fangattr $fangattr)\n {\n //\n }",
"public function getAttributeDetails(){\n $objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance ();\n return $objectManager->get('Magento\\Eav\\Model\\Config' );\n }",
"public function index()\n {\n $attrs = MonkCommerceProductAttribute::with('attributeValues')->paginate(10);\n return view('monkcommerce::monkcommerce-dashboard.admin.products.attributes.index')->with('attrs', $attrs);\n }",
"public static function getSummaryAttributes()\n {\n return array(\n 'id' => array(\n 'name' => 'id',\n 'display' => 'ID',\n 'type' => 'numeric',\n 'link' => 'endpoint',\n ),\n 'external_id' => array(\n 'name' => 'external_id',\n 'display' => 'External ID',\n 'type' => 'alpha',\n 'hide' => 'all'\n ),\n 'name' => array(\n 'name' => 'name',\n 'display' => 'Name',\n 'type' => 'alpha',\n ),\n 'arena' => array(\n 'name' => 'arena',\n 'display' => 'Arena',\n 'type' => 'alpha',\n 'hide' => 'phone,tablet',\n ),\n 'arena_id' => array(\n 'name' => 'arena_id',\n 'display' => 'Arena ID',\n 'type' => 'numeric',\n 'hide' => 'all',\n 'link' => 'endpoint2',\n ),\n 'length' => array(\n 'name' => 'length',\n 'display' => 'Length',\n 'type' => 'alpha',\n 'hide' => 'all'\n ),\n 'width' => array(\n 'name' => 'width',\n 'display' => 'Width',\n 'type' => 'alpha',\n 'hide' => 'all'\n ),\n 'radius' => array(\n 'name' => 'radius',\n 'display' => 'Radius',\n 'type' => 'alpha',\n 'hide' => 'all'\n ),\n 'seating' => array(\n 'name' => 'seating',\n 'display' => 'Seating Capacity',\n 'type' => 'alpha',\n 'hide' => 'all'\n ),\n 'tags' => array(\n 'name' => 'tags',\n 'display' => 'Tags',\n 'type' => 'alpha',\n 'hide' => 'all'\n ),\n 'description' => array(\n 'name' => 'description',\n 'display' => 'Description',\n 'type' => 'alpha',\n 'hide' => 'all'\n ),\n 'notes' => array(\n 'name' => 'notes',\n 'display' => 'Notes',\n 'type' => 'alpha',\n 'hide' => 'all'\n ),\n 'type' => array(\n 'name' => 'type',\n 'display' => 'Type',\n 'type' => 'alpha',\n ),\n 'status' => array(\n 'name' => 'status',\n 'display' => 'Status',\n 'type' => 'alpha',\n ),\n );\n }",
"function wc_show_attribute_links() {\n\tglobal $post;\n\t$attribute_names = array( 'pa_serie');\n\t\t\n\tforeach ( $attribute_names as $attribute_name ) {\n\t\t$taxonomy = get_taxonomy( $attribute_name );\n\t\t\n\t\tif ( $taxonomy && ! is_wp_error( $taxonomy ) ) {\n\t\t\t$terms = wp_get_post_terms( $post->ID, $attribute_name );\n\t\t\t$terms_array = array();\n\t\t\n\t if ( ! empty( $terms ) ) {\n\t\t foreach ( $terms as $term ) {\n\t\t\t $archive_link = get_term_link( $term->slug, $attribute_name );\n\t\t\t $full_line = '<a href=\"' . $archive_link . '\">'. $term->name . '</a>';\n\t\t\t array_push( $terms_array, $full_line );\n\t\t }\n\t\t echo $taxonomy->labels->name . ' ' . implode( $terms_array, ', ' );\n\t }\n \t}\n }\n}",
"public function index()\n {\n $attributesValue = AttributeValue::with('attributeGroup')->paginate(10);\n\n return view('admin.attributes-value.index', compact('attributesValue'));\n }",
"public function index()\n {\n $product_attributes = Product_attributes::latest()->paginate(2);\n\n $multiple = Product_attributes::has('parent')->get();\n\n return view('product_attributes.index', compact('product_attributes', 'multiple'));\n }",
"public function attributes()\n {\n return [\n 'name' => __('basic::elf.name'),\n 'slug' => __('basic::elf.slug'),\n 'image' => __('basic::elf.image'),\n 'preview' => __('basic::elf.preview'),\n 'thumbnail' => __('basic::elf.thumbnail'),\n 'description' => __('basic::elf.description'),\n 'additional_text' => __('gallery::elf.additional_text'),\n 'option' => __('gallery::elf.option'),\n 'active' => __('basic::elf.active'),\n 'link' => __('basic::elf.link'),\n ];\n }",
"function getAttributes($frontend = false)\n\t{\n\t\t$success = false;\n\t\t$database = PhplistHelperPhplist::getDBO();\n\t\tPhplist::load( 'PhplistQuery', 'library.query' );\n\t\tJTable::addIncludePath( JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_phplist' . DS . 'tables' );\n\t\t\n\t\t$table = JTable::getInstance( 'Attributes', 'PhplistTable' );\n\t\t$query = new PhplistQuery( );\n\t\t$query->select( \"*\" );\n\t\t$query->from( $table->getTableName( ) . \" AS tbl\" );\n\t\t\n\t\tif ($frontend)\n\t\t{\n\t\t\t// get csv of front end attribute id's from config\n\t\t\t$config = &Phplist::getInstance();\n\t\t\t$frontendAttribs = $config->get( 'frontend_attribs', '1' );\n\t\t\t\n\t\t\tif ($frontendAttribs != '' && $frontendAttribs != '0')\n\t\t\t{\n\t\t\t\t$query->where( \"tbl.id IN (\" . $frontendAttribs .\")\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// don't return anything if not frontend attribs in config\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$database->setQuery( ( string ) $query );\n\t\t$data = $database->loadObjectList();\n\t\t$success = $data;\n\t\treturn $success;\n\t}",
"public function toString()\n {\n return 'Attribute was found in Advanced Search Page.';\n }",
"public static function attributes( $list=[] )\n {\n $atts = [];\n\n if( !empty( $list ) && is_array( $list ) )\n {\n foreach( $list as $key => $value )\n {\n if( is_numeric( $key ) ) continue;\n $key = Sanitize::toSlug( $key );\n $value = self::escape( $value, '\"' );\n $atts[] = $key .'=\"'. $value .'\"';\n }\n }\n return implode( \" \", $atts );\n }",
"abstract public function attributeNames();",
"public function readAttributesAsList ( ) {\n\n return $this->getStream()->readAttributesAsList();\n }",
"public function edit($id)\n {\n\n return view('attributes.edit', [\n 'listAttribute' => ModelAttributes::find($id)\n ]);\n }",
"public function attributes()\n {\n return [\n 'external_id' => 'Third Party Identifier',\n 'name_first' => 'First Name',\n 'name_last' => 'Last Name',\n 'root_admin' => 'Root Administrator Status',\n ];\n }",
"function getAttrList() {\n return array_keys($this->attributes);\n }",
"public function index()\n {\n $attributes = Attribute::orderBy('id', 'DESC')->get();\n return response()->json([\n 'attributes' => $attributes,\n 'status' => 'SUCCESS'\n ]);\n }",
"public function detailAction() {\n\n //GET THE LIST ITEM\n $this->view->listDetail = Engine_Api::_()->getItem('list_listing',(int) $this->_getParam('id'));\n }",
"public function index()\n {\n abort_if(Gate::denies('Attributevalue_access'), Response::HTTP_FORBIDDEN, '403 Forbidden');\n return new Attribute_valueResource(AttributeValue::all());\n }",
"public function listDisplayElements();",
"public static function getSummaryAttributes()\n {\n return array(\n 'id' => array(\n 'name' => 'id',\n 'display' => 'ID',\n 'type' => 'numeric',\n 'link' => 'endpoint',\n ),\n 'event_id' => array(\n 'name' => 'event_id',\n 'display' => 'Event ID',\n 'type' => 'numeric',\n 'hide' => 'all',\n 'link' => 'endpoint2',\n ),\n 'event_start' => array(\n 'name' => 'event_start',\n 'display' => 'Event Start',\n 'type' => 'numeric',\n ),\n 'arena' => array(\n 'name' => 'arena',\n 'display' => 'Arena',\n 'type' => 'alpha',\n 'hide' => 'phone,tablet',\n ),\n 'arena_id' => array(\n 'name' => 'arena_id',\n 'display' => 'Arena ID',\n 'type' => 'numeric',\n 'hide' => 'all',\n 'link' => 'endpoint3',\n ),\n 'location' => array(\n 'name' => 'location',\n 'display' => 'Location',\n 'type' => 'alpha',\n 'hide' => 'phone,tablet',\n ),\n 'location_id' => array(\n 'name' => 'location_id',\n 'display' => 'Location ID',\n 'type' => 'numeric',\n 'hide' => 'all',\n 'link' => 'endpoint4',\n ),\n 'requester_name' => array(\n 'name' => 'requester_name',\n 'display' => 'Requested By',\n 'type' => 'alpha',\n 'hide' => 'phone',\n ),\n 'created_on' => array(\n 'name' => 'created_on',\n 'display' => 'Requested On',\n 'type' => 'alpha',\n 'hide' => 'phone',\n ),\n 'acknowledged_by' => array(\n 'name' => 'acknowledged_by',\n 'display' => 'Acknowledged By',\n 'type' => 'alpha',\n 'hide' => 'all'\n ),\n 'acknowledged_on' => array(\n 'name' => 'acknowledged_on',\n 'display' => 'Acknowledged On',\n 'type' => 'numeric',\n 'hide' => 'all'\n ),\n 'accepted_by' => array(\n 'name' => 'accepted_by',\n 'display' => 'Accepted By',\n 'type' => 'alpha',\n 'hide' => 'all'\n ),\n 'accepted_on' => array(\n 'name' => 'accepted_on',\n 'display' => 'Accepted On',\n 'type' => 'numeric',\n 'hide' => 'all'\n ),\n 'rejected_by' => array(\n 'name' => 'rejected_by',\n 'display' => 'Rejected By',\n 'type' => 'alpha',\n 'hide' => 'all'\n ),\n 'rejected_on' => array(\n 'name' => 'rejected_on',\n 'display' => 'Rejected On',\n 'type' => 'numeric',\n 'hide' => 'all'\n ),\n 'rejected_reason' => array(\n 'name' => 'rejected_reason',\n 'display' => 'Rejection Reason',\n 'type' => 'alpha',\n 'hide' => 'all'\n ),\n 'notes' => array(\n 'name' => 'notes',\n 'display' => 'Notes',\n 'type' => 'alpha',\n 'hide' => 'all'\n ),\n 'type' => array(\n 'name' => 'type',\n 'display' => 'Type',\n 'type' => 'alpha',\n ),\n 'status' => array(\n 'name' => 'status',\n 'display' => 'Status',\n 'type' => 'alpha',\n ),\n );\n }",
"public function angularItemAttributeView()\n { \n $itemAttributeModel = new ItemAttributeModel();\n $itemAttributeData = $itemAttributeModel->selectItemAttribute();\n return $itemAttributeData;\n }",
"public function getAttributeName()\n\t{\n\t\treturn 'MovieList';\n\t}",
"public function attributeHelp()\n {\n return array(\n 'subject' => \"Name for the item that will be generated.\",\n );\n }",
"public function Index()\n {\n try {\n $attribute = Attribute::orderBy('id', 'DESC')->paginate(PAGINATION_COUNT);\n return view('admin.attribute.index', compact('attribute'));\n } catch (\\Exception $ex) {\n DB::rollBack();\n return redirect()->back()->with('fail', __('admin/error.msg_error_back'));\n }\n }",
"public function getAttributes(){\n return $this->attributes;\n }",
"public function show($id)\n {\n $attribute = Attribute::select('attributes.*', \n DB::raw('CONCAT(created_by.first_name , \" \" , created_by.last_name) as created_by'),\n DB::raw('CONCAT(updated_by.first_name , \" \" , updated_by.last_name) as updated_by'))\n ->join('users as created_by', 'created_by.id', '=', 'attributes.created_by')\n ->leftJoin('users as updated_by', 'updated_by.id', '=', 'attributes.updated_by')\n ->where(['attributes.id' => $id])\n ->first();\n\n $attribute->fields = DB::table('multilang_contents')\n ->where([\n 'module' => 'ATTRIBUTE',\n 'module_id' => $id\n ])->get();\n \n\n $attribute->attributeValues = DB::table('multilang_contents')\n ->join('attribute_values', 'attribute_values.id', '=', 'multilang_contents.module_id')\n ->where([\n 'module' => 'ATTRIBUTE_VALUE',\n 'attribute_values.attribute_id' => $id\n ])->get();\n \n return response()->json($attribute, 200);\n }",
"public function getAttributeList($iattribute_title, $istart, $ilimit){\n\t\ttry {\n\t\t\tparent::SetDatabaseConnection();\t\t\n\t\t\t$query = \"call SPattributelist('\" . $iattribute_title . \"', \" . $istart . \", \" . $ilimit . \")\";\n\t\t\t//exit;\n\t\t\treturn Application_Model_Db::getResult($query);\n\t\t\t\n\t\t} catch(Exception $e) {\n\t\t\tApplication_Model_Logging::lwrite($e->getMessage());\n\t\t\tthrow new Exception($e->getMessage());\n\t\t}\n\t}",
"public static function digitalresourcelist(array $attributes = array()){\r\n //Status options\r\n $resourcesOptions = array();\r\n $resourcesOptions[] = JHTML::_('select.option', 'cdrom', JText::_('JRESEARCH_CDROM'));\r\n $resourcesOptions[] = JHTML::_('select.option', 'film', JText::_('JRESEARCH_FILM'));\r\n\r\n return self::htmllist($resourcesOptions, $attributes);\t\t\r\n }",
"public function attributes() { return $this->attributes; }",
"protected function renderAttributes()\n {\n $html = '';\n $no_key = ['loading'];\n\n foreach ($this->attributes as $key => $value) {\n if ($value === null) {\n continue;\n }\n\n if (is_numeric($key)) {\n $key = $value;\n }\n if (is_array($value)) {\n $value = implode(' ', $value);\n }\n\n if (in_array($key, $no_key, true)) {\n $element = htmlentities($value, ENT_QUOTES, 'UTF-8', false);\n } else {\n $element = $key . '=\"' . htmlentities($value, ENT_QUOTES, 'UTF-8', false) . '\"';\n }\n\n $html .= ' ' . $element;\n }\n\n return $html;\n }",
"public function listdataAsetAction() {\n $this->view->dataList = $this->adm_listdata_serv->getDataList('ASET');\n }",
"public function show($id)\n {\n\n $products_attribute = ProductAttributeModel::where('products_attribute.product_attribute_id', $id)\n ->join('products', 'products.product_id', '=', 'products_attribute.product_id')\n ->join('attributes', 'attributes.attribute_id', '=', 'products_attribute.attribute_id')\n ->get();\n\n foreach ($products_attribute as $key => $products) {\n\n $product = $products;\n\n }\n\n return view('admin/catalog/product_attribute/show', compact('product'));\n }",
"public function attributes(): array\n {\n return [\n 'name' => '角色名称',\n 'staff' => '关联员工',\n 'brand' => '关联品牌',\n 'department' => '关联部门',\n ];\n }",
"function present_list($attr)\n{\n if (is_array($attr) && count($attr) > 1) {\n $str = '<ul>';\n foreach ($attr as $value) {\n $str .= '<li>'.htmlspecialchars($attr).'</li>';\n }\n $str .= '</ul>';\n return $str;\n } else {\n return htmlspecialchars($attr[0]);\n }\n}",
"public function getCustomAttributes() {}",
"public function getAttributeList(): array;",
"public function getAttributes(): iterable;"
] | [
"0.74649155",
"0.7445827",
"0.7364033",
"0.7015769",
"0.69824374",
"0.69690114",
"0.6943012",
"0.68105793",
"0.6781489",
"0.6766011",
"0.67005527",
"0.66723764",
"0.66669697",
"0.6655513",
"0.663444",
"0.6621565",
"0.6615252",
"0.6615252",
"0.6603645",
"0.65911925",
"0.65854913",
"0.6571216",
"0.6565021",
"0.6552662",
"0.6532527",
"0.6496902",
"0.6451035",
"0.6371935",
"0.6359729",
"0.6318704",
"0.62888974",
"0.62871164",
"0.62629235",
"0.6261859",
"0.62478137",
"0.62477",
"0.62466574",
"0.62466574",
"0.62466574",
"0.62466574",
"0.62466574",
"0.62466574",
"0.62466574",
"0.62466574",
"0.62466574",
"0.61907464",
"0.61886156",
"0.6164814",
"0.6110048",
"0.6110048",
"0.6087058",
"0.6087058",
"0.608214",
"0.6057602",
"0.60309356",
"0.6016227",
"0.59951323",
"0.5986966",
"0.59765697",
"0.5932708",
"0.59233874",
"0.59117156",
"0.59057343",
"0.5898641",
"0.5892405",
"0.58828425",
"0.586966",
"0.5850112",
"0.5818333",
"0.5802743",
"0.57597816",
"0.57420456",
"0.57327336",
"0.5727216",
"0.57223517",
"0.57186913",
"0.57151335",
"0.57054025",
"0.5693",
"0.56826085",
"0.56788546",
"0.5664746",
"0.5659772",
"0.5657368",
"0.5654573",
"0.565417",
"0.564888",
"0.5641444",
"0.56367415",
"0.56165105",
"0.56148815",
"0.56123424",
"0.5610973",
"0.5609964",
"0.5606436",
"0.5597563",
"0.55953187",
"0.55923927",
"0.55853933",
"0.5582408"
] | 0.7410825 | 2 |
Change status of the country. | public function changeStatus(ProductAttributeList $attribute)
{
// echo "<pre>";print_r($vendor);die;
if($attribute->status == 'Active'){
$attribute->status ='Inactive';
}else{
$attribute->status ='Active';
}
if($attribute->save()) {
return redirect(route('attributes.index'))->with('success', trans('messages.attribute.change_status'));
}
return redirect(route('attributes.index'))->with('error', trans('messages.error'));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setCountry($newCountry){\n\t}",
"public function changeStatus()\n {\n }",
"function update_status() \n\t{\n global $order, $db;\n\n if ( ($this->enabled == true) && ((int)MODULE_PAYMENT_PAYCO_ZONE > 0) ) {\n $check_flag = false;\n $check = $db->Execute(\"select zone_id from \" . TABLE_ZONES_TO_GEO_ZONES . \" where geo_zone_id = '\" \n\t\t. MODULE_PAYMENT_PAYCO_ZONE . \"' and zone_country_id = '\" . $order->billing['country']['id'] . \"' order by zone_id\");\n while (!$check->EOF) {\n if ($check->fields['zone_id'] < 1) {\n $check_flag = true;\n break;\n } elseif ($check->fields['zone_id'] == $order->billing['zone_id']) {\n $check_flag = true;\n break;\n }\n $check->MoveNext();\n }\n\n if ($check_flag == false) {\n $this->enabled = false;\n }\n }\n }",
"public function change_promocodes_status(){\n\t\tif ($this->checkLogin('A') == ''){\n\t\t\tredirect(ADMIN_PATH);\n\t\t}else {\n\t\t\t$mode = $this->uri->segment(4,0);\n\t\t\t$promocode_id = $this->uri->segment(5,0);\n\t\t\t$status = ($mode == '0')?'Inactive':'Active';\n\t\t\t$newdata = array('status' => $status);\n\t\t\t$condition = array('id' => $promocode_id);\n\t\t\t$this->promocodes_model->update_details(PROMOCODES,$newdata,$condition);\n\t\t\t$this->setErrorMessage('success','Promocode Status Changed Successfully');\n\t\t\tredirect(ADMIN_PATH.'/promocodes/display_promocodes');\n\t\t}\n\t}",
"public function updated(Country $country)\n {\n //\n }",
"function toggle_active_country($id_country)\n{\n\t$this->db->where('id',$id_country );\n $query = $this->db->get('countries');\n $row = $query->row();\n $active = $row->active;\nif ($active)\n{\n $data = array('active' => 0); \n}\nelse \n{\n $data = array('active' => 1); \n}\n \n\t$this->db->where('id',$id_country );\n\t$this->db->update('countries', $data); \n\n}",
"function update_status() {\r\n global $order, $db;\r\n if ( ($this->enabled == true) && ((int)MODULE_PAYMENT_AUTHORIZENET_ECHECK_ZONE > 0) ) {\r\n $check_flag = false;\r\n $check = $db->Execute(\"select zone_id from \" . TABLE_ZONES_TO_GEO_ZONES . \" where geo_zone_id = '\" . MODULE_PAYMENT_AUTHORIZENET_ECHECK_ZONE . \"' and zone_country_id = '\" . $order->billing['country']['id'] . \"' order by zone_id\");\r\n while (!$check->EOF) {\r\n if ($check->fields['zone_id'] < 1) {\r\n $check_flag = true;\r\n break;\r\n } elseif ($check->fields['zone_id'] == $order->billing['zone_id']) {\r\n $check_flag = true;\r\n break;\r\n }\r\n $check->MoveNext();\r\n }\r\n\r\n if ($check_flag == false) {\r\n $this->enabled = false;\r\n }\r\n }\r\n }",
"public function update_status();",
"function update_status() {\n global $order;\n if ($this->enabled && ((int) constant(\"MODULE_PAYMENT_CGP_\" . $this->module_cgp_text . \"_ZONE\") > 0)) {\n $check_flag = false;\n $check_query = tep_db_query(\"select zone_id from \" . TABLE_ZONES_TO_GEO_ZONES . \" where geo_zone_id = '\" . constant(\"MODULE_PAYMENT_CGP_\" . $this->module_cgp_text . \"_ZONE\") . \"' and zone_country_id = '\" . $order->delivery['country']['id'] . \"' order by zone_id\");\n while ($check = tep_db_fetch_array($check_query)) {\n if ($check['zone_id'] < 1) {\n $check_flag = true;\n break;\n } else if ($check['zone_id'] == $order->delivery['zone_id']) {\n $check_flag = true;\n break;\n }\n }\n \n if (! $check_flag) {\n $this->enabled = false;\n }\n }\n }",
"public function setCountry($value) {\n\t\tself::$_country = $value;\n\t}",
"function setStatus($new_status)\n {\n $this->status = $new_status;\n }",
"public function changeclientstatus() {\r\n\t\t$this->clients->changeclientstatus();\r\n\t}",
"public function change_promocode_status_global(){\n\t\tif(count($_POST['checkbox_id']) > 0 && $_POST['statusMode'] != ''){\n\t\t\t$this->promocode_model->activeInactiveCommon(PROMOCODE,'_id');\n\t\t\tif (strtolower($_POST['statusMode']) == 'delete'){\n\t\t\t\t$this->setErrorMessage('success','Coupon Code deleted successfully','admin_coupon_code_delete_success');\n\t\t\t}else {\n\t\t\t\t$this->setErrorMessage('success','Coupon Code status changed successfully','admin_coupon_code_status_change');\n\t\t\t}\n\t\t\tredirect(ADMIN_ENC_URL.'/promocode/display_promocode');\n\t\t}\n\t}",
"public function setStatus($status);",
"public function setStatus($status);",
"public function setCountry($country)\r\n {\r\n $this->country = $country;\r\n }",
"function update_status() {\r\n global $order, $db;\r\n\r\n if ( ($this->enabled == true) && ((int)MODULE_PAYMENT_NOCHEX_ZONE > 0) ) {\r\n $check_flag = false;\r\n $check_query = $db->Execute(\"select zone_id from \" . TABLE_ZONES_TO_GEO_ZONES . \" where geo_zone_id = '\" . MODULE_PAYMENT_NOCHEX_ZONE . \"' and zone_country_id = '\" . $order->billing['country']['id'] . \"' order by zone_id\");\r\n while (!$check_query->EOF) {\r\n if ($check_query->fields['zone_id'] < 1) {\r\n $check_flag = true;\r\n break;\r\n } elseif ($check_query->fields['zone_id'] == $order->billing['zone_id']) {\r\n $check_flag = true;\r\n break;\r\n }\r\n $check_query->MoveNext();\r\n }\r\n\r\n if ($check_flag == false) {\r\n $this->enabled = false;\r\n }\r\n }\r\n }",
"public function setStatus(string $status): void;",
"function setStatus($cod_status){\n\n\t\t$this->status = $cod_status;\n\t\n\t}",
"public function update_country() \r\n\t{\r\n\t\tif (isset($_POST) && $_POST['save'] == 'Save') \r\n\t\t{\r\n\t\t\t$data['country_id'] = $this->input->post('country_id');\r\n\t\t\t$data['name'] = $this->input->post('country_name');\r\n\t\t\t$data['phonecode'] = $this->input->post('country_phonecode');\r\n\t\t\t// Set flash data \r\n\t\t\t$this->session->set_flashdata('message', '<div style=\"text-align:center; color:#4C8C18\">Successfully update the country information!</div>');\r\n\t\t\t$this->country->add($data);\r\n\t\t}\r\n\t\tredirect('country/listing');\r\n\t}",
"function setCountry($country) {\r\r\n\t\t$this->country = $country;\r\r\n\t}",
"public function change_status() {\n\n $id = $this->input->post('id');\n $status = $this->input->post('status');\n\n $data['is_active'] = $status;\n\n $this->db->where('id', $id);\n $this->db->update('template_pola', $data);\n }",
"public function setCountry($country = \"\");",
"public function requestCountry();",
"function changeStatus($status)\n\t{\n\t\t$where = array('uid' => session_get('uid'));\n\t\t$this->DB->database_update('users', array('online' => $status), $where);\n\t}",
"public function setStatus(string $status) : void;",
"public function change_banner_status_global() {\n if (count($_POST['checkbox_id']) > 0 && $_POST['statusMode'] != '') {\n $this->banner_model->activeInactiveCommon(BANNER, '_id');\n if (strtolower($_POST['statusMode']) == 'delete') {\n $this->setErrorMessage('success', 'Banner records deleted successfully','admin_banner_records_delete');\n } else {\n $this->setErrorMessage('success', 'Banner records status changed successfully','admin_banner_records_status_change');\n }\n redirect(ADMIN_ENC_URL.'/banner/display_banner');\n }\n }",
"public function changeStatus(Request $request)\n {\n $id = $request->id;\n\n /* non active the previous school year */\n SchoolYear::where('status_active', 1)->update([\n 'status_active' => 0,\n 'status_passed' => 2\n ]);\n\n /* enable status of the new school year */\n $update = SchoolYear::where('id', $id)->update([\n 'status_active' => 1,\n 'status_passed' => 0\n ]);\n\n if ($update) {\n $json = ['status' => 200, 'message' => 'Tahun ajar berhasil diubah'];\n } else {\n $json = ['status' => 500, 'message' => 'Tahun ajar gagal diubah'];\n }\n\n return response()->json($json);\n }",
"public function updatecountry($data, $id) {\r\n $this->db->where('id', $id);\r\n return $this->db->update('countries', $data);\r\n }",
"abstract public function setStatus($status);",
"function change_status()\n {\n //Create Model Object\n $groupObj=new groupModel();\n \n //change status\n $groupObj->changeStatus();\n\n $msg=\"Group Type status has been activated successfully\";\n if($_GET['newstatus']=='0')\n {\n $msg=\"Group Type status has been deactivated successfully\";\n }\n\n echo json_encode(array(\"result\" => \"success\",\"title\" => \"Group Status\",\"message\" => $msg));\n exit();\n }",
"public function changeStatus(): void\n {\n if ('online' === $this->online_status) {\n if ($this->reference_id > 0) {\n $query = 'UPDATE '. rex::getTablePrefix() .'d2u_references_references '\n .\"SET online_status = 'offline' \"\n .'WHERE reference_id = '. $this->reference_id;\n $result = rex_sql::factory();\n $result->setQuery($query);\n }\n $this->online_status = 'offline';\n } else {\n if ($this->reference_id > 0) {\n $query = 'UPDATE '. rex::getTablePrefix() .'d2u_references_references '\n .\"SET online_status = 'online' \"\n .'WHERE reference_id = '. $this->reference_id;\n $result = rex_sql::factory();\n $result->setQuery($query);\n }\n $this->online_status = 'online';\n }\n\n // Don't forget to regenerate URL cache to make online machine available\n if (rex_addon::get('url')->isAvailable()) {\n d2u_addon_backend_helper::generateUrlCache('reference_id');\n d2u_addon_backend_helper::generateUrlCache('tag_id');\n }\n }",
"protected static function set_status()\n {\n }",
"public function changeStatus(int $id);",
"public function setRegionStatus(?CloudPcSupportedRegionStatus $value): void {\n $this->getBackingStore()->set('regionStatus', $value);\n }",
"public function setCountry($country)\n {\n $this->country = $country;\n }",
"public function setStatus(Status $status);",
"public function setStatus(Choice $status)\n\t{\n\t\t$this->status=$status; \n\t\t$this->keyModified['status'] = 1; \n\n\t}",
"public function edit(Country $country)\n {\n \n }",
"function SetCountry(&$country)\n\t{\n\t\t$this->countryId = $country->countryId;\n\t}",
"public function admin_changestatus($id, $status) {\n $this->checkadmin();\n $this->request->data['Shippingrate']['sid'] = $id;\n $this->request->data['Shippingrate']['status'] = $status;\n $this->Shippingrate->save($this->request->data);\n $this->Session->setFlash('<div class=\"success msg\">' . __('Status updated successfully') . '.</div>', '');\n $this->redirect(array('action' => 'index'));\n }",
"function countryAction() {\n\t\t$oFilter = utilityInputFilter::filterString();\n\t\t$country = $oFilter->doFilter($this->getActionFromRequest(false, 1));\n\n\t\tif ( !$country || strlen($country) != 2 ) {\n\t\t\t$country = null;\n\t\t}\n\n\t\t$this->getModel()->setCountry($country);\n\t\t$this->getModel()->setPage($this->getPageFromRequest());\n\n\t\t$oView = new userView($this);\n\t\tif ( $country ) {\n\t\t\t$oView->showCountryLeaderboard();\n\t\t} else {\n\t\t\t$oView->showCountryList();\n\t\t}\n\t}",
"public function changeStatus($id)\n {\n header('Access-Control-Allow-Origin: *'); \n \n $order = Order::find($id);\n \n switch ($order->status)\n {\n case 'pending':\n $order->status='received';\n $order->save();\n break;\n \n case 'received':\n $order->status='closed';\n $order->save();\n break;\n \n default:\n break;\n } \n }",
"public function setStatus($status)\r\n {\r\n $this->status = $status;\r\n }",
"public function actionAddCountryCode()\n {\n Loads::addCountryCode();\n }",
"public function change_status($id, $status) {\n $this -> advertisementsmodel -> change_status($id, $status);\n $this -> session -> set_userdata('success_message', \"Advertisement status updated successfully\");\n redirect('advertisements', 'refresh');\n }",
"public function change_status_session_user($user, $ip, $status)\n {\n \tif ($status) {\n \t\t$this->db->set(array('ip' => $ip, 'status' => $status))->where('id_client', $user)->update('ec_client');\n \t} else {\n \t\t$this->db->set(array('ip' => '', 'status' => $status))->where('id_client', $user)->update('ec_client');\n \t}\n }",
"private function setStatus($status)\n {\n $this->request->request(\n \"sites/{$this->site->id}/settings\",\n ['method' => 'put', 'form_params' => ['allow_cacheserver' => $status,],]\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 update($name, $country, $id);",
"function change_status_to() {\n $stat_param = array(\n 'status' => $this->uri->segment(3)\n );\n $id = $this->uri->segment(4);\n $updt_status = $this->news_letter_model->change_status_to('newsletter', $stat_param, $id);\n if ($updt_status) {\n $this->session->set_userdata('success_msg', 'Status Updated susseccfully.');\n } else {\n $this->session->set_userdata('error_msg', 'Cannot update status.');\n }\n redirect('news_letter_cont');\n }",
"public function change_status($id)\n\t{\n\t\t$this->Area->changeStatus($id);\n\t\tredirect(\"admin/area\");\n\t}",
"public function setstatus()\n {\n $this->checkAjaxToken();\n $this->throwForbiddenUnless(SecurityUtil::checkPermission('AddressBook::', '::', ACCESS_ADMIN));\n\n $id = $this->request->request->get('id', 0);\n $status = $this->request->request->get('status', 0);\n $alert = '';\n \n if ($id == 0) {\n $alert .= $this->__('No ID passed.');\n } else {\n $item = array('id' => $id, 'status' => $status);\n $res = DBUtil::updateObject($item, 'addressbook_address', '', 'id');\n if (!$res) {\n $alert .= $item['id'].', '. $this->__f('Could not change item, ID %s.', DataUtil::formatForDisplay($id));\n if ($item['status']) {\n $item['status'] = 0;\n } else {\n $item['status'] = 1;\n }\n }\n }\n // get current status to return\n $item = DBUtil::selectObjectByID('addressbook_address', $id, 'id');\n if (!$item) {\n $alert .= $this->__f('Could not get data, ID %s.', DataUtil::formatForDisplay($id));\n }\n\n return new Zikula_Response_Ajax(array('id' => $id, 'status' => $item['status'], 'alert' => $alert));\n }",
"public function block(Request $request,$enc_id)\n\t{\t\n\t\t$country_id = base64_decode($enc_id);\n\n\t\t$obj_status = $this->BaseModel->where('id',$country_id)->update(['status'=>'0']);\n\n\t\tif($obj_status){\n\t\t\tSession::flash('success', 'Country status updated successfully.');\n\t\t\treturn redirect($this->module_url_path);\n \t}else{\n \t\tSession::flash('error', 'Something went wrong.');\n\t\t\treturn redirect($this->module_url_path);\n \t}\n\t}",
"function change_feature_status($status, $id)\n\t{\n\t\t$status = $status == 1 ? 0 : 1;\n\t\treturn $this->db->set('feature_restaurant', $status)\n\t\t\t\t\t\t->where('restaurant_id', $id)\n\t\t\t\t\t\t->update($this->table);\n\t}",
"function change_status()\n {\n //Create Model Object\n $helpDeskObj=new HelpDeskModel();\n \n //change status\n $helpDeskObj->changeStatus();\n\n $msg=\"Help Desk status has been activated successfully\";\n if($_GET['newstatus']=='0')\n {\n $msg=\"Help Desk status has been deactivated successfully\";\n }\n\n echo json_encode(array(\"result\" => \"success\",\"title\" => \"Help Desk Status\",\"message\" => $msg));\n exit();\n }",
"function editCountry()\n {\n if($this->isAdmin() == TRUE)\n {\n $this->loadThis();\n }\n else\n {\n $this->load->library('form_validation');\n \n $countryId = $this->input->post('id');\n \n $this->form_validation->set_rules('name','Name','trim|required|max_length[128]');\n \n if($this->form_validation->run() == FALSE)\n {\n $this->editOld($countryId);\n }\n else\n {\n $name = ucwords(strtolower($this->input->post('name')));\n \n $countryInfo = array();\n \n $countryInfo = array('name'=>$name, 'updated_by'=>$this->vendorId, 'update_time'=>date('Y-m-d H:i:s'));\n \n $result = $this->country_model->editCountry($countryInfo, $countryId);\n \n if($result == true)\n {\n $this->session->set_flashdata('success', 'country updated successfully');\n }\n else\n {\n $this->session->set_flashdata('error', 'Country updation failed');\n }\n \n redirect('admin/country/countryListing');\n }\n }\n }",
"public function setStatus($status)\n {\n \n $this->status = $status;\n }",
"public function change_status($status){\n\t\tif($status == '1'){\n\t\t\t$st = 'Active';\n\t\t}else if($status == '2'){\t\n\t \t\t$st = 'Inactive';\n\t\t}\n\t\treturn $st;\n\t}",
"function changeStatusDriver($status) {\n $this->db->where('id_kendaraan', $this->input->post('merk', TRUE));\n $this->db->update('kendaraan', array('status_ken' => $status));\n }",
"private function setStatus($status)\n {\n $this->status = $status;\n }",
"public function setStatus($status)\n {\n $this->status = $status;\n }",
"public function setStatus($status)\n {\n $this->status = $status;\n }",
"public function setStatus($status)\n {\n $this->status = $status;\n }",
"public function setStatus($status)\n {\n $this->status = $status;\n }",
"public function changeStatus($interview_category_id = null, $status = null)\r\n {\r\n $this->checkIfDemo();\r\n $this->AdminInterviewCategoryModel->changeStatus($interview_category_id, $status);\r\n }",
"public function changeStatus() {\n $id = Input::get('id');\n\n $Empresa_municipal = Empresa_municipalModel::findOrFail($id);\n $Empresa_municipal->is_published = !$Empresa_municipalModel->is_published;\n $Empresa_municipal->save();\n\n return response()->json($Empresa_municipal);\n }",
"public function setCountry($value)\n {\n return $this->set('Country', $value);\n }",
"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 setStatus( $status ) {\n\t\t$this->status = $status;\n\t}",
"public function setStatus()\r\n\t{\r\n\t\t$this->getHostStatus();\r\n\t}",
"public function changeCountry(Request $request)\n {\n return Country::with([\n 'translation',\n 'deliveries.delivery.translation',\n 'mainDelivery',\n 'payments.payment.translation'\n ])\n ->where('id', $request->get('countryId'))\n ->where('active', 1)\n ->first();\n }",
"public function setStatus($status)\n\t{\n\t\t$this->status = $status;\n\t}",
"public function setCountry(string $country): void\n {\n $this->_country = $country;\n }",
"public function change_status()\n { \n $user_id = $this->uri->segment(3);\n $current_status = $this->uri->segment(4);\n\n if($current_status==2)\n {\n $status = array('status'=>1);\n $this->Users_model->update_status($status,$user_id);\n redirect('admin');\n }\n if($current_status==1)\n {\n $status = array('status'=>2);\n $this->Users_model->update_status($status,$user_id);\n redirect('admin');\n }\n }",
"public function setStatus($status)\n {\n $this->_status = $status;\n }",
"public function status_change_action(){\n\t $table = $this->input->post('table');\n\t $state = $this->input->post('state');\n\t $primary_field = $this->input->post('primary_field');\n\t $primary_key = $this->input->post('primary_key');\n\t if($state=='true'){\n\t $status = \"Y\";\n\t $status_text = \"Approved\";\n\t }else{\n\t $status = \"N\";\n\t $status_text = \"Rejected\";\n\t }\n\t $statusReturn = $this->common_model->update_row(array('fr_status'=>$status), array($primary_field=>$primary_key), $table);\n\t if($statusReturn){\n\t echo \"1\";\n\t }else{\n\t echo \"0\";\n\t }\n\t}",
"function change_status($status, $id)\n\t{\n\t\t$status = $status == 1 ? 0 : 1;\n\t\treturn $this->db->set('restaurant_status', $status)\n\t\t\t\t\t\t->where('restaurant_id', $id)\n\t\t\t\t\t\t->update($this->table);\n\t}",
"public function setStatus( int $status ) : void\n {\n $this->status = $status;\n }",
"function setCountryId( $value )\n {\n $this->CountryID = $value;\n }",
"public function set_status( $status ) {\n\t\t$this->ryte_option[ self::STATUS ] = $status;\n\t}",
"public function switchStatus()\n {\n if ($this->status == 1) {\n return $this->status = '0';\n }\n $this->status = 1;\n }",
"public function change_review_status_global(){\n\t\tif(count($_POST['checkbox_id']) > 0 && $_POST['statusMode'] != ''){\n\t\t\t$this->review_model->activeInactiveCommon(REVIEW,'id');\n\t\t\tif (strtolower($_POST['statusMode']) == 'delete'){\n\t\t\t\t$this->setErrorMessage('success','Review records deleted successfully');\n\t\t\t}else {\n\t\t\t\t$this->setErrorMessage('success','Review records status changed successfully');\n\t\t\t}\n\t\t\tredirect('admin/review/display_review_list');\n\t\t}\n\t}",
"private function changeStatusLicense() {\n if ($this->get_request_method() != \"POST\") {\n $error = array('status_code' => \"0\", 'message' => \"wrong method\", 'response_code' => \"406\");\n $this->response($this->json($error), 406);\n }\n\n $arr = array();\n if(@$_POST['reqparams']) {\n $post = $_POST['reqparams'];\n $LicenseID = $post['LicenseID'];\n $StatusID = $post['StatusID'];\n } else {\n $LicenseID = $_POST['LicenseID'];\n $StatusID = $_POST['StatusID'];\n }\n\n $sql = mysql_query(\"UPDATE `SCP_Licenses` SET `StatusID`='$StatusID' WHERE `LicenseID` = '$LicenseID'\", $this->db);\n\n if($sql) {\n $error = array('status_code' => \"1\", 'status' => \"success\", 'message' => \"Changed License Status Successfully\", 'response_code' => \"200\", 'response_data' => $arr);\n $this->response($this->json($error), 200);\n } else {\n $error = array('status_code' => \"0\", 'status' => \"error\", 'message' => \"validation error\", 'response_code' => \"200\", 'response_data' => $arr);\n $this->response($this->json($error), 200);\n }\n }",
"public function update(Request $request, Country $country)\n {\n $request->validate([\n 'country_name' => 'required|unique:countries,country_name,'.$country->id\n ]);\n\n $country = Country::find($country->id);\n $country->country_name = $request->country_name;\n $save = $country->save();\n if($save)\n {\n return redirect()->route('countries.index')->with('success','Country updated successfully.');\n }\n }",
"public function status()\t{\n\t\t\t$this->veiculo->update($this->input->post('id'), array('veiculo_status' => $this->input->post('status')));\n\t\t}",
"public function changeStatus(Request $request)\n {\n // check for admin rights\n if(auth()->user()->id !== 1){\n // error message\n Session::flash('error', 'Onbevoegde toegang');\n return redirect('/home');\n }\n // validate the form data that we got via POST request\n $this->validate($request, [\n 'status' => 'nullable|string',\n 'id' => 'required|numeric'\n ]);\n // Get id of current car we are changing\n $id = $request->input('id');\n \n // Get current occasion info\n $occasion = Occasion::findOrFail($id);\n // Get current price status of car\n $status = $occasion->price;\n \n // if the car is available\n if($status > 0){\n //set old price\n $occasion->old_price = $occasion->price;\n // change to sold\n $occasion->price = 0;\n } \n // if the car is sold\n else if($status == 0){\n //set to old price so it is for sale again\n $occasion->price = $occasion->old_price;\n }\n\n // Save changes to database\n $occasion->save();\n\n // success message\n Session::flash('success', 'Status geüpdatet');\n\n //redirect\n return $this->show($id);\n }",
"public function unblock(Request $request,$enc_id)\n\t{\t\n\t\t$country_id = base64_decode($enc_id);\n\n\t\t$obj_status = $this->BaseModel->where('id',$country_id)->update(['status'=>'1']);\n\n\t\tif($obj_status){\n\t\t\tSession::flash('success', 'Country status updated successfully.');\n\t\t\treturn redirect($this->module_url_path);\n \t}else{\n \t\tSession::flash('error', 'Something went wrong.');\n\t\t\treturn redirect($this->module_url_path);\n \t}\n\t}",
"function SaveCountry($country)\n\t{\n\t\t$result = $this->sendRequest(\"SaveCountry\", array(\"Country\"=>$country));\t\n\t\treturn $this->getResultFromResponse($result);\n\t}",
"public function set_status ($status) {\n $this->status = $status;\n }",
"public function edit_country(Request $request)\n\t{\n\t\t$enc_id = base64_decode($request->input('enc_id'));\n\n\t\t$arr_rules = $arr_data = array();\n\t\t$status = false;\n\n\t\t$arr_rules['edit_english_name'] \t \t= \"required\";\n\t\t$arr_rules['edit_arabic_name'] \t\t\t= \"required\";\n\n\t\t$validator = Validator::make($request->all(),$arr_rules);\n\n\t\tif($validator->fails()) \n\t\t{\n\t\t\treturn redirect()->back()->withErrors($validator)->withInput();\n\t\t}\n\n\t\t$arr_data['country_english_name'] \t\t\t= $request->input('edit_english_name', null);\t\n\t\t$arr_data['country_arabic_name'] \t\t\t= $request->input('edit_arabic_name', null);\t\n\t\t$arr_data['aramex_country_id'] \t\t = $request->input('edit_aramex_country_id', null);\t\n\n\t\t$status = $this->BaseModel->where('id',$enc_id)->update($arr_data);\n\n\t\tif($status)\n\t\t{\n\t\t\tSession::flash('success', 'Country updated successfully.');\n\t\t\treturn redirect($this->module_url_path);\n\t\t}\n\n\t\tSession::flash('error', 'Error while updating Country.');\n\t\treturn redirect($this->module_url_path);\n\t}",
"public function changeActiveStatus($appName, $active);",
"public function getChangeStatus($id,$status='active')\n {\n try\n {\n $this->countryRepo->changeStatus($id,$status);\n return Redirect::route('admin.countries.index');\n }\n catch (Exception $e) //always ModelNotFoundException\n {\n return Redirect::route('admin.countries.index')->withErrors(array(\"error-msg\" => \"The selected country does not exits\"));\n }\n }",
"public function setStatus(int $status)\n {\n $this->status = $status;\n }",
"function setCountry( &$country )\n {\n if ( get_class( $country ) == \"ezcountry\" )\n {\n $this->CountryID = $country->id();\n }\n else if ( is_numeric( $country ) )\n {\n $this->CountryID = $country;\n }\n }",
"public function setStatusCode($status);",
"function setstatus($pr_id, $cloud_status) {\n\t\tswitch ($cloud_status) {\n\t\t\tcase 'new':\n\t\t\t\t$cr_status=1;\n\t\t\t\tbreak;\n\t\t\tcase 'approve':\n\t\t\t\t$cr_status=2;\n\t\t\t\tbreak;\n\t\t\tcase 'active':\n\t\t\t\t$cr_status=3;\n\t\t\t\tbreak;\n\t\t\tcase 'deny':\n\t\t\t\t$cr_status=4;\n\t\t\t\tbreak;\n\t\t\tcase 'deprovision':\n\t\t\t\t$cr_status=5;\n\t\t\t\tbreak;\n\t\t\tcase 'done':\n\t\t\t\t$cr_status=6;\n\t\t\t\tbreak;\n\t\t\tcase 'no-res':\n\t\t\t\t$cr_status=7;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\texit(1);\n\t\t\t\tbreak;\n\t\t}\n\t\t$db=htvcenter_get_db_connection();\n\t\t$rs = $db->Execute(\"update \".$this->_db_table.\" set pr_status=$cr_status where pr_id=$pr_id\");\n\n\t}",
"public function languages_status_change(Request $request) {\n\n try {\n\n DB::beginTransaction();\n \n $language_details = Language::find($request->language_id);\n\n if(!$language_details) {\n \n throw new Exception(tr('admin_language_not_found'), 101);\n }\n\n $language_details->status = $language_details->status == APPROVED ? DECLINED : APPROVED ;\n \n $message = $language_details->status == APPROVED ? tr('admin_language_activate_success') : tr('admin_language_deactivate_success');\n\n if( $language_details->save() ) {\n\n DB::commit();\n\n return back()->with('flash_success',$message);\n } \n\n throw new Exception(tr('admin_language_status_error'), 101);\n \n } catch( Exception $e) {\n\n DB::rollback();\n \n $error = $e->getMessage();\n\n return redirect()->route('admin.languages.index')->with('flash_error',$error);\n }\n }",
"public function change_user_status(){\r\n\t\tif ($this->checkLogin('A') == ''){\r\n\t\t\tredirect('admin');\r\n\t\t}else {\r\n\t\t\t$mode = $this->uri->segment(4,0);\r\n\t\t\t$user_id = $this->uri->segment(5,0);\r\n\t\t\t$status = ($mode == '0')?'Inactive':'Active';\r\n\t\t\t$newdata = array('status' => $status);\r\n\t\t\t$condition = array('id' => $user_id);\r\n\t\t\t$this->seller_model->update_details(USERS,$newdata,$condition);\r\n\t\t\t$this->setErrorMessage('success','Seller Status Changed Successfully');\r\n\t\t\tredirect('admin/seller/display_seller_list');\r\n\t\t}\r\n\t}",
"public function setActive()\n {\n $this->update(['status' => static::STATUS_ACTIVE]);\n }"
] | [
"0.67059135",
"0.6543043",
"0.6426789",
"0.6295612",
"0.6251108",
"0.62277246",
"0.62194955",
"0.62158203",
"0.6193232",
"0.61637706",
"0.61616445",
"0.60683995",
"0.6038308",
"0.60058403",
"0.60058403",
"0.59779584",
"0.5977305",
"0.5952288",
"0.59486586",
"0.5939312",
"0.5937118",
"0.5927497",
"0.5908877",
"0.58780897",
"0.58673966",
"0.586409",
"0.58594763",
"0.58554935",
"0.5847201",
"0.5815736",
"0.5799991",
"0.5778961",
"0.5778554",
"0.5775194",
"0.5769317",
"0.5757441",
"0.57482535",
"0.5742006",
"0.5738037",
"0.57302487",
"0.57293004",
"0.57244635",
"0.5723973",
"0.57061565",
"0.5703553",
"0.5700005",
"0.5698371",
"0.56922394",
"0.5686196",
"0.56807727",
"0.56774205",
"0.5667931",
"0.5659236",
"0.5652913",
"0.5649461",
"0.56494224",
"0.5648475",
"0.56477225",
"0.5639435",
"0.56342494",
"0.56278",
"0.56238186",
"0.56238186",
"0.56238186",
"0.56238186",
"0.56229705",
"0.5620371",
"0.56159055",
"0.5601122",
"0.5598434",
"0.55903554",
"0.5587365",
"0.55792195",
"0.55781895",
"0.55761987",
"0.55717254",
"0.55672777",
"0.5564188",
"0.5556555",
"0.55519927",
"0.5551851",
"0.55503947",
"0.55496895",
"0.5547401",
"0.5542462",
"0.55273736",
"0.5525812",
"0.55124193",
"0.5510789",
"0.551049",
"0.55006397",
"0.54956096",
"0.5489671",
"0.5487378",
"0.5466509",
"0.54654557",
"0.54571134",
"0.5456957",
"0.5447906",
"0.5444978",
"0.5444707"
] | 0.0 | -1 |
Show ProductAttributeList edit page. | public function edit(ProductAttributeList $attribute)
{
echo json_encode($attribute);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function edit(ProductAttributes $productAttributes)\n {\n //\n }",
"public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Product Attributes\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the attributes.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/productsattributes/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( ProductsAttributes::grid() )->datagrid ();\n\t}",
"public function editAction() {\n\t\t$Session = new Zend_Session_Namespace ( 'Admin' );\n\t\t$form = $this->getForm ( '/admin/productsattributes/process' );\n\t\t\n\t\t// Create the buttons in the edit form\r\n\t\t$this->view->buttons = array(\r\n\t\t\t\tarray(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\tarray(\"url\" => \"/admin/productsattributes/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\tarray(\"url\" => \"/admin/productsattributes/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)),\r\n\t\t);\n\t\t\n\t\t// Set the system field attribute title\n\t\t$panel = Isp::getPanel(); \n\t\tif(!empty($panel)){\n\t\t\t$form->getElement ( 'system_var' )->setLabel ( $panel );\n\t\t}\n\t\t\n\t\t$id = $this->getRequest ()->getParam ( 'id' );\n\t\t\n\t\tif (! empty ( $id ) && is_numeric ( $id )) {\n\t\t\t$rs = $this->productsattributes->getAllInfo ( $id, \"*, pad.label as label, pad.prefix as prefix, pad.suffix as suffix, pad.description as description, pad.language_id as language_id\", $Session->langid );\n\t\t\t\n\t\t\tif (! empty ( $rs )) {\n\t\t\t\t$this->view->id = $id;\n\t\t\t\t$rs['language_id'] = $Session->langid; // added to the form the language id selected \n\t\t\t\t$form->populate ( $rs );\n\t\t\t}\n\t\t\t\n\t\t\t$this->view->buttons[] = array(\"url\" => \"/admin/productsattributes/confirm/id/$id\", \"label\" => $this->translator->translate('Delete'), \"params\" => array('css' => null));\r\n\t\t\t\t\n\t\t}\n\t\t$this->view->title = $this->translator->translate(\"Attribute Group\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can edit the attribute group details.\");\n\t\t\n\t\t$this->view->form = $form;\n\t\t$this->render ( 'applicantform' );\n\t}",
"public function edit(Edit $request, ProductAttribute $productattribute)\n {\n\t\t$products = Product::all(['id']);\n\t\t$attributes = Attribute::all(['id']);\n\t\t$products_attributes_groups = ProductsAttributesGroup::all(['id']);\n\n return view('pages.product_attributes.edit', [\n 'model' => $productattribute,\n\t\t\t\"products\" => $products,\n\t\t\t\"attributes\" => $attributes,\n\t\t\t\"products_attributes_groups\" => $products_attributes_groups,\n\n ]);\n }",
"public function edit($id)\n {\n // Find Attribute\n $attr = MonkCommerceProductAttribute::with('attributeValues')->find($id);\n return view('monkcommerce::monkcommerce-dashboard.admin.products.attributes.edit')->with('attr', $attr);\n }",
"public function edit(AplexAdminProductMeta $aplexAdminProductMeta)\n {\n //\n }",
"public function processAction() {\n\t\t$redirector = Zend_Controller_Action_HelperBroker::getStaticHelper ( 'redirector' );\n\t\t$form = $this->getForm ( \"/admin/productsattributes/process\" );\n\t\t$request = $this->getRequest ();\n\t\t\n\t\t// Create the buttons in the edit form\r\n\t\t$this->view->buttons = array(\r\n\t\t\t\tarray(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\tarray(\"url\" => \"/admin/productsattributes/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\tarray(\"url\" => \"/admin/productsattributes/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)),\r\n\t\t);\r\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\t// Check if we have a POST request\n\t\t\tif (! $request->isPost ()) {\n\t\t\t\treturn $this->_helper->redirector ( 'list', 'productsattributes', 'admin' );\n\t\t\t}\n\t\t\t\n\t\t\tif ($form->isValid ( $request->getPost () )) {\n\t\t\t\t$params = $request->getParams();\n\t\t\t\t\n\t\t\t\t$id = $params['attribute_id'];\n\t\t\t\t$code = $params['code'];\n\t\t\t\t$label = $params['label'];\n\t\t\t\t$type = $params['type'];\n\t\t\t\t$prefix = $params['prefix'];\n\t\t\t\t$suffix = $params['suffix'];\n\t\t\t\t$is_system_var = $params['system'];\n\t\t\t\t$description = $params['description'];\n\t\t\t\t$position = $params['position'];\n\t\t\t\t$is_visible_on_front = $params['is_visible_on_front'];\n\t\t\t\t$active = $params['active'];\n\t\t\t\t$system = $params['system'];\n\t\t\t\t$system_var = $params['system_var'];\n\t\t\t\t$defaultvalue = $params['defaultvalue'];\n\t\t\t\t$is_required = $params['is_required'];\n\t\t\t\t$is_comparable = $params['is_comparable'];\n\t\t\t\t$on_product_listing = !empty($params['on_product_listing']) && $params['on_product_listing'] == 1 ? true : false;\n\t\t\t\t$language_id = $params['language_id'];\n\t\t\t\t\n\t\t\t\t$id = ProductsAttributes::addNew($id, $code, $label, $type, $language_id, $position, $active, $prefix, $suffix, $description, $is_visible_on_front, $is_system_var, $system_var, $defaultvalue, $is_required, $is_comparable, $on_product_listing);\n\t\t\t\t\n\t\t\t\tif($id === false){\n\t\t\t\t\t$this->_helper->redirector ( 'list', 'productsattributes', 'admin', array ('mex' => \"There was an error during the saving process. Check all the parameters.\", 'status' => 'danger' ) );\n\t\t\t\t}\t\t\t\t\n\t\t\t\t$this->_helper->redirector ( 'edit', 'productsattributes', 'admin', array ('id' => $id, 'mex' => $this->translator->translate ( 'The task requested has been executed successfully.' ), 'status' => 'success' ) );\n\t\t\t\n\t\t\t} else {\n\t\t\t\t$this->view->form = $form;\n\t\t\t\t$this->view->title = $this->translator->translate(\"Hosting Plan Feature details\");\n\t\t\t\t$this->view->description = $this->translator->translate(\"Here you can fix the hosting plan feature details.\");\n\t\t\t\treturn $this->render ( 'applicantform' );\n\t\t\t}\n\t\t} catch ( Exception $e ) {\n\t\t\t$this->_helper->redirector ( 'edit', 'productsattributes', 'admin', array ('id' => $id, 'mex' => $e->getMessage (), 'status' => 'danger' ) );\n\t\t}\n\t}",
"function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}",
"function editAttributes()\n\t{\n\t\t$id=(int)$_GET['prodid'];\n\t\tif(is_int($id))\n\t\t{\n\t\t\t$select='SELECT attrib_value_id FROM product_attrib_values_table where product_id='.$id;\n\t\t\t$jbo=new Bin_Query();\n\t\t\t$jbo->executeQuery($select);\n\t\t\t$arr=$jbo->records;\n\t\t\tfor($i=0;$i<count($arr);$i++)\n\t\t\t{\n\t\t\t\t$value[]=$arr[$i]['attrib_value_id'];\n\t\t\t}\n\t\t\t$sql='select category_id from products_table where product_id='.$id;\n\t\t\t$obj=new Bin_Query();\n\t\t\t$obj->executeQuery($sql);\n\t\t\t$sql='SELECT attrib_id FROM category_attrib_table WHERE subcategory_id='.$obj->records[0]['category_id'];\n\t\t\t$query = new Bin_Query();\n\t\t\t$query->executeQuery($sql);\n\t\t\t$cnt=count($query->records);\n\n\t\t\tfor($i=0;$i<$cnt;$i++)\n\t\t\t{\n\t\t\t \t$sq='SELECT a.attrib_name,b.* FROM attribute_table a,attribute_value_table b WHERE a.attrib_id=b.attrib_id AND a.attrib_id='.$query->records[$i]['attrib_id'];\n\t\t \t $que = new Bin_Query();\n\t\t\t \t if($que->executeQuery($sq))\n\t\t\t\t\t$tmp[]=$que->records;\n\t\t\t}\n\t\t\t\n\t\t\t\t\t\n\t\t\treturn Display_DManageProducts::editAttributes($tmp,$value);\n\t\t}\n\t}",
"public function edit($id)\n {\n\n return view('attributes.edit', [\n 'listAttribute' => ModelAttributes::find($id)\n ]);\n }",
"public function indexAction() {\n\t\t$redirector = Zend_Controller_Action_HelperBroker::getStaticHelper ( 'redirector' );\n\t\t$redirector->gotoUrl ( '/admin/productsattributes/list' );\n\t}",
"public function edit(Product $product) {\n //\n }",
"public function edit()\n {\n $per = self::get_permission();\n $all = product::all();\n return view('dashboard.product.edit',compact('per','all'));\n }",
"public function getEdit(){\n return view(\"admin.product.edit\" );\n }",
"public function edit()\r\n\r\n {\r\n\r\n $this->page_title->push(lang('menu_products_add'));\r\n\r\n $this->data['pagetitle'] = $this->page_title->show();\r\n\r\n\r\n /* Breadcrumbs :: Common */\r\n\r\n $this->breadcrumbs->unshift(1, lang('menu_products_add'), 'admin/setup/product/edit');\r\n\r\n\r\n /* Breadcrumbs */\r\n\r\n $this->data['breadcrumb'] = $this->breadcrumbs->show();\r\n\r\n\r\n /* Data */\r\n\r\n $this->data['error'] = NULL;\r\n\r\n $this->data['charset'] = 'utf-8';\r\n\r\n $this->data['form_url'] = 'admin/setup/product/update';\r\n\r\n\r\n /* Load Template */\r\n\r\n $this->template->admin_render('admin/products/edit', $this->data);\r\n\r\n\r\n }",
"public function edit(Product $product)\n {\n //\n }",
"public function edit(Product $product)\n {\n //\n }",
"public function edit(Product $product)\n {\n //\n }",
"public function edit(Product $product)\n {\n //\n }",
"public function edit(Product $product)\n {\n //\n }",
"public function edit(Product $product)\n {\n //\n }",
"public function edit(Product $product)\n {\n //\n }",
"public function edit(Product $product)\n {\n //\n }",
"public function edit(Product $product)\n {\n //\n }",
"public function edit(Product $product)\n {\n //\n }",
"public function edit(Product $product)\n {\n //\n }",
"public function edit(Product $product)\n {\n //\n }",
"public function edit(Product $product)\n {\n //\n }",
"public function edit(Product $product)\n {\n //\n }",
"public function edit(Product $product)\n {\n //\n }",
"public function edit(Product $product)\n {\n //\n }",
"public function edit(Product $product)\n {\n //\n }",
"public function edit(Product $product)\n {\n //\n }",
"public function edit(Product $product)\n {\n //\n }",
"public function edit(Product $product)\n {\n //\n }",
"public function edit(Product $product)\n {\n //\n }",
"public function edit(Product $product)\n {\n //\n }",
"public function edit(Product $product)\n {\n //\n }",
"public function edit(Product $product)\n {\n //\n }",
"public function edit(Product $product)\n {\n //\n }",
"public function edit(Product $product)\n {\n //\n }",
"public function edit(Product $product)\n {\n //\n }",
"public function edit(Product $product)\n {\n //\n }",
"public function edit(Product $product)\n {\n //\n }",
"public function edit(Product $product)\n {\n //\n }",
"public function edit(Product $product)\n {\n //\n }",
"public function edit(Product $product)\n {\n //\n }",
"public function edit(Product $product)\n {\n //\n }",
"public function edit(Product $product)\n {\n //\n }",
"public function edit(Product $product)\n {\n //\n }",
"public function edit(Product $product)\n {\n //\n }",
"public function edit(Product $product)\n {\n //\n }",
"public function edit(product $product)\n {\n //\n }",
"public function edit(product $product)\n {\n //\n }",
"public function edit(product $product)\n {\n //\n }",
"public function edit(Product $product)\n {\n // Admin Only \n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $attributes = $em->getRepository('ProductBundle:Attribute')->findAll();\n\n return $this->render('Admin2Bundle:Attribute:index.html.twig', array(\n 'attributes' => $attributes,\n ));\n }",
"public function editAction()\n {\n $productId = $this->_getParam('product_id'); \n\n $this->_model->setId($productId);\n $productModel = $this->_model; \n\n\t $form = new Core_Form_Product_Edit($productId);\n $form->setAction($this->view->url(array(\n 'module' => 'default',\n 'controller' => 'product',\n 'action' => 'edit',\n 'product_id' => $productId,\n ), NULL, TRUE\n ));\n\n if ($this->_request->isPost()) {\n\n if ($form->isValid($_POST)) {\n $productModel->edit($form->getValues());\n\t \t $this->_helper->FlashMessenger('Product item edited successfully');\n $this->_redirect($this->view->url(array(\n 'module' => 'default',\n 'controller' => 'product',\n 'action' => 'viewdetails',\n 'product_id' => $productId,\n ), null, false));\n } else {\n $form->populate($_POST);\n $this->view->form = $form;\n }\n\n } else {\n\t $this->view->form = $form;\n }\n\n }",
"public function editAction()\n {\n $request = $this->getRequest();\n\n $productId = $request->getParam('id');\n\n if(!$productId) {\n $this->redirect('/');\n }\n\n $this->_helper->viewRenderer->setRender('form');\n\n $form = new Application_Form_Product();\n\n $this->loadModel('product');\n \n if ($request->isPost()) {\n if ($form->isValid($request->getPost())) {\n\n $this->modelProduct->update($form->getValues());\n\n $this->view->success = true;\n $this->view->productName = $form->getValues()['name'];\n $this->view->actionPerformed = 'updated';\n $form->reset();\n }\n } else {\n\n $product = $this->modelProduct->findById($productId);\n\n $this->view->headTitle()->prepend('Edit Product ' . $product['name']);\n\n $categoryToProduct = $this->modelProduct->getCategoryToProduct($productId);\n\n $form->populate($product->toArray());\n\n $form->populate($categoryToProduct->toArray());\n \n }\n\n \n $this->view->form = $form;\n\n }",
"public function edit_product_form(){\r\n\t\tif ($this->checkLogin('A') == ''){\r\n\t\t\tredirect('admin');\r\n\t\t}else {\r\n\t\t\t$this->data['heading'] = 'Edit Product';\r\n\t\t\t$product_id = $this->uri->segment(4,0);\r\n\t\t\t$condition = array('id' => $product_id);\r\n\t\t\t$this->data['product_details'] = $this->product_model->view_product($condition);\r\n\t\t\tif ($this->data['product_details']->num_rows() == 1){\r\n\t\t\t\t$this->data['categoryView'] = $this->product_model->get_category_details($this->data['product_details']->row()->category_id);\r\n\t\t\t\t$this->data['atrributeValue'] = $this->product_model->view_atrribute_details();\r\n\t\t\t\t$this->data['SubPrdVal'] = $this->product_model->view_subproduct_details($product_id);\r\n\t\t\t\t$this->data['PrdattrVal'] = $this->product_model->view_product_atrribute_details();\r\n\t\t\t\t$this->load->view('admin/product/edit_product',$this->data);\r\n\t\t\t}else {\r\n\t\t\t\tredirect('admin');\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public function edit($id)\n {\n $product = $this->productRepo->findProductWithAttributesById($id);\n $attributes = $product->attributes;\n\n $productAttributeGroup = ProductAttribute::where('Product_ID', $id)->select('Product_Attribute_Group_ID')->firstOrNew()->Product_Attribute_Group_ID;\n\n $product->setAttribute('AttributeGroup_ID', $productAttributeGroup);\n\n $categories = $this->categoryRepo->getActiveCategories();\n $attributeGroups = ProductAttributesGroup::select('id','Name')->get();\n $brands = $this->brandsRepo->getActiveBrands();\n\n return view('dashboard.product.edit', [\n 'model' => $product,\n 'categories' => $categories,\n 'brands' => $brands,\n 'attributes' => $attributes,\n 'attributeGroups' => $attributeGroups\n ]);\n }",
"public function edit($id)\n {\n $product = Product::findOrFail($id); \n $cate=$product->categories;\n $specheads = SpecificationHeader::all();\n $attributes = Attribute::all();\n\n $oldattrib = ProductAttribute::where('product_id', $id)->get();\n \n return view('admin.product.edit')\n ->with([\n 'product'=> $product,\n 'cate' => $cate,\n 'specheads' => $specheads,\n 'attributes' => $attributes,\n 'oldattrib' => $oldattrib\n ]);\n }",
"public function edit(Request $request,$id)\n {\n $product = Product::find($id);\n $categories = Category::all();\n $attribute_product = Product_Attribute::where('pa_product_id',$id)->get();\n $data = [\n 'product' => $product,\n 'categories' => $categories,\n 'attribute_product' => $attribute_product\n ];\n return view('Admin.product.edit',$data);\n }",
"public function getIndex()\n {\n $attributes = $this->attribute->findAll();\n\n $this->view('admin.attribute.list', compact('attributes'));\n }",
"public function edit(Product $product)\n {\n // \n }",
"public function edit(Catalog $catalog, $slug, CatalogAttribute $attribute, $attributeId)\n {\n //\n $attribute = $attribute->find($attributeId); \n $parent = $catalog->bySlug($slug);\n $lists=$parent->lists($slug)->get();\n $breadcrumb='catalogAttributes.edit';\n $item=$attribute;\n return view('admin.partials.catalogs.attributes.form', compact('parent','attribute','breadcrumb','item', 'lists'));\n }",
"public function show(ProductAttributes $productAttributes)\n {\n //\n }",
"public function edit(ProductListing $productListing)\n {\n //\n }",
"public function edit(Products $products)\n {\n //\n }",
"public function edit(Products $products)\n {\n //\n }",
"public function edit(Products $products)\n {\n //\n }",
"public function edit(Products $products)\n {\n //\n }",
"public function index()\n {\n\n $products = DB::table('products_attribute')->select('products_attribute.product_attribute_id','products.name','attributes.name_attribute')\n ->leftJoin('products', 'products.product_id', '=', 'products_attribute.product_id')\n ->leftJoin('attributes', 'attributes.attribute_id', '=', 'products_attribute.attribute_id')\n ->simplePaginate(5);\n\n\n return view('admin/catalog/product_attribute/index', compact('products'));\n }",
"public function editattr($id)\n {\n $attr=Attribute::find($id);\n $category_id= Input::get('category_id');\n $category_name= Input::get('category_name');\n $data = array('category_id' => $category_id,\n 'category_name' => $category_name);\n \n return view(\"backend.EditAttributes\",compact(\"attr\"))->with($data);\n }",
"public function edit($id)\r\n {\r\n\r\n\r\n $product = Product::findOrFail($id)->toArray();\r\n\r\n $list = Category::pluck('name', 'id');\r\n \r\n return view('admin.product.edit', [\r\n 'product' => $product,\r\n 'list'=> $list ]\r\n );\r\n }",
"public function edit(Product $product)\n {\n //TODO dropdown voor edit producten waar je ALLE categorieen meestuurt \n $categories = Category::all(); \n return view('admin.products.edit', compact('product', 'categories')); \n\n }",
"public function index()\n {\n\n return view('admin.attribute.attr_list');\n }",
"public function edit(Product $product)\n {\n $categories = Category::all();\n $brands = Brand::all();\n $tags = Tag::all();\n return view('admin.products.edit',compact('product','categories','brands','tags'));\n }",
"public function edit(ProductCategory $productCategory)\n {\n //\n }",
"public function edit($id)\n {\n $data[\"product_info\"] = Product::with(\"categories\", \"tags\")->find($id);\n if (!empty($data[\"product_info\"])) {\n $data['rightButton']['iconClass'] = 'fa fa - list';\n $data['rightButton']['text'] = 'Product List';\n $data['rightButton']['link'] = 'products';\n $data['rightButton4']['iconClass'] = 'fa fa - eye';\n $data['rightButton4']['text'] = 'View';\n $data['rightButton4']['link'] = \"product/\" . $data['product_info']->slug;\n\n $data['product_info']->read_a_little = SM::sm_unserialize($data['product_info']->read_a_little);\n\n $data['product_info']->categories = SM::get_ids_from_data($data['product_info']->categories);\n $data['product_info']->tags = SM::sm_get_product_tags($data['product_info']->tags);\n $data['all_categories'] = Category::where('parent_id', 0)->get();\n $data[\"size_lists\"] = Attribute::Size()->orderBy('title')->pluck('title', 'id');\n $data[\"color_lists\"] = Attribute::Color()->orderBy('title')->pluck('title', 'id');\n $data[\"all_brands\"] = Brand::orderBy('title')->pluck('title', 'id');\n $data[\"all_units\"] = Unit::orderBy('title')->pluck('title', 'id');\n $data[\"author_lists\"] = Author::orderBy('title')->pluck('title', 'id');\n $data[\"publisher_lists\"] = Publisher::orderBy('title')->pluck('title', 'id');\n $data[\"country_lists\"] = Country::orderBy('name')->pluck('name', 'id');\n return view(\"nptl-admin.common.product.edit_product\", $data);\n } else {\n return redirect(SM::smAdminSlug(\"products\"))->with(\"w_message\", \"Product Not Found!\");\n }\n }",
"public function index()\n {\n $attrs = MonkCommerceProductAttribute::with('attributeValues')->paginate(10);\n return view('monkcommerce::monkcommerce-dashboard.admin.products.attributes.index')->with('attrs', $attrs);\n }",
"public function edit(Product $product) //Editar\n {\n //\n }",
"public function edit(Attribute $attribute)\n {\n //\n }",
"public function edit($id)\n {\n $attribute = $this->attributeRepository->findAttributeById($id);\n\n $this->setPageTitle('Attributes', 'Editer l\\'attribut #:'.$attribute->name);\n return view('admin.attributes.edit', compact('attribute'));\n }",
"public function edit($id)\n {\n $product=Product::with(['attributeValues','categories','photos'])->whereId($id)->first();\n return view('admin.products.edit',compact([['product']]));\n }",
"public function edit(Product $product)\n {\n //show the product edit form\n\n $product=Product::where('id','=',$product->id)->get();\n //get the product categories for the form\n $categories=Category::all();\n $data =array();\n foreach ($categories as $category) {\n $data[$category->id]=$category->name;\n };\n //dd($data);\n return view('forms.edit_product')->with(['product'=>$product,'cats'=>$data]);\n }",
"public function edit($id)\n {\n $product = Product::find($id);\n $category = $product->category;\n //получаем картинки previews если они есть\n $previews = Preview::where(['product_id' => $product->id])->get();\n //получаем фильтры товара\n $filter = Attribute_Product::where('product_id', $product->id)->pluck('attr_id', 'id')->all();\n // dd($filter);\n // $related_products = DB::select(\"select * from product_related JOIN products ON products.id=\n // product_related.related_id WHERE product_related.product_id=?\", [$product->id]);\n $relateds = $product->relateds;\n // dd($relateds);\n // $related_products = [];\n // foreach ($relateds as $item) {\n // $related_products[] = $item->products;\n // }\n $all_products = Product::get();\n // dd($all_products);\n session()->put('id', $category->id);\n // dump(session()->get('category'));\n return view('admin.products.edit', compact('product', 'previews', 'filter', 'all_products', 'relateds'));\n }",
"public function edit($id)\n {\n \t$productFeatureAttributes = array();\n $products = Product::where('id','=',$id)->with('productTag','productItem','productAttribute')->first();\n //echo '<pre>';print_r($products);die;\n $category_list = Category::where('status','=', 1)->where('parent_id','=', 7)->get();\n\n $sub_category_list = Category::where('status','=', 1)->where('parent_id','=', $products->category_id)->get();\n $productFeatures = ProductFeature::where('status','=', 1)->get();\n $product_featureAttributes = ProductFeatureAttribute::with('productFeature')->where('status','=', 1)->get()->toArray();\n foreach ($product_featureAttributes as $key => $value) {\n $productFeatureAttributes[$value['product_feature_id']][] = $value;\n }\n\n /*\n foreach ($productFeatureItems as $key => $value) {\n $productFeatureItemsarr[$value['product_feature_id']] = $value;\n }*/\n\n //echo '<pre>';print_r($products);die;\n \n return view('admin.products.edit',[\"products\" => $products,\"category_list\" => $category_list,\"sub_category_list\" => $sub_category_list,\"productFeatureAttributes\" => $productFeatureAttributes,\"productFeatures\" => $productFeatures]);\n \n }",
"public function newAction() {\n\t\t$Session = new Zend_Session_Namespace ( 'Admin' );\n\t\t$this->view->form = $this->getForm ( \"/admin/productsattributes/process\" );\n\n\t\t// I have to add the language id into the hidden field in order to save the record with the language selected \n\t\t$this->view->form->populate ( array('language_id' => $Session->langid) );\n\t\t\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t\t\t array(\"url\" => \"/admin/productsattributes/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t\n\t\t$this->view->title = $this->translator->translate(\"Attributes\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can edit the attribute details.\");\n\t\t$this->render ( 'applicantform' );\n\t}",
"public function edit(StoreProduct $storeProduct)\n {\n //\n }",
"public function edit(Product $product)\n {\n $categories = Category::orderBy('id', 'asc')->lists('name', 'id');\n $wineries = Winery::orderBy('id', 'asc')->lists('name', 'id');\n $varietals = Varietal::orderBy('id', 'asc')->lists('name', 'id');\n\n return view('admin.product.edit', compact('product', 'categories', 'wineries', 'varietals')); \n }",
"public function edit(Product $product)\n {\n //\n return view('admin.edit',['brands'=>Brand::all(), 'categories'=>Category::all(), 'product'=>$product]);\n }",
"public function edit(Product $product)\n {\n $categories = Category::all();\n //use this function to have a view showing the details of the item in a form. (edit.blade.php)\n //create the form in edit.blade.ph\n return view('products.edit', compact(\"product\", \"categories\"));\n }",
"public function edit(Product $product)\n {\n $categories = Category::all();\n $brands = Brand::all();\n return view('admins.products.edit', compact('categories', 'brands', 'product'));\n }",
"public function editAction() {\n \ttry {\n\t $id = (int)$this->getEvent()->getRouteMatch()->getParam('id');\n\t //Redirect to add form if id not exists\n\t if (!$id) {\n\t return $this->redirect()->toRoute('shoppinglist', array('action'=>'add'));\n\t }\n\t $t_categories = $this->getCategoryTable()->getCategoriesNameToValue();\n\t //Loadind shopping list\n\t $ShoppingList = $this->getShoppingListTable()->getShoppingList($id);\n\t $form = new ShoppingListForm($t_categories);\n\t //Loading Form\n\t $form->bind($ShoppingList);\n\t $form->get('submit')->setAttribute('label', 'Edit');\n\t $request = $this->getRequest();\n\t //Check post request\n\t if ($request->isPost()) {\n\t $form->setData($request->getPost());\n\t //Fields control\n\t if ($form->isValid()) {\n\t $this->getShoppingListTable()->saveShoppingList($ShoppingList);\n\t \n\t return $this->redirect()->toRoute('shoppinglist');\n\t }\n\t }\n \t} catch(\\Exception $e) {\n \t\treturn $this->redirect()->toRoute('shoppinglist', array('action'=>'add'));\n \t}\n return array(\n 'id_shopping_list' => $id,\n 'form' => $form,\n );\n }",
"public function edit(Product_option $product_option)\n {\n //\n }",
"public function edit($id){\n \t$product = Product::find($id);\n \treturn view('admin.products.edit',compact('product'));\n\n }",
"public function edit($id)\n {\n $list = Product::where('id',$id)->get();\n\n // dd($list);\n \n return view('products.edit')->with('list',$list);\n }",
"public function edit(RecipeList $recipeList)\n {\n //\n }",
"public function edit(Product $product)\n {\n $categories = Category::all();\n return view('admin.product.edit',compact('product','categories'));\n }"
] | [
"0.7554106",
"0.7398569",
"0.7341087",
"0.72376263",
"0.6745065",
"0.6731754",
"0.6693674",
"0.66428506",
"0.66301566",
"0.6622368",
"0.6608486",
"0.6559132",
"0.65579516",
"0.6517996",
"0.6506437",
"0.6474655",
"0.64603204",
"0.64603204",
"0.64603204",
"0.64603204",
"0.64603204",
"0.64603204",
"0.64603204",
"0.64603204",
"0.64603204",
"0.64603204",
"0.64603204",
"0.64603204",
"0.64603204",
"0.64603204",
"0.64603204",
"0.64603204",
"0.64603204",
"0.64603204",
"0.64603204",
"0.64603204",
"0.64603204",
"0.64603204",
"0.64603204",
"0.64603204",
"0.64603204",
"0.64603204",
"0.64603204",
"0.64603204",
"0.64603204",
"0.64603204",
"0.64603204",
"0.64603204",
"0.64603204",
"0.64603204",
"0.64603204",
"0.64603204",
"0.645237",
"0.645237",
"0.645237",
"0.64105636",
"0.6402518",
"0.63991207",
"0.63911164",
"0.638289",
"0.6380699",
"0.63450795",
"0.6318324",
"0.6305383",
"0.6286072",
"0.6226624",
"0.61996824",
"0.6161351",
"0.61547786",
"0.61547786",
"0.61547786",
"0.61547786",
"0.6120123",
"0.61144125",
"0.6113813",
"0.6110625",
"0.6098917",
"0.6092552",
"0.60802376",
"0.6061579",
"0.60576147",
"0.60526955",
"0.60255104",
"0.60209674",
"0.60162854",
"0.6011206",
"0.60050476",
"0.5988854",
"0.59727854",
"0.59671843",
"0.5957033",
"0.5956995",
"0.594651",
"0.59443307",
"0.5938642",
"0.59290135",
"0.59241194",
"0.5922905",
"0.591383",
"0.5913627"
] | 0.74865043 | 1 |
Delete attribute by unique identifier. | public function destroy(ProductAttributeList $attribute)
{
if($attribute->delete()) {
return redirect(route('attributes.index'))->with('success', trans('messages.attribute.deleted'));
}
return redirect(route('attributes.index'))->with('error', trans('messages.error'));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function delete($idAttrEam);",
"public function deleteAttribute($id)\n {\n }",
"public function delete_attribute($id = null)\n {\n\n ProductsAttributes::where(['id' => $id])->delete();\n\n Alert::warning('Deleted', ' Attribute Deleted Successfully');\n return redirect()->back();\n }",
"public function remove_attribute(string $attribute){\n foreach($this -> attributes as $key => $value){\n if($value -> get_name() === $attribute){\n array_splice($this -> attributes, $key, 1);\n }\n }\n }",
"public function destroy(Attribute $attribute)\n {\n //\n }",
"public function __unset($attribute) {\n return $this->deleteAttribute($attribute);\n }",
"public function getAttributeToDeleteProperty()\n {\n return Attribute::find($this->deleteAttributeId);\n }",
"function removeAttribute($sessionId, $attributeName) {\n\n Util::throwExceptionIfNullOrBlank($sessionId, \"session Id\");\n Util::throwExceptionIfNullOrBlank($attributeName, \"Attribute Name\");\n $encodedSessionId = Util::encodeParams($sessionId);\n $encodedAttributeName = Util::encodeParams($attributeName);\n $responseObj = new App42Response();\n $objUtil = new Util($this->apiKey, $this->secretKey);\n try {\n\t\t $params = null;\n $headerParams = array();\n $queryParams = array();\n $signParams = $this->populateSignParams();\n $metaHeaders = $this->populateMetaHeaderParams();\n $headerParams = array_merge($signParams, $metaHeaders);\n $signParams['sessionId'] = $sessionId;\n $signParams['name'] = $attributeName;\n $signature = urlencode($objUtil->sign($signParams)); //die();\n $params['signature'] = $signature;\n $contentType = $this->content_type;\n $accept = $this->accept;\n $baseURL = $this->url;\n $baseURL = $baseURL . \"/id/\" . $encodedSessionId . \"/\" . $encodedAttributeName;\n $response = RestClient::delete($baseURL, $params, null, null, $contentType, $accept,$headerParams);\n $sessionResponseObj = new SessionResponseBuilder();\n $sessionObj = $sessionResponseObj->buildResponse($response->getResponse());\n $responseObj->setStrResponse($sessionObj);\n $responseObj->setResponseSuccess(true);\n } catch (App42Exception $e) {\n throw $e;\n } catch (Exception $e) {\n throw new App42Exception($e);\n }\n return $responseObj;\n }",
"public function delete() {\n\t\t$sql = 'delete from cart_orders_products_attributes where orders_products_attributes_id=\"' . e($this->getId()) . '\"';\n\t\tDatabase::singleton()->query($sql);\n\t}",
"public function removeAttribute(AttributeValueInterface $attribute);",
"public function removeAttribute($key)\n {\n $key = strtolower($key);\n unset($this->attr[$key]);\n }",
"public function removeAttribute($attribute)\n {\n array_forget($this->attributes, $attribute);\n\n $this->update();\n }",
"public function destroyattr($id)\n {\n $attr = Attribute::find($id);\n $attr->delete();\n return redirect('CategoryPageListattributes')->with('message','deleted');\n }",
"public function remove($key)\r\n {\r\n unset($this->attributes[$key]);\r\n }",
"public function deleteAttribute($attributeId)\r\n {\r\n // check if attribute is used somewhere\r\n $attributeServiceGet = new Service_Attribute_Get($this->translator, $this->logger, $this->getThemeId());\r\n $attributeDaoImpl = new Dao_Attribute();\r\n $count = $attributeDaoImpl->countAttributeUsed($attributeId);\r\n\r\n $statusCode = 0;\r\n try {\r\n if ($count['cnt'] != 0) {\r\n // deactivate\r\n $attributeDaoImpl->deactivateAttribute($attributeId);\r\n $statusCode = 2;\r\n } else {\r\n $attributeStored = $attributeServiceGet->getAttibute($attributeId);\r\n Util_Workflow::archiveScript($attributeStored[Db_Attribute::SCRIPT_NAME], null, 'executable');\r\n\r\n $attributeDaoImpl->deleteAttribute($attributeId);\r\n $statusCode = 1;\r\n }\r\n } catch (Exception $e) {\r\n $this->logger->log($e);\r\n try {\r\n $attributeDaoImpl->deactivateAttribute($attributeId);\r\n $statusCode = 2;\r\n } catch (Exception $e) {\r\n $this->logger->log($e);\r\n $statusCode = 0;\r\n }\r\n }\r\n\r\n return $statusCode;\r\n }",
"public function remove_attribute($name)\n {\n }",
"public function deleteAction() {\n\t\t$id = $this->getRequest ()->getParam ( 'id' );\n\t\t$controller = Zend_Controller_Front::getInstance ()->getRequest ()->getControllerName ();\n\t\t\n\t\tif (! empty ( $id ) && is_numeric ( $id )) {\n\t\t\tif(ProductsAttributes::deleteAttribute($id)){\n\t\t\t\t$this->_helper->redirector ( 'list', $controller, 'admin', array ('mex' => $this->translator->translate ( 'Attribute deleted' ), 'status' => 'information' ) );\t\n\t\t\t}\n\t\t}\n\t\t$this->_helper->redirector ( 'list', $controller, 'admin', array ('mex' => $this->translator->translate ( 'Unable to process the request at this time.' ), 'status' => 'danger' ) );\n\t}",
"public function delAttr(string $key) {\n unset($this->attributes[$key]);\n\n return $this;\n }",
"public function __unset($key)\n {\n unset($this->attributes[$key]);\n }",
"public function __unset($key)\n {\n unset($this->attributes[$key]);\n }",
"public function __unset($key)\n {\n unset($this->attributes[$key]);\n }",
"public function __unset($key)\n {\n unset($this->attributes[$key]);\n }",
"public function __unset($key)\n {\n unset($this->attributes[$key]);\n }",
"abstract public function removeAttribute($name, $domain = '');",
"public function deleteWhere(string $attribute)\n {\n return $this->queryBuilder->delete($this->table, $attribute);\n }",
"public function deleteAttribute($purchase_id) {\n// $sql = \"UPDATE purchase SET active = 0, status = '\".Agent::STATUS_MASTER_DELETE.\"', date_upd = '\".date(\"Y-m-d H:i:s\").\"' \";\n// $sql.= \"WHERE purchase_id IN ($purchase_id) \";\n// $this->db->query($sql);\n// return $this->db->affected_rows();\n }",
"public function destroy($id)\n {\n // Find attribute\n $productAttr = MonkCommerceProductAttribute::find($id);\n // Delete Attribute Value\n foreach($productAttr->attributeValues as $value)\n {\n $attrVal = MonkCommerceProductAttributeValue::find($value->id);\n $attrVal->delete();\n }\n // Detach attribute and values\n $productAttr->attributeValues()->detach();\n // Delete product attribute\n $productAttr->delete();\n /*\n * Message and Redirect\n */\n Session::flash('success', 'Product Attribute Has Been Deleted');\n return Redirect::route('product-attribute.index');\n }",
"public function actionPriceAttributeDelete($id)\n {\n \n $detail=ServicePrice::model()->with('additionalAttrs')->findByAttributes(array('id'=>$id));\n //echo \"<pre>\";print_r($detail);die;\n foreach($detail->additionalAttrs as $d)\n {\n $d->delete();\n //echo \"<pre>\";print_r($d);\n }//die;\t\n $detail->delete();\n \t echo \"success\";\n\n }",
"public function delete($_identifier) {\n }",
"public static function _delete($a_server_id)\r\n\t{\r\n\t\tglobal $ilDB;\r\n\t\t\r\n\t\t$query = \"DELETE FROM ldap_attribute_mapping \".\r\n\t\t\t\"WHERE server_id =\".$ilDB->quote($a_server_id,'integer');\r\n\t\t$res = $ilDB->manipulate($query);\r\n\t}",
"public function removeAttribute(string $attributeName) {\n if(isset($this->attributes[$attributeName]))\n unset($this->attributes[$attributeName]);\n }",
"public function destroy($id)\n {\n $attribute_name = \\DB::table('product_attributes')->where('id', $id)->first();\n $attribute_values = \\DB::table('product_attribute_values')->where('product_attribute_id', $id)->get();\n\n Product_attribute_values::whereIn('id', $attribute_values->pluck('id'))->delete();\n Product_attributes::find($id)->delete();\n return redirect()->route('product_attributes.index')->with('success', 'Attribute deleted successfully');\n\n }",
"function deleteAttribute($value_id)\n {\n unset($this->arrRelations[$value_id]);\n return true;\n }",
"public function destroy($id)\n {\n abort_if(Gate::denies('Attributevalue_delete'),Response::HTTP_FORBIDDEN,'403 Forbidden');\n\n $Attribute = AttributeValue::findOrFail($id);\n $Attribute->delete();\n return response()->json(response(null, Response::HTTP_NO_CONTENT));\n }",
"function clients_deleteAttribute($items,$identifier) {\t\n\t## prepare the db-object\n\t$db_connectionStore = new DB_Sql();\n\n\tforeach($items as $current_element) {\t\n\t\t## insert the new value\n\t\t$query = \"DELETE FROM \".DB_PREFIX.$GLOBALS['_MODULE_DATAOBJECTS_DBPREFIX'].\"_\".$identifier.\" WHERE id='\".$current_element.\"'\";\n\t\t$result_pointer = $db_connectionStore->query($query);\t\n\t\t\n\t\t## remove everything from the connector\n\t\t$query = \"DELETE FROM \".DB_PREFIX.$GLOBALS['_MODULE_DATAOBJECTS_DBPREFIX'].\"2\".$identifier.\" WHERE item_id='\".$current_element.\"'\";\n\t\t$result_pointer = $db_connectionStore->query($query);\t\t\n\t}\n}",
"public function removeAttribute(string $name, int $scope);",
"public function removeAttribute($name)\n {\n unset($this->attributes[$name]);\n }",
"public function __unset($name) {\n\t\tif ($this->hasAttribute($name))\n\t\t\tunset($this->_attributes[$name]);\n\t\telse\n\t\t\tparent::__unset($name);\n\t}",
"function delete_by($attribute, $value) {\n\t\t$sql = \"\n\t\t\tDELETE FROM\n\t\t\t\t\\\"{$this->schema}\\\".\\\"{$this->tableName}\\\"\n\t\t\tWHERE\n\t\t\t\t\\\"{$attribute}\\\" = '{$value}'\n\t\t\";\n\t\t$this->debug->show('delete_by sql: ' . $sql, false);\n\t\t$query = pg_query($this->database->dbConn, $sql);\n\t\treturn $query;\n\t}",
"public function destroy($id)\n {\n $attribute = $this->attributeRepository->findOrFail($id);\n\n if (! $attribute->is_user_defined) {\n return response()->json([\n 'message' => trans('admin::app.settings.attributes.user-define-error'),\n ], 400);\n }\n\n try {\n Event::dispatch('settings.attribute.delete.before', $id);\n\n $this->attributeRepository->delete($id);\n\n Event::dispatch('settings.attribute.delete.after', $id);\n\n return response()->json([\n 'status' => true,\n 'message' => trans('admin::app.response.destroy-success', ['name' => trans('admin::app.settings.attributes.attribute')]),\n ], 200);\n } catch(\\Exception $exception) {\n return response()->json([\n 'message' => trans('admin::app.settings.attributes.delete-failed'),\n ], 400);\n }\n }",
"function deleteAttribute(){\n\n\t//Database connection\n\tglobal $mysqli;\n\t\n\t//Hrefs\n\tglobal $cms_continent;\n\tglobal $cms_deleteAttribute;\n\n\t//Selected continent and attribute\n\t$continent_id=$_GET[\"continent_id\"];\n\t$attribute_id=$_GET[\"attribute_id\"];\n\t\n\t//Selection of the paths of the files to delete\n\t$sql_itemFiles=\"SELECT * FROM items WHERE continent_id=\".d($mysqli, $continent_id).\" AND attribute_id=\".d($mysqli, $attribute_id).\"; \";\n\t$res_itemFiles=mysqli_query($mysqli, $sql_itemFiles);\n\t$sql_attributeFiles=\"SELECT * FROM attributes WHERE continent_id=\".d($mysqli, $continent_id).\" AND attribute_id=\".d($mysqli, $attribute_id).\" LIMIT 1;\";\n\t$res_attributeFiles=mysqli_query($mysqli, $sql_attributeFiles);\n\n\t//Deletion of the item files\n//\tif($res_itemFiles){\n\n\t//\twhile($itemFile=$res_itemFiles->fetch_assoc()){\n\n\t//\t\tunlink(\"\".$itemFile[\"image_path\"].\"\");\n\t//\t\tunlink(\"\".$itemFile[\"description_path\"].\"\");\n\n\t//\t}\n\n//\t}\n\n\t//Deletion of the attribute files\n//\tif($res_attributeFiles){\n\n//\t\twhile($attributeFile=$res_attributeFiles->fetch_assoc()){\n\n//\t\t\tunlink(\"\".$attributeFile[\"image_path\"].\"\");\n//\t\t\tunlink(\"\".$attributeFile[\"description_path\"].\"\");\n\n//\t\t}\n\n//\t}\n\n\n\t//Deletion of the associated rows from the database\n\t$sql_deleteAttributeItems=\"DELETE FROM items WHERE continent_id=\".d($mysqli, $continent_id).\" AND attribute_id=\".d($mysqli, $attribute_id).\";\";\n\t$res_deleteAttributeItems=mysqli_query($mysqli, $sql_deleteAttributeItems);\n\t$sql_deleteAttribute=\"DELETE FROM attributes WHERE continent_id=\".d($mysqli, $continent_id).\" AND attribute_id=\".d($mysqli, $attribute_id).\";\";\n\t$res_deleteAttribute=mysqli_query($mysqli, $sql_deleteAttribute);\n\n\tif($res_deleteAttributeItems && $res_deleteAttribute){\n\n\t\tpage_redirect(\"\".$cms_continent.\"?continent_id=\".$continent_id.\"\");\n\n\t}else{\n\n\t\tpage_redirect(\"\".$cms_deleteAttribute.\"?continent_id=\".$continent_id.\"&attribute_id=\".$attribute_id.\"\");\n\n\t}\n if($res_itemFiles){\n \n $res_itemFiles->close(); \n \n }\n\tif($res_attributeFiles){\n\t \n\t $res_attributeFiles->close(); \n\t \n\t}\n\t\n\tif($res_deleteAttributeItems){\n\t \n\t $res_deleteAttributeItems->close(); \n\t \n\t}\n\tif($res_deleteAttribute){\n\t \n\t $res_deleteAttribute->close(); \n\t \n\t}\n\t$mysqli->close();\n\n}",
"public function destroy($id)\n {\n $attribute = $this->attributeRepository->deleteAttribute($id);\n\n if (!$attribute) {\n return $this->responseRedirectBack('Une erreur est survenue lors de la suppression de l\\'attribut', 'error', true, true);\n }\n\n return $this->responseRedirect('admin.attributes.index', 'Attribut supprimé avec succèss' ,'success',false, false);\n }",
"public function removeAttribute($name)\n {\n unset($_SESSION[$name]);\n }",
"public function delete($keyName);",
"public function offsetUnset($key)\n {\n $this->attributes->forget($key);\n }",
"public function offsetUnset($key)\n {\n unset($this->attributes[$key]);\n }",
"function del_entity_attrib($entity_type, $entity_id, $attrib_type)\n{\n if (is_array($entity_id))\n {\n // Passed entity array, instead id\n $translate = entity_type_translate_array($entity_type);\n $entity_id = $entity_id[$translate['id_field']];\n }\n if (!$entity_id) { return NULL; }\n\n if (isset($GLOBALS['cache']['entity_attribs'][$entity_type][$entity_id]))\n {\n // Reset entity attribs\n unset($GLOBALS['cache']['entity_attribs'][$entity_type][$entity_id]);\n }\n\n return dbDelete('entity_attribs', '`entity_type` = ? AND `entity_id` = ? AND `attrib_type` = ?', array($entity_type, $entity_id, $attrib_type));\n\n}",
"public function destroy($id)\n {\n //\n $attr = Attribute::find($id);\n $attr->delete();\n return $this->index();\n\n }",
"protected function deleteFile($attribute)\n {\n try {\n Yii::$app->fs->delete($this->getUploadPath() . $this->$attribute);\n } catch (Exception $e) {\n // If the file couldn't be remove, silence the error.\n }\n }",
"function deleteAttributes($id)\n {\n /* Delete attributes. */\n $query = sprintf('DELETE FROM %s WHERE %s = %s',\n $this->_params['attribute_table'],\n $this->_params['id_column'],\n (int)$id);\n\n Horde::logMessage('SQL Query by Hylax_SQL_Attributes::deleteAttributes(): ' . $query, 'DEBUG');\n $result = $this->_db->query($query);\n if (is_a($result, 'PEAR_Error')) {\n return $result;\n }\n\n return true;\n }",
"function delete_user_attribute( $user_id, $meta_key, $meta_value = '' ) {\n _deprecated_function( __FUNCTION__, '2.0.0', 'delete_user_meta' );\n\n $result = delete_user_meta( $user_id, $meta_key, $meta_value );\n\n do_action( 'deleted_user_attribute', $user_id, $meta_key, $meta_value );\n\n return $result;\n}",
"public function offsetUnset($key)\n\t{\n\t\tunset($this->attributes[$key]);\n\t}",
"public function destroy(Attribute $attrID)\n {\n Attribute::deleteAttribute($attrID);\n\n return response()->json(['code' => 204], 200);\n }",
"public function __unset($name)\n\t{\n\t\tif(isset($this->_attributes[$name]))\n\t\t\tunset($this->_attributes[$name]);\n\t\telse\n\t\t\tparent::__unset($name);\n\t}",
"abstract protected function removeOwner(int $ownerId, string $owner, string $ownerAttribute):bool;",
"public function delete($key);",
"public function delete($key);",
"public function delete($key);",
"function deleteAttribute($dn, $info, $user)\n\t{\n\t\tglobal $conf;\n\n\t\tdol_syslog(get_class($this).\"::deleteAttribute dn=\".$dn.\" info=\".join(',',$info));\n\n\t\t// Check parameters\n\t\tif (! $this->connection)\n\t\t{\n\t\t\t$this->error=\"NotConnected\";\n\t\t\treturn -2;\n\t\t}\n\t\tif (! $this->bind)\n\t\t{\n\t\t\t$this->error=\"NotConnected\";\n\t\t\treturn -3;\n\t\t}\n\n\t\t// Encode to LDAP page code\n\t\t$dn=$this->convFromOutputCharset($dn,$this->ldapcharset);\n\t\tforeach($info as $key => $val)\n\t\t{\n\t\t\tif (! is_array($val)) $info[$key]=$this->convFromOutputCharset($val,$this->ldapcharset);\n\t\t}\n\n\t\t$this->dump($dn,$info);\n\n\t\t//print_r($info);\n\t\t$result=@ldap_mod_del($this->connection, $dn, $info);\n\n\t\tif ($result)\n\t\t{\n\t\t\tdol_syslog(get_class($this).\"::deleteAttribute successfull\", LOG_DEBUG);\n\t\t\treturn 1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->error=@ldap_error($this->connection);\n\t\t\tdol_syslog(get_class($this).\"::deleteAttribute failed: \".$this->error, LOG_ERR);\n\t\t\treturn -1;\n\t\t}\n\t}",
"public function __unset($name)\n {\n if (array_key_exists($name, $this->_attributes)) {\n unset($this->_attributes[$name]);\n }\n }",
"public function deleteRecordById($subattr_id)\n {\n $this->delete(['id' => $subattr_id]);\n }",
"abstract public function delete($key);",
"abstract public function delete ($key);",
"public function massDestroy()\n {\n $count = 0;\n\n foreach (request('rows') as $attributeId) {\n $attribute = $this->attributeRepository->find($attributeId);\n\n if (! $attribute->is_user_defined) {\n continue;\n }\n\n Event::dispatch('settings.attribute.delete.before', $attributeId);\n\n $this->attributeRepository->delete($attributeId);\n\n Event::dispatch('settings.attribute.delete.after', $attributeId);\n\n $count++;\n }\n\n if (! $count) {\n return response()->json([\n 'message' => trans('admin::app.settings.attributes.mass-delete-failed'),\n ], 400);\n }\n\n return response()->json([\n 'message' => trans('admin::app.response.destroy-success', ['name' => trans('admin::app.settings.attributes.title')]),\n ]);\n }",
"private function removeAttribute( $attr )\n {\n if (isset($this->attributeTypes[$attr]) || array_key_exists($attr, $this->attributeTypes))\n unset( $this->attributeTypes[$attr] ); // forma de remover un valor de un array...\n }",
"public function del($key);",
"public function removeAttributeValue($attribute, $user) {\n\t\tif($aid = $this->getAttributeID($attribute)) {\n\n\t\t\tif(!$this->disableEvents) {\n\t\t\t\t$e = new AttributeEvent();\n\t\t\t\t$e->setAttribute($attribute);\n\t\t\t\tSkylineServiceManager::getEventManager()->trigger(SKY_EVENT_USER_ATTRIBUTE_REMOVE, $e, $attribute, $user);\n\t\t\t}\n\n\t\t\tif($user instanceof PDOResourceInterface)\n\t\t\t\t$user = $user->getID();\n\n\t\t\tif(is_numeric($user)) {\n\t\t\t\tif($map = $this->boundFilesMap[ $aid ] ?? false) {\n\t\t\t\t\t$map = realpath(ServiceManager::generalServiceManager()->mapValue( $map ));\n\t\t\t\t\tif($map) {\n\t\t\t\t\t\tforeach($this->PDO->select(\"SELECT value FROM SKY_USER_ATTRIBUTE_Q WHERE user = $user AND attribute = $aid\") as $record) {\n\t\t\t\t\t\t\t$value = $record[\"value\"];\n\n\t\t\t\t\t\t\tif(file_exists($file = \"$map/$value\")) {\n\t\t\t\t\t\t\t\tunlink($file);\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\n\t\t\t\t$this->PDO->exec(\"DELETE FROM SKY_USER_ATTRIBUTE_Q WHERE user = $user AND attribute = $aid\");\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"public function delete($uuid, $webspaceKey);",
"public function delete( $key );",
"public function actionDelete($id)\n {\n $model=$this->findModel($id);\n Yii::info( Yii::t('app/log', \"Delete attr(attr name:{attrName})\", ['attrName' =>$model->name]), 'operations');\n $model->delete();\n return $this->redirect(['index']);\n }",
"public function getAttributeId();",
"public function delete($variable);",
"public function productFeature_delete($id)\n{\n $product_items = ProductAttribute::where('product_id','=',$id)->get();\n\n foreach ($product_items as $key => $productitem) {\n\n $productItem = ProductAttribute::find($productitem->id);\n $productItem->delete();\n }\n\n}",
"public function deleteAttributes($id, string $name): Response\n {\n $records = FileSystem::findFirstOrFail($id);\n\n $recordAttributes = FileSystemSettings::findFirstOrFail([\n 'conditions' => 'filesystem_id = ?0 and name = ?1',\n 'bind' => [$records->getId(), $name]\n ]);\n\n //true true delete\n $recordAttributes->delete();\n\n return $this->response(['Delete Successfully']);\n }",
"abstract public function delete( $key );",
"public function __unset($name)\n {\n // Dont' allow to unset attributes Ruts\n }",
"public static function deleteReviewsByAttractionName($attractionName)\n\t{\n\t\tReview::where('AttractionName','=',$attractionName)->delete();\n\t}",
"public function deleteItem($key);",
"public function remove_attributes( $id_array )\t\t\r\n\t\t{\r\n\t\t\t$this->errno = DB_OK;\r\n\r\n\t\t\tif ( $this->cat_id == -1 )\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//\tSuch category hasn't been created\r\n\t\t\t{\r\n\t\t\t\t$this->errno = WRONG_ID;\r\n\t\t\t\treturn ;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$id_length = 0; \r\n\t\r\n\t\t\tif ( isset ( $id_array ) )\r\n\t\t\t\t$id_length = count ( $id_array );\r\n\t\t\t\t\r\n\t\t\tif ( $id_length == 0 )\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//\tthe existance of at least one attribute is mandatory\r\n\t\t\t\treturn WRONG_INPUT;\t\t\r\n\t\t\t\r\n\t\t\t$this->con->query(\"START TRANSACTION;\");\r\n\t\t\t\r\n\t\t\tfor ( $i = 0; $i < $id_length; $i++ )\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//\tfilling the database attribute attribute\r\n\t\t\t{\r\n\t\t\t\t$attr = new attribute( $this->con, $id_array[$i], $this->cat_id );\r\n\t\t\t\t\r\n\t\t\t\tif ( ( $this->errno = $attr->get_errno() ) != DB_OK )\r\n\t\t\t\t{\r\n\t\t\t\t\t$this->con->query(\"ROLLBACK;\");\r\n\t\t\t\t\treturn ;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t$attr->remove_attribute();\r\n\t\t\t\t\r\n\t\t\t\tif ( ( $this->errno = $attr->get_errno() ) != DB_OK )\r\n\t\t\t\t{\r\n\t\t\t\t\t$this->con->query(\"ROLLBACK;\");\r\n\t\t\t\t\treturn ;\r\n\t\t\t\t}\r\n\t\t\t}\t\t\t\t\t\r\n\t\t\t\r\n\t\t\t$this->con->query(\"COMMIT;\");\r\n\t\r\n\t\t}",
"public function attributeDelete($web_id)\r\n {\r\n list($response) = $this->attributeDeleteWithHttpInfo($web_id);\r\n return $response;\r\n }",
"public function delete_attr_cat($id)\n\t{\n\t\t$update=$this->db->where(array(\"f_att_id\"=>$id))->update('food_attribute',array(\"f_att_deleted\"=>'1'));\n\t\tif($update)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}",
"public function destroy($id)\n { \n $this->authorize('isAdminOrMerchant');\n $AttributeGroup=AttributeGroup::where('id',$id)->first(); \n $AttributeGroup->delete();\n return ['message'=>'Item deleted'];\n }",
"abstract public function deleteById($id);",
"public function delete($key): void;",
"public function delete_attributes($domain_name, $item_name, $attributes = null, $opt = null)\n\t{\n\t\tif (!$opt) $opt = array();\n\t\t$opt['DomainName'] = $domain_name;\n\t\t$opt['ItemName'] = $item_name;\n\n\t\tif ($attributes)\n\t\t{\n\t\t\t$opt = array_merge($opt, CFComplexType::map(array(\n\t\t\t\t'Attribute' => (is_array($attributes) ? $attributes : array($attributes))\n\t\t\t)));\n\t\t}\n\n\t\treturn $this->authenticate('DeleteAttributes', $opt, $this->hostname);\n\t}",
"public function Delete($id)\n {\n $attribute=Attribute::find($id);\n $attribute->delete();\n return redirect()->route('main.attribute')->with(['success' => 'تم الحذف بنجاح']);\n }",
"public function actionDelete($id)\n {\n $model = Catalog2::findOne($id);\n \n if (file_exists($_SERVER['DOCUMENT_ROOT'] . '/upload/catalog2/small/' . $model->alias . '.jpg'))\n unlink($_SERVER['DOCUMENT_ROOT'] . '/upload/catalog2/small/' . $model->alias . '.jpg');\n \n $this->findModel($id)->delete();\n\n $attributeShow = new AttributeShow(); \n $attributeShow->find()->where(['catalog2_id'=>$id])->one()->delete();\n\n return $this->redirect(['index']);\n }",
"protected function deleteAttributeRequest($attribute_id)\n {\n // verify the required parameter 'attribute_id' is set\n if ($attribute_id === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $attribute_id when calling deleteAttribute'\n );\n }\n if ($attribute_id < 1) {\n throw new \\InvalidArgumentException('invalid value for \"$attribute_id\" when calling DefaultApi.deleteAttribute, must be bigger than or equal to 1.');\n }\n $resourcePath = '/product-attributes/{attributeId}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // path params\n if ($attribute_id !== null) {\n $resourcePath = str_replace(\n '{' . 'attributeId' . '}',\n ObjectSerializer::toPathValue($attribute_id),\n $resourcePath\n );\n }\n // body params\n $_tempBody = null;\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\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 'DELETE',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public final function __unset(string $name) : void\n {\n unset($this->attrs[$name]);\n }",
"function imageDelete($property);",
"public function unsetAttributeSet($index)\n {\n unset($this->attributeSet[$index]);\n }",
"public function delete( $oid=null );",
"function delete() {\n $this->that->delete($this->id, $this->name);\n $this->put_id();\n }",
"public function destroy($id)\n {\n $modelAttributes = new ModelAttributes();\n $modelAttributes->_delete($id);\n\n return redirect('/atributos')->with('success','Atributo excluído com sucesso');\n }",
"public function __unset($key) {\n\t\tforeach (array('attributes', 'relationships') as $source) {\n\t\t\tunset($this->$source[$key]);\n\t\t}\n\t}",
"public function elementAttributeRemoved($elementId, $elementAttributeName)\n {\n $this->elementShouldExist($elementId);\n\n $removeElementAttributeJavaScript = <<<JS\n document.getElementById('$elementId').removeAttribute('$elementAttributeName');\nJS;\n $this->getSession()->executeScript($removeElementAttributeJavaScript);\n\n $assertElementAttributeNotExistJavaScript = <<<JS\n var targetAttribute = document.getElementById('$elementId').getAttribute('$elementAttributeName');\n\n return ! targetAttribute;\nJS;\n $this->assertByJavaScript(\n $assertElementAttributeNotExistJavaScript,\n 'The target element\\'s attribute \"' . $elementAttributeName . '\" was not successfully removed.'\n );\n }",
"abstract public function delete(string $identifier): array;",
"public function getAttributeGroupToDeleteProperty()\n {\n return AttributeGroup::find($this->deleteGroupId);\n }",
"abstract public function delete($id);",
"abstract public function delete($id);",
"abstract public function delete($id);"
] | [
"0.76510555",
"0.7059918",
"0.7029509",
"0.6913595",
"0.6607366",
"0.6594937",
"0.65839064",
"0.6574793",
"0.65560424",
"0.65528905",
"0.6500322",
"0.64991325",
"0.6473119",
"0.645823",
"0.64481634",
"0.6439821",
"0.6403662",
"0.63713646",
"0.63451535",
"0.63451535",
"0.63451535",
"0.63451535",
"0.63451535",
"0.6342363",
"0.63325375",
"0.63245374",
"0.63197565",
"0.62837154",
"0.6274914",
"0.6239655",
"0.6205353",
"0.6187961",
"0.61677563",
"0.6149105",
"0.6143758",
"0.61094207",
"0.6100919",
"0.60952806",
"0.60887",
"0.6087806",
"0.608389",
"0.6082106",
"0.60622287",
"0.6048415",
"0.60480744",
"0.6036245",
"0.60209835",
"0.59804046",
"0.5976286",
"0.5975023",
"0.5962811",
"0.59519315",
"0.59481883",
"0.59277654",
"0.591915",
"0.59102863",
"0.59102863",
"0.59102863",
"0.5907024",
"0.5868752",
"0.5841185",
"0.5832706",
"0.58060217",
"0.5772815",
"0.5754306",
"0.5733781",
"0.57308894",
"0.57238543",
"0.5717731",
"0.56911653",
"0.56810254",
"0.56666255",
"0.5660465",
"0.56583756",
"0.5650738",
"0.5647747",
"0.5635961",
"0.5630733",
"0.5628329",
"0.5618456",
"0.56119263",
"0.56042486",
"0.5595697",
"0.5594906",
"0.55944616",
"0.55813694",
"0.55568415",
"0.5553456",
"0.5546648",
"0.5529725",
"0.5528745",
"0.5518474",
"0.5514643",
"0.54959315",
"0.549384",
"0.54647475",
"0.54630405",
"0.54529434",
"0.54427534",
"0.54427534",
"0.54427534"
] | 0.0 | -1 |
check attribute name unique. | public function checkAttrName(Request $request){
$attrId = $request->attr_id;
if(isset($attrId) && !empty($attrId)){
$data = ProductAttributeList::where('attribute_name',$request->attrName)->where('id','!=',$attrId)->get();
if(count($data) > 0){
$responce = 1;
}else{
$responce = 0;
}
}else{
$data = ProductAttributeList::where('attribute_name',$request->attrName)->get();
if(count($data) > 0){
$responce = 1;
}else{
$responce = 0;
}
}
echo $responce;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function checkNameForUnique($attribute): bool\n {\n $item = $this->getItem($this->name);\n\n if (null !== $item && $this->getOldName() !== $item->name) {\n $this->addError($attribute, Module::t('rbac', 'This name already exists.'));\n return false;\n }\n\n return true;\n }",
"private function _check_valid_attr($string) {\n\t\t\n\t\t$result = true;\n\t\t\n\t\t// Check $name for correct characters\n\t\t// \"^[a-zA-Z0-9_-]*$\"\n\t\t\n\t\treturn $result;\n\t\t\n\t}",
"public function validateUniqueSpaceCheck(){\n Validator::extend('unique_space_check',function($attribute,$value,$parameters){\n $attribute =(isset($paramters[1]))? $parameters[1]: $attribute;\n $value=trim(preg_replace('/\\s\\s+/', '', $value));\n $check= DB::table($parameters[0])->where($attribute,$value)->count();\n //$this->Fnlog('parameters:'.$parameters[0].' attribute:'.$attribute.' value:'.$value.' check:'.$check);\n return ($check>0)?false:true;\n }, 'The :attribute has already been taken.'\n );\n }",
"public function validateName($attribute)\n {\n if (!$this->hasErrors()) {\n if (!preg_match('/^[\\w\\s\\p{L}]{1,255}$/u', $this->$attribute)) {\n $this->addError($attribute, Yii::t('podium/view', 'Name must contain only letters, digits, underscores and spaces (255 characters max).'));\n }\n }\n }",
"public function checkunique(){\n\t\n\t\t$count =$this->countByAttributes(array(\n 'no'=>$this->no,\n\t\t\t'TanggalTest'=>$this->TanggalTest\n ));\n\t}",
"public function has_attribute( $name ) {\n\t\treturn array_key_exists( $name, $this->attributes );\n\t}",
"public function hasAttribute($name)\n {\n $name = htmlspecialchars($name, ENT_QUOTES);\n return array_key_exists($name, $this->attributes);\n }",
"public function isUnique();",
"public function has(string $name): bool {\n $name = str_replace([\"-\", \" \"], \"_\", strtolower($name));\n return isset($this->attributes[$name]);\n }",
"private function unique ($param)\n {\n list($Class, $Method) = explode(',', $param);\n $Count = $Class::$Method($this->value, self::$ExceptID);\n if ($Count)\n {\n $this->SetError('unique', 'The '.$this->SpacedKey.' field value is already in use and must be unique');\n return false;\n }\n return true;\n }",
"public function uniqueQueryName($attribute,$params)\n\t{\n\n\t $user_id = Yii::app()->user->getId();\n\n\t $result = Query::model()->findByAttributes(array(\n\t \t'user_id' => $user_id,\n\t \t'name'=>$this->name\n\t ));\n\n\t //check name is unqie\n\t if ($result) {\n\n\t \t$this->addError($attribute, 'You already have a query with that name.');\n\n\t }\n\n\t}",
"public function hasAttribute(string $name): bool {\n return isset($this->attributes[$name]);\n }",
"public function checkIfUniqueName($data_unique_name)\n\t{\n\t\t$db = Factory::getDbo();\n\t\t$query\t= $db->getQuery(true);\n\t\t$query->select('count(name) FROM #__tjfields_fields');\n\t\t$query->where('name=\"' . $data_unique_name . '\"');\n\t\t$db->setQuery($query);\n\t\t$is_unique = $db->loadResult();\n\n\t\treturn $is_unique;\n\t}",
"function __checkDuplicateName()\n {\n $result = $this->find('first', array('conditions' => array('name' => $this->data[$this->name]['name'])));\n if ($result) {\n $this->errorMessage='Duplicate name found. Please change the name.';\n return false;\n }\n\n return true;\n }",
"public function __isset($name)\n\t{\n\t\tif(isset($this->_attributes[$name]))\n\t\t\treturn true;\n\t\telse\n\t\t\treturn parent::__isset($name);\n\t}",
"public function hasNewAttribute($name)\n {\n return array_key_exists($name, $this->attributes);\n }",
"public function hasAttribute($name)\n {\n return array_key_exists($name, $this->attributes);\n }",
"protected function isUnique($stat_name)\n\t{\n\t\treturn (in_array($stat_name, $this->unique_stats_appid) || $this->isUniqueCLK($stat_name));\n\t}",
"public function hasAttribute($name)\n {\n return array_key_exists($name, $this->_attributes);\n }",
"public function hasAttribute($attr_name)\n {\n return isset($this->attributes[$attr_name]);\n }",
"public function validateUniqueItemDetailNames($attribute, $value)\n {\n $details = new Collection($value);\n $detail_names = $details->map(function($detail) { return strtolower(trim($detail['key'])); });\n\n return $detail_names->unique()->count() == $details->count();\n }",
"public function hasAttribute($name) {\n\t\treturn isset($this->_attributes[$name]);\n\t}",
"protected function isNotUnique($stat_name)\n\t{\n\t\treturn in_array($stat_name, $this->unique_stats_appid_ununique);\n\t}",
"public function isValueMustBeUnique(): bool;",
"public function attributeExists ( $name ) {\n\n return $this->getStream()->attributeExists($name);\n }",
"private function hasOldAttribute($name)\n {\n $collection = $this->getOldAttributes();\n return array_key_exists($name, $collection);\n }",
"public function hasAttribute ($name)\n {\n\n return isset($this->attributes[$name]);\n\n }",
"private static function _validateUniqueConstraint(\n DomElement $unique,\n $keyPosition,\n $prefix=''\n ) {\n $msg = $prefix;\n\n if ($unique->getAttribute('name') === '') {\n $msg .= ' unique constraint #'.$keyPosition;\n $msg .= ' does not have \"name\" attribute.';\n throw new DALParserException($msg);\n }\n\n $cols = $unique->getElementsByTagName('column');\n if ($cols->length === 0) {\n $msg .= 'unique constraint #'.$keyPosition.' does now have columns.';\n throw new DALParserException($msg);\n }\n\n }",
"public final function __isset(string $name) : bool\n {\n return isset($this->attrs[$name]);\n }",
"public function hasAttribute($name)\n {\n return isset($this->attributes[$name]);\n }",
"public function hasAttributeByName($attributeName);",
"private function has_attribute($attritube)\n {\n $allattribute=$this->attribute();\n if(array_key_exists($attritube,$allattribute))\n return true;\n return false;\n }",
"public function hasAttribute($name)\n {\n $attribute = $this->getAttribute($name);\n if (!is_null($attribute)) {\n return true;\n } else {\n return false;\n }\n }",
"public function hasName(): bool\n {\n return $this->nameAttr !== NULL;\n }",
"public static function isInyectedAttribute( $attr )\n {\n return ( strcmp($attr, \"id\") == 0 || strcmp($attr, \"deleted\") == 0 || strcmp($attr, \"class\") == 0 );\n }",
"public function hasAttribute(string $name): bool;",
"private final static function validPropertyName($name)\n {\n return !preg_match('#[^a-z0-9_]|^[^a-z]|__#', $name);\n }",
"public function checkHostnameUniqueness($attribute,$params)\r\n {\r\n $condition = \"hostname = '{$this->hostname}' AND owner_id = {$this->owner_id}\";\r\n if ($this->id) $condition .= \" AND id != {$this->id}\";\r\n if(Vhost::model()->find($condition))\r\n $this->addError($attribute,\"Hostname {$this->hostname} has already been taken.\");\r\n }",
"abstract public function hasAttribute($name, $domain = '');",
"private function has_attribute($attribute) {\n\t // Will return true or false\n\t return array_key_exists($attribute, $this->attributes());\n\t}",
"public static function nameIsValid($name) {\r\n return ( is_string($name) && !empty($name) && strlen($name) >=2 ); \r\n }",
"private function has_attribute($attribute){\n\t\t//(inlcuding private ones) as keys and current values as value.\n\t\t\n\t\t$object_vars = $this->attributes();\n\t\t//want to check key exists, dont care about value here\n\t\t//returns true or false\t\n\t\t\n\t\treturn array_key_exists($attribute, $object_vars);\n\t}",
"private function has_attribute($attribute) {\n // Will return true or false\n return array_key_exists($attribute, $this->attributes());\n }",
"function name_exists($str){\n\n\t\tif(strlen($str)<3 || strlen($str)>30){\n\t\t\t$this->form_validation->set_message('name_exists','The field {field} must be between 3 and 30 characters in length');\n\t\t\treturn false;\n\t\t}\n\t\t$nameExists = $this->DAO->entitySelection('station',array('nameStation'=>$str),TRUE);\n\t\tif($nameExists['data']){\n\t\t\t$this->form_validation->set_message('name_exists','The field {field} already exists');\n\t\t\treturn false;\n\t\t}else{\n\t\t\treturn true;\n\t\t}\n\t}",
"private function has_attribute($attribute){\r\n //(incl.private ones!) as the keys and their current values as the value\r\n $object_vars = $this->attributes();\r\n //we dont care about the value, we just want to know if the key exists\r\n //will return true or false\r\n return array_key_exists($attribute, $object_vars);\r\n }",
"public function hasAttribute($name)\n {\n return isset($this->_attributes[$name]) || in_array($name, $this->attributes(), true);\n }",
"public static function validateUnique(TagInput $control)\r\n\t{\r\n\t\treturn count(array_unique($control->getValue()))===count($control->getValue());\r\n\t}",
"public function ContainsEmptyAttribute()\n {\n foreach(self::$attributes as $attribute)\n {\n if($this->$attribute == '')\n {\n $this->_error = 'All attributes cannot be empty';\n return true;\n }\n }\n \n return false;\n }",
"public static function isValidName($name) {}",
"private function scopeNameIsUnique($name){\n $dql = \"SELECT s from Scope s\n WHERE s.name = :name\";\n $query = $this->em->createQuery($dql);\n $result = $query->setParameter('name', $name)->getResult();\n\n return count($result)==0;\n }",
"public function checkInputExists($name);",
"function valid_name($name) {\r\n\tif (empty($name)) \r\n\t\treturn false;\r\n\telse\r\n\t\treturn true;\r\n }",
"private function checkAttribute($attr)\n {\n if (! in_array($attr, $this->attributeNames)) {\n throw new BadFunctionCallException(\"Attribute '$attr' doesn't exist for the entity type '$this->entityType'.\");\n }\n }",
"public function testVerifyNoUniqueName()\r\n\t{\r\n\t\t$dbh = $this->dbh;\r\n\r\n\t\t// Crate a new email message which has no unique name\r\n\t\t$obj = CAntObject::factory($dbh, \"email_message\", null, $this->user);\r\n\t\t$obj->setValue(\"subject\", \"verify unique name test\");\r\n\t\t$obj->save();\r\n\t\t$this->assertEquals($obj->getValue(\"uname\"), \"\");\r\n\r\n\t\t// Save again and make sure the unique name is just set to the id\r\n\t\t$obj->save();\r\n\t\t$this->assertEquals($obj->getValue(\"uname\"), $obj->id);\r\n\r\n\t\t// Cleanup\r\n\t\t$obj->removeHard();\r\n\t}",
"public function name_valid($name) {\n if (!preg_match(\"/^[a-z0-9]+$/i\", $name)) {\n /* name contains invalid characters */\n return false;\n }\n\n if (strlen($name) >= 100) {\n /* name is too long */\n return false;\n }\n\n /* name already exists? */\n $stmt = get_pdo()->prepare('select * from user where name = :name');\n $stmt->bindValue(':name', $name);\n $stmt->execute();\n return count($stmt->fetchAll()) == 0;\n }",
"public static function attributeExists(Attribute $data) {\n $model = self::_getDataType();\n $pId = $data->getId();\n if($pId > 0) {\n return parent::dbRecordExists($data);\n } elseif((string) $data->getName() !== '') {\n $att = self::getAttributeByName($data->getName());\n return (boolean) ($att instanceof Attribute);\n } else {\n throw new \\Exception(__METHOD__.\" requires valid/populated model as input\");\n }\n }",
"public function testAutonameOdd() {\r\n\t\t$autoname1=autoname(9);\r\n\t\t$autoname2=autoname(9);\r\n\t\r\n\t\t$this->assertNotEquals($autoname1, $autoname2);\r\n\t}",
"protected function hasAttribute(string $key): bool\n {\n return in_array($key, $this->getAttributes());\n }",
"public function hasAttr($attr);",
"public function title_is_unique() {\n $sql = \"SELECT * \n FROM `card` ca, `column` co\n WHERE ca.Title=:title AND ca.Column=co.ID AND co.Board=:board_id\";\n $params = array(\n \"title\"=>$this->get_title(), \n \"board_id\"=>$this->get_board_id(),\n );\n $query = self::execute($sql, $params);\n $data=$query->fetch();\n return $query->rowCount()==0 ;\n }",
"public function rules()\n {\n return [\n 'name' => 'required | unique:persons,name,'.$this->uuid.',uuid'\n ];\n }",
"public function testAutonameEven() {\r\n\t\t$autoname1=autoname(10);\r\n\t\t$autoname2=autoname(10);\r\n\t\r\n\t\t$this->assertNotEquals($autoname1, $autoname2);\r\n\t}",
"function is_name_valid($input)\n {\n return (preg_match(\"/^([-a-z_ ])+$/i\", $input)) ? TRUE : FALSE;\n }",
"function attrExists($attrKey) {\n return isset($this->attributes[$attrKey]);\n }",
"function attribute_validation($attribute) {\n\n /* Checks each attribute individually to make sure it is a valid string */\n foreach ($attribute as $value) {\n\n $numbers = '0123456789';\n\n /* Checks to make sure the value is a string and that there are no numbers contained in the string */\n if (!is_string($value) || (strcspn($value, $numbers) != strlen($value))) {\n\n//echo \"strcspn:\".strcspn($value, $numbers).\" strlen:\".strlen($value);\n $errorMessage = \"Sorry \" . $value . \" is not a valid attribute\";\n echo $errorMessage;\n echo \"\\n\";\n\n $errorLog = new ErrorFileHandler($this->logfile);\n $errorLog->add_to_error_log($errorMessage);\n\n return false;\n }\n }\n\n return true;\n }",
"public function nameIsClean()\n {\n return ($this->getName() != '' && $this->getName() == $this->getCleanName());\n }",
"public function testAutonameNoLength() {\r\n\t\t$autoname1=autoname(0);\r\n\t\t$this->assertEquals(0, strlen($autoname1));\r\n\t}",
"public function uniqueUsername($uname) {\n\t\treturn !$this->hasAny(array('username' => $uname));\n\t}",
"public function testInvalidAttributeName()\n {\n $config = array(\n\t\tnull\n );\n\n $result = self::processFilter($config, self::$request);\n }",
"public function hasAttribute ($attr) {\r\n\t\t\r\n\t\tforeach ($this as $node) \r\n\t\t\tif (!$node->attributes->getNamedItem($attr)) return false;\r\n\t\t\r\n\t\treturn true;\r\n\t}",
"public function isUniqueUsername(){\n \tif(!empty($this->data['User']['username'])){\n \t\t$username = $this->data['User']['username'];\n\n \t\t$user = $this->find('first', array(\n \t\t\t'conditions' => array(\n \t\t\t\t'User.username' => $username,\n \t\t\t)\n \t\t));\n \t\tif(empty($user)){\n \t\t\treturn true;\n \t\t}else{\n \t\t\treturn false;\n \t\t}\n \t}\n \treturn false;\n }",
"protected function uniqueCheck(string $attribute, string $value): bool\n {\n if (!$this->orm->getRepository(User::class)->findBy([$attribute => $value]) == null)\n throw new UniqueKeyViolationException($attribute,null, 'user');\n return true;\n }",
"public function hasAttribute(string $attribute): bool\n {\n return array_key_exists($attribute, $this->data);\n }",
"public function validateDuplicates($attribute)\n\t{\n\t\t// Find the season_id for the selected LAN\n\t\t$lan = Lan::model()->findByPk($this->lan_id);\n\t\tif ($lan === null)\n\t\t\treturn;\n\n\t\t// See if the user has a payment for that season\n\t\t$payment = Payment::model()->findByAttributes(array(\n\t\t\t'user_id'=>$this->user_id, 'season_id'=>$lan->season_id));\n\n\t\tif ($payment !== null)\n\t\t\t$this->addError($attribute, Yii::t('payment', 'Användaren har redan betalat'));\n\t}",
"abstract protected function mustApplyRuleOnAttribute(): bool;",
"protected function isUniqueCLK($stat_name)\n\t{\n\t\t// First check the end of the stat string to make sure it is _confirm or _agree\n\t\tif (!substr_compare($stat_name, '_agree', strrpos($stat_name,'_'))\n\t\t\t|| $confirm = !substr_compare($stat_name, '_confirm', strrpos($stat_name,'_')))\n\t\t{\n\t\t\t// Get rid of bb_ at the start if it is a confirm stat\n\t\t\tif ($confirm)\n\t\t\t{\n\t\t\t\t$stat_name = substr($stat_name, 3);\n\t\t\t}\n\t\n\t\t\t// The property short should be anything left between the start and the _agree/_confirm\n\t\t\t$property_short = substr($stat_name, 0, strrpos($stat_name,'_'));\n\t\t\tif (EnterpriseData::isCompanyProperty(EnterpriseData::COMPANY_CLK, $property_short))\n\t\t\t{\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t}\n\t\treturn FALSE;\n\t}",
"private function assertValidName() : void\n {\n InvalidDescriptorArgumentException::assertIsNotEmpty(\n $this->name,\n '#[Route.name] must contain a non-empty string.'\n );\n }",
"private function has_attribute($attribute) {\r\n // (incl. private ones!) as the keys and their current values as the value\r\n $object_vars = get_object_vars($this);\r\n // We don't care about the value, we just want to know if the key exists\r\n // Will return true or false\r\n return array_key_exists($attribute, $object_vars);\r\n }",
"function isUniqueKey(): bool;",
"function wp_kses_attr_check(&$name, &$value, &$whole, $vless, $element, $allowed_html)\n {\n }",
"public function message() {\n\t\treturn 'The :attribute must be unique.';\n\t}",
"public function __isset($name) {\n\t\tif ($this->hasAttribute($name))\n\t\t\treturn true;\n\t\telse\n\t\t\treturn parent::__isset($name);\n\t}",
"public function isUnique()\n {\n return $this->isUnique;\n }",
"private function isUniqueFilename($name)\n {\n $storageDirectory = $this->fileSystem->getStorageDirectory();\n $filePath = $storageDirectory . $name;\n if ($this->fileSystem->directoryExists($filePath)) {\n return false;\n } else {\n return true;\n }\n }",
"public function isError($attribute);",
"function duplicateName(){\n $dup = $this->app['db']->fetchColumn('SELECT id from worlds where name=?', array($this->name));\n if($dup == $this->id || !$dup){\n return false;\n }\n $this->validation_errors[] = 'Name is a duplicate';\n return true;\n }",
"private function has_attribute($attribute) {\n\t // (incl. private ones!) as the keys and their current values as the value\n\t $object_vars = get_object_vars($this);\n\t // We don't care about the value, we just want to know if the key exists\n\t // Will return true or false\n\t return array_key_exists($attribute, $object_vars);\n\t}",
"private function has_attribute($attribute) {\n\t // (incl. private ones!) as the keys and their current values as the value\n\t $object_vars = get_object_vars($this);\n\t // We don't care about the value, we just want to know if the key exists\n\t // Will return true or false\n\t return array_key_exists($attribute, $object_vars);\n\t}",
"private function has_attribute($attribute){\r\n\t // (incl. private ones!) as the keys and their current values as the value\r\n\t $object_vars = get_object_vars($this);\r\n\t // We don't care about the value, we just want to know if the key exists\r\n\t // Will return true or false\r\n\t return array_key_exists($attribute, $object_vars);\r\n }",
"private function has_attribute($attribute)\n\t\t{\n\t\t//(incl. private ones!) as the keys and their current values as the value\n\t\t$object_vars = get_object_vars($this);\n\t\t//we don't care about the value, we just want to know if the key exists \n\t\t//will return true or false\n\t\treturn array_key_exists($attribute, $object_vars);\n\t\t}",
"public function isUniqueToAPage()\n {\n return true;\n }",
"public function hasAttribute(): bool\n {\n return isset($this->attribute);\n }",
"function isUniqueName( $name='', $moduleID='') \n {\n \n // if moduleID not provided, then use current value in object\n if ( $moduleID == '') {\n $moduleID = $this->getValueByFieldName( 'module_id' );\n }\n \n // if module id isn't empty\n $condition = '';\n if ( $moduleID != '') {\n $condition = 'module_id='.$moduleID;\n }\n\n // return unique field result\n return $this->isUniqueFieldValue( $name, 'statevar_name', $condition );\n }",
"public function isAttributeCodeAlreadyExist($wholedata)\r\n {\r\n $attributes = $this->_objectManager->get('Magento\\Catalog\\Model\\Product')->getAttributes();\r\n $allattrcodes = [];\r\n foreach ($attributes as $a) {\r\n $allattrcodes[] = $a->getEntityType()->getAttributeCodes();\r\n }\r\n\r\n $this->_logger->info('####### Seller Attribute Log : allattrcodes: '.json_encode($allattrcodes));\r\n\r\n if (!empty($allattrcodes)) {\r\n if (!empty($allattrcodes) && in_array($wholedata['attribute_code'], $allattrcodes)) {\r\n $this->messageManager->addError( __('Attribute Code already exists'));\r\n return $this->resultRedirectFactory->create()->setPath('*/*/new',\r\n ['_secure' => $this->getRequest()->isSecure()]\r\n );\r\n }\r\n }\r\n }",
"function is_unique_username($username)\n\t{\n\t\t$this->ci->db->select('*');\n\t\t$this->ci->db->where('au_username', $username);\n\t\t$query = $this->ci->db->get('auth_user');\n\t\tif($query->num_rows() == 0)\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}",
"public function __isset($attribute)\n {\n if (empty($this->attributes[$attribute]) === false) {\n return true;\n } else {\n return false;\n }\n }",
"public function attributeExists($attributeName) {\n\t\treturn in_array($attributeName, $this->getAttributeNames(), true);\n\t}",
"public static function checkName($name)\n {\n if (strlen($name) >= 2) {\n return true;\n }\n return false;\n }",
"function isSetName($input) {\n return (preg_match(\"~(^[[:alnum:] -]+$)~\", $input));\n }",
"public static function checkName($name)\r\n {\r\n if (strlen($name) >= 4) {\r\n return true;\r\n }\r\n return false;\r\n }",
"function validate_name($name)\r\n\t{\r\n\t\t$trim = trim($name);\r\n\t\tif(strlen($trim) > 1)\r\n\t\t{\r\n\t\t\treturn TRUE;\r\n\t\t}\r\n\t\treturn FALSE;\r\n\t}"
] | [
"0.7610761",
"0.70404905",
"0.6928993",
"0.65744764",
"0.6541545",
"0.6472002",
"0.6395215",
"0.638819",
"0.63138664",
"0.63116664",
"0.6299251",
"0.628398",
"0.62809116",
"0.62777054",
"0.6268538",
"0.6268445",
"0.6225195",
"0.6208252",
"0.6195501",
"0.61896056",
"0.61853474",
"0.61251545",
"0.6105158",
"0.61009765",
"0.60767895",
"0.60663414",
"0.6063827",
"0.6063764",
"0.60554725",
"0.60338706",
"0.60274804",
"0.60237193",
"0.60162944",
"0.601132",
"0.600069",
"0.59916663",
"0.5969416",
"0.5968398",
"0.5967523",
"0.59401405",
"0.5937592",
"0.59323514",
"0.592165",
"0.59099853",
"0.5908845",
"0.5896162",
"0.58910656",
"0.5890601",
"0.5887548",
"0.5838913",
"0.5825615",
"0.5822928",
"0.58206606",
"0.58172053",
"0.58100986",
"0.5804395",
"0.5803107",
"0.5800749",
"0.57997346",
"0.5798285",
"0.5797993",
"0.5789694",
"0.5783824",
"0.57751817",
"0.57742447",
"0.57698643",
"0.57662123",
"0.5765519",
"0.57607675",
"0.5758472",
"0.5755727",
"0.57548666",
"0.5750653",
"0.5750628",
"0.57396567",
"0.57394",
"0.57374364",
"0.57352155",
"0.5733393",
"0.5728414",
"0.5726763",
"0.5726762",
"0.57212144",
"0.57121104",
"0.5689503",
"0.5675108",
"0.56736225",
"0.56736225",
"0.56723404",
"0.56536776",
"0.56536114",
"0.5652064",
"0.56506395",
"0.56493443",
"0.564492",
"0.5641341",
"0.56404096",
"0.5638947",
"0.5632429",
"0.5632424",
"0.5631615"
] | 0.0 | -1 |
A basic test example. | public function basicTest() {
$response = $this->call('GET', '/');
$this->assertEquals(200, $response->status());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testExample()\n {\n }",
"public function test() {\n \t\n\t\tprint_r('hello stef');\n \t\n }",
"public function testBasicExample()\n {\n $this->assertTrue(true);\n }",
"public function testBasicExample()\n {\n $this->assertEquals(1, 1);\n }",
"function test_sample() {\n\n\t\t$this->assertTrue( true );\n\n\t}",
"public function testBasicExample()\n {\n $this->visit('/')\n ->see('TROLOLOLO');\n }",
"public function testBasicTest()\n {\n\n }",
"public function testExample()\n {\n dump(\"testExample\");\n $this->assertTrue(true);\n }",
"public function testExample()\n\t{\n\t\t$this->assertTrue(true);\n\t}",
"public function testExample()\n {\n //this test is empty as we have not yet decided if we want to use dusk\n\n // $this->get('/')\n // ->click('About')\n // ->seePageIs('/about');\n }",
"function testSample() {\n\t\t$this->assertTrue( true );\n\t}",
"public function test() {\n\n\t}",
"public static function test() {\r\n echo 'this is a test';\r\n }",
"public function testExample()\n {\n $this->assertTrue(true);\n \n }",
"public function testExample()\n {\n $this->assertTrue(true);\n }",
"public function testExample()\n {\n // lets make it risky to destroy the green\n }",
"public function testBasicExample()\n\t{\n \t$response = $this->call('GET', '/');\n\t\t$this->assertEquals(200, $response->getStatusCode());\n\t}",
"public function testExample()\n {\n $this->visit('ticket')\n ->see('Listado de Tickets')\n ->seeLink('Ver Ticket') \n ->visit('ticket/1')\n ->see('Quod et autem sed')\n ->seeLink('Ver todos los tickets')\n ->click('Ver todos los tickets')\n ->see('Listado de Tickets')\n ->seeLink('Agregar un ticket', 'ticket/crear');\n }",
"function test_sample() {\n\t\t$this->assertTrue( true );\n\t}",
"public function testBasicExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/')\n ->assertSee('Login to Airtel Sales Force System');\n });\n }",
"public function testBasicExample()\n {\n $this->visit('/')\n ->see('API tester');\n }",
"public function testExample()\n {\n $response = $this->get('/api/test/');\n\n $response->assertStatus(200);\n }",
"public function testBasicExample()\n\t{\n\t\t$response = $this->call('GET', '/');\n\n\t\t$this->assertEquals(200, $response->getStatusCode());\n\t}",
"public function testExample()\n {\n $this->assertTrue(true);\n }",
"public function testExample()\n {\n $this->assertTrue(true);\n }",
"public function testExample()\n {\n $this->assertTrue(true);\n }",
"public function testExample()\n {\n $this->assertTrue(true);\n }",
"public function testExample()\n {\n $this->assertTrue(true);\n }",
"public function testExample()\n {\n $this->assertTrue(true);\n }",
"public function testExample()\n {\n $this->assertTrue(true);\n }",
"public function testExample()\n {\n $this->assertTrue(true);\n }",
"public function testExample()\n {\n $this->assertTrue(true);\n }",
"public function testExample()\n {\n $this->assertTrue(true);\n }",
"public function testExample()\n {\n $this->assertTrue(true);\n }",
"public function testExample()\n {\n $this->assertTrue(true);\n }",
"public function testExample()\n {\n $this->assertTrue(true);\n }",
"public function testExample()\n {\n $this->assertTrue(true);\n }",
"public function testExample()\n {\n $this->assertTrue(true);\n }",
"public function testExample()\n {\n $this->assertTrue(true);\n }",
"public function testExample()\n {\n $this->assertTrue(true);\n }",
"public function testExample()\n {\n $this->assertTrue(true);\n }",
"public function testExample()\n {\n $this->assertTrue(true);\n }",
"public function testExample()\n {\n $this->assertTrue(true);\n }",
"public function testExample()\n {\n $this->assertTrue(true);\n }",
"public function testExample()\n {\n $this->assertTrue(true);\n }",
"public function testExample()\n {\n $this->assertTrue(true);\n }",
"public function testExample()\n {\n $this->assertTrue(true);\n }",
"public function testExample()\n {\n $this->assertTrue(true);\n }",
"public function testExample()\n {\n $this->assertTrue(true);\n }",
"public function testExample()\n {\n $this->assertTrue(true);\n }",
"public function testExample()\n {\n $this->assertTrue(true);\n }",
"public function testExample()\n {\n $this->assertTrue(true);\n }",
"public function testExample()\n {\n $this->assertTrue(true);\n }",
"public function testExample()\n {\n $this->assertTrue(true);\n }",
"public function testExample()\n {\n $this->assertTrue(true);\n }",
"public function testExample()\n {\n $this->assertTrue(true);\n }",
"public function testExample()\n {\n $this->assertTrue(true);\n }",
"public function testExample()\n {\n $this->assertTrue(true);\n }",
"public function testExample()\n {\n $this->assertTrue(true);\n }",
"public function testExample()\n {\n $this->assertTrue(true);\n }",
"public function testExample()\n {\n $this->assertTrue(true);\n }",
"public function testExample()\n {\n $this->assertTrue(true);\n }",
"public function testExample()\n {\n $this->assertTrue(true);\n }",
"public function testExample()\n {\n $this->assertTrue(true);\n }",
"public function testExample()\n {\n $this->assertTrue(true);\n }",
"public function testExample()\n {\n $this->assertTrue(true);\n }",
"public function testExample()\n {\n $this->assertTrue(true);\n }",
"public function testExample()\n {\n $this->assertTrue(true);\n }",
"public function testExample()\n {\n $this->assertTrue(true);\n }",
"public function testExample()\n {\n $this->assertTrue(true);\n }",
"public function testExample()\n {\n $this->assertTrue(true);\n }",
"public function testExample()\n {\n $this->assertTrue(true);\n }",
"public function testExample()\n {\n $this->assertTrue(true);\n }",
"public function testExample()\n {\n $this->assertTrue(true);\n }",
"public function testExample()\n {\n $this->assertTrue(true);\n }",
"public function testExample()\n {\n $this->assertTrue(true);\n }",
"public function testExample()\n {\n $this->assertTrue(true);\n }",
"public function testExample()\n {\n $this->assertTrue(true);\n }",
"public function testExample()\n {\n $this->assertTrue(true);\n }",
"public function testExample()\n {\n $this->assertTrue(true);\n }",
"public function testExample()\n {\n $this->assertTrue(true);\n }",
"public function testBasicExample()\n {\n $this->visit('/')\n ->see('URL Notes');\n }",
"public function testBasicTest()\n {\n $response = $this->get('/test');\n\n $response->assertStatus(200);\n\n $response->assertSeeText('小粽子');\n\n }",
"function test_sampleme() {\n\t\t// Replace this with some actual testing code.\n\t\t$this->assertTrue( true );\n\t}",
"public function testBasic()\n {\n $this->assertEquals(1, 1);\n }",
"public function testBasicExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/admin/news/create')\n ->type('title', '123')\n ->type('text', 'test123')\n ->press('Добавить новость')\n\n ->assertSee('Мало букв в поле Заголовок');\n });\n }",
"public function testBasicTest()\n {\n $response = $this->get('/dangthi');\n $response->assertStatus(200);\n }",
"public function testBasicExample()\n {\n $this->visit('/')\n ->see('html');\n }",
"public function testExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->loginAs(User::find(1))\n ->visitRoute('subscription', ['id' => '1'])\n ->radio('gender', 'L')\n ->type('fullName', 'GHF')\n ->type('birthdate', '04/24/1999')\n ->type('phone', '088177552')\n ->type('address', 'Bandung')\n ->press('Submit');\n });\n }",
"public function testExample(): void\n {\n $this->assertTrue(true);\n }",
"public function testExample()\n {\n $this->browse(function ($browser , $second) {\n $browser->visit('/')\n //->assertVueContains('name','sina','@editor');\n ->assertVue('name','sina','@editor');\n // ->pause(3000)\n // ->click('.test');\n // ->assertSee('Register')\n // ->value('#name' , 'sina')\n // ->value('#email' , Str::random(10).'@gmail.com')\n // ->value('#password' , '123456789')\n // ->value('#password-confirm' , '123456789')\n // ->click('button[type=\"submit\"]')\n // ->assertPathIs('/home')\n // ->refresh()\n // ->script('alert(\"ok\")');\n });\n }",
"public function testBasicExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/')\n ->with('.special-text', function ($text) {\n $text->assertSee('title1');\n });\n\n // 確認商品數量\n $browser->click('.check_product')\n ->waitForDialog(5)\n ->assertDialogOpened('商品數量充足')\n ->acceptDialog();\n\n // 設定中斷點\n eval(\\Psy\\sh());\n });\n }",
"public function testExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->loginAs(\"[email protected]\")\n ->visit(\"/home\");\n });\n }",
"public function testExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/')\n ->assertSee('React JS examples');\n });\n }",
"public function testBasicExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/')\n ->assertSee('Laravel');\n });\n }",
"public function testBasicExample()\n {\n $response = $this->call('GET', '/');\n\n $this->assertResponseOk();\n }",
"public function test_example()\n {\n $this->assertTrue(true);\n }",
"public function test_example()\n {\n $this->assertTrue(true);\n }",
"public function test_example()\n {\n $this->assertTrue(true);\n }",
"public function test_example()\n {\n $this->assertTrue(true);\n }",
"public function testExample()\n {\n $this->visit('/')\n ->see('WELCOME');\n }"
] | [
"0.7977854",
"0.77753335",
"0.76435244",
"0.7610687",
"0.754975",
"0.75405073",
"0.75393844",
"0.74867696",
"0.74400353",
"0.7432722",
"0.7412231",
"0.73547494",
"0.73383486",
"0.7337478",
"0.7308627",
"0.7305436",
"0.72681046",
"0.7260569",
"0.72460294",
"0.7215908",
"0.71952444",
"0.7174572",
"0.71719897",
"0.7171955",
"0.7171955",
"0.7171955",
"0.7171955",
"0.7171955",
"0.7171955",
"0.7171955",
"0.7171955",
"0.7171955",
"0.7171955",
"0.7171955",
"0.7171955",
"0.7171955",
"0.7171955",
"0.7171955",
"0.7171955",
"0.7171955",
"0.7171955",
"0.7171955",
"0.7171955",
"0.7171955",
"0.7171955",
"0.7171955",
"0.7171955",
"0.7171955",
"0.7171955",
"0.7171955",
"0.7171955",
"0.7171955",
"0.7171955",
"0.7171955",
"0.7171955",
"0.7171955",
"0.7171955",
"0.7171955",
"0.7171955",
"0.7171955",
"0.7171955",
"0.7171955",
"0.7171955",
"0.7171955",
"0.7171955",
"0.7171955",
"0.7171955",
"0.7171955",
"0.7171955",
"0.7171955",
"0.7171955",
"0.7171955",
"0.7171955",
"0.7171955",
"0.7171955",
"0.7171955",
"0.7171955",
"0.7171955",
"0.7171955",
"0.7171955",
"0.7171955",
"0.7167066",
"0.715222",
"0.7132968",
"0.7123071",
"0.7119535",
"0.7109628",
"0.70886546",
"0.70870566",
"0.70733815",
"0.7068619",
"0.7050562",
"0.7045842",
"0.7031207",
"0.7030824",
"0.7030337",
"0.70302093",
"0.70302093",
"0.70302093",
"0.70302093",
"0.70291555"
] | 0.0 | -1 |
Gets the coachmarkLocation The coachmark location. | public function getCoachmarkLocation()
{
if (array_key_exists("coachmarkLocation", $this->_propDict)) {
if (is_a($this->_propDict["coachmarkLocation"], "\Beta\Microsoft\Graph\Model\CoachmarkLocation") || is_null($this->_propDict["coachmarkLocation"])) {
return $this->_propDict["coachmarkLocation"];
} else {
$this->_propDict["coachmarkLocation"] = new CoachmarkLocation($this->_propDict["coachmarkLocation"]);
return $this->_propDict["coachmarkLocation"];
}
}
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setCoachmarkLocation($val)\n {\n $this->_propDict[\"coachmarkLocation\"] = $val;\n return $this;\n }",
"public function getLocation() {\n\t\treturn($this->location);\n\t}",
"public function getLocation()\n\t{\n\t\treturn $this->location;\n\t}",
"public function getLocation()\n\t{\n\t\treturn $this->location;\n\t}",
"public function getLocation()\n\t{\n\t\treturn $this->location;\n\t}",
"public function getLocation()\n\t{\n\t\treturn $this->location;\n\t}",
"public function get_location()\n\t{\n\t\treturn $this->location;\n\t}",
"public function getLocation()\r\n {\r\n return $this->location;\r\n }",
"public function getLocation()\n {\n return $this->location;\n }",
"public function getLocation()\n {\n return $this->location;\n }",
"public function getLocation()\n {\n return $this->location;\n }",
"public function getLocation()\n {\n return $this->location;\n }",
"public function getLocation()\n {\n return $this->location;\n }",
"public function getLocation()\n {\n return $this->location;\n }",
"public function getLocation()\n {\n return $this->location;\n }",
"public function getLocation()\n {\n return $this->location;\n }",
"public function getLocation()\n {\n return $this->location;\n }",
"public function getLocation()\n {\n return $this->location;\n }",
"public function getLocation()\n {\n return $this->location;\n }",
"public function getLocation()\n {\n return $this->location;\n }",
"public function getLocation()\n {\n return $this->location;\n }",
"public function getLocation()\n\t{\n\t\treturn $this->_location;\n\t}",
"public function getLocation() {\n return $this->location;\n }",
"public function currentLocation() {\n return $this->currentLocation;\n }",
"public function getLocation() {\r\n return $this->location;\r\n }",
"public function getLocation()\n {\n return isset($this->location) ? $this->location : null;\n }",
"public function getCustomerLocation()\n {\n if (array_key_exists(\"customerLocation\", $this->_propDict)) {\n if (is_a($this->_propDict[\"customerLocation\"], \"\\Beta\\Microsoft\\Graph\\Model\\Location\") || is_null($this->_propDict[\"customerLocation\"])) {\n return $this->_propDict[\"customerLocation\"];\n } else {\n $this->_propDict[\"customerLocation\"] = new Location($this->_propDict[\"customerLocation\"]);\n return $this->_propDict[\"customerLocation\"];\n }\n }\n return null;\n }",
"public function getLocation() { return $this->location; }",
"public function getLocation() {\n return $this->location;\n }",
"public function getLocation()\n {\n return $this->getLocationData();\n }",
"public function location()\n {\n return $this->resolvedLocation ?: $this->location;\n }",
"public function getLocation()\n {\n return $this->get('location');\n }",
"public function getCashRegisterLocation()\n {\n return $this->cashRegisterLocation;\n }",
"public function getLocation() : ?string\n {\n return $this->location;\n }",
"public function get_branch_location() {\n $data['category_branch_location'] = $this->Category_model->get_branch_location();\n return $data['category_branch_location'];\n }",
"public function getBusinessLocationCode()\n {\n return $this->businessLocationCode;\n }",
"public function getOriginLocation()\n {\n return $this->originLocation;\n }",
"public function getOriginLocation()\n {\n return $this->originLocation;\n }",
"public function getLocation();",
"public function getLocation();",
"public function getLng();",
"public function getUserLocation();",
"public function getCoordinate()\n {\n return $this->coordinate;\n }",
"public function getGeolocation()\n {\n return $this->geolocation;\n }",
"public function getCoordinate() {\n return $this->coordinate;\n }",
"public function getEventLocation() {\n\t\treturn ($this->eventLocation);\n\t}",
"public function getCurrentMarker()\n {\n if($this->currentMarker < 0 || $this->currentMarker > count($this->markers) - 1) return false;\n return $this->markers[$this->currentMarker];\n }",
"public function getCoordinate() {\n\n return $this->coordinate;\n }",
"function getMarker() {\n\t\treturn $this->marker;\n\t}",
"public function weatherLocation() {\n\t\treturn $this->get('PLZ');\n\t}",
"public function GetLatitude()\n {\n // phpcs:enable PSR1.Methods.CamelCapsMethodName.NotCamelCaps\n return $this->_search_center_lat;\n }",
"public function getOriginLocation()\r\n {\r\n $first_location = $this->getRoutes()->getOriginLocation();\r\n\r\n return $first_location;\r\n }",
"public function getLat()\n {\n return $this->lat;\n }",
"public function getLat()\n {\n return $this->lat;\n }",
"function getLocation(){ return $this->_Location;}",
"public function getLocation()\n\t{\n\t\treturn null;\n\t}",
"public function getLat();",
"public function getFinLocation()\n {\n return $this->finLocation;\n }",
"public function getLocation()\n {\n return $this->apiLocation === 'Yahoo' ? $this->getLocationYahoo() : $this->getLocationGoogle();\n }",
"public function preferredLocation() {\n return $this->preferredLocation;\n }",
"function get_location() {\n\n\t\tif ( ! isset( $this->location ) ) {\n\t\t\t$this->location = new Workflow_Location( $this );\n\t\t\t$this->location = apply_filters( 'automatewoo/workflow/location', $this->location, $this );\n\t\t}\n\n\t\treturn $this->location;\n\t}",
"public function getMarker()\n {\n\t\treturn $this->_marker;\n\t}",
"public function getLocationY()\n {\n return $this->locationY;\n }",
"public function getLatitude()\n {\n return $this->Latitude;\n }",
"public function getLocation()\n {\n return $this->banner_location_id;\n }",
"public function getSourceLocation()\n {\n return $this->source_location;\n }",
"public function getCanonicalLocation(): string;",
"private function getLocation() {\n }",
"public function getLng()\n {\n return $this->lng;\n }",
"public function getLatitude()\n {\n return $this->get('Latitude');\n }",
"private function get_location () {\n try {\n // MaxMind GeoIP lookup\n // See: http://maxmind.github.io/GeoIP2-php/\n $reader = new Reader('assets/GeoLite2-City.mmdb');\n $record = $reader->city($_SERVER['REMOTE_ADDR']);\n return [\n 'lat' => $record->location->latitude,\n 'lng' => $record->location->longitude\n ];\n } catch (Exception $e) {\n return false;\n }\n }",
"public function getCaddress()\n {\n return $this->caddress;\n }",
"public function getArrivalLocation()\n {\n return $this->arrivalLocation;\n }",
"public function getOfficeLocation()\n {\n return $this->getProperty(\"OfficeLocation\");\n }",
"public static function getCurLocationID()\n {\n return Yii::app()->getsetSession->getLocationId();\n }",
"public function getLocationMarkerContent()\n {\n return $this->MarkerContent ?: $this->MarkerContent;\n }",
"public function point()\n {\n \treturn $this->club ? $this->club->point : null;\n }",
"public function getDeliveryLocation()\n {\n return $this->deliveryLocation;\n }",
"public function getLocationHeader()\n {\n return $this->getHeader(self::HEADER_LOCATION);\n }",
"public function getLocation()\n {\n return $this->getParameter('location');\n }",
"public function getLatitude()\n {\n return $this->latitude;\n }",
"public function getHometown()\n\t{\n\t\treturn $this->hometown;\n\t}",
"public function getMarkersCenterCoord()\n\t{\n\t\tif (null === $this->resources->itemAt('markers'))\n\t\t\tthrow new CException(Yii::t('EGMap', 'At least one more marker is necessary for getMarkersCenterCoord to work'));\n\t\t//todo: check for markers existence\n\t\treturn EGMapMarker::getCenterCoord($this->resources->itemAt('markers'));\n\t}",
"public function getPlacePosition()\n {\n return substr($this->place, 0, 1);\n }",
"public function getLatitude()\n {\n return $this->latitude;\n }",
"public function getLatitude()\n {\n return $this->latitude;\n }",
"public function getLatitude()\n {\n return $this->latitude;\n }",
"public function getLatitude()\n {\n return $this->latitude;\n }",
"public function getLatitude()\n {\n return $this->latitude;\n }",
"public function getLatitude()\n {\n return $this->latitude;\n }",
"public function getLatitude()\n {\n return $this->latitude;\n }",
"public function getLatitude()\n {\n return $this->latitude;\n }",
"public function getMarkerCluster()\n {\n return $this->markerCluster;\n }",
"public function getLocationMarkerLabel()\n {\n return $this->MarkerLabel ?: $this->MarkerLabel;\n }",
"public function getLatitude() {\n\n return $this->latitude;\n\n }",
"public function getLatLong()\n {\n return $this->latLong;\n }",
"public function getCoord(){\n return $this->coord;\n }",
"private function get_cities_origin() {\n $t_location = get_transient('wcis_location');\n return $t_location['cities'];\n }",
"public function getLatitude(){\r\n\t\treturn $this->latitude;\r\n\t}",
"public function getLocation()\n {\n return $this->index;\n }"
] | [
"0.6907085",
"0.6463573",
"0.63533944",
"0.63533944",
"0.63533944",
"0.63533944",
"0.63495487",
"0.63153625",
"0.63101465",
"0.63101465",
"0.63101465",
"0.63101465",
"0.63101465",
"0.63101465",
"0.63101465",
"0.63101465",
"0.63101465",
"0.63101465",
"0.63101465",
"0.63101465",
"0.63101465",
"0.6288059",
"0.6278666",
"0.6246756",
"0.62401414",
"0.62216973",
"0.6190443",
"0.6175333",
"0.6158323",
"0.61315423",
"0.61304027",
"0.61216354",
"0.5985505",
"0.5937214",
"0.59106123",
"0.5818108",
"0.5809917",
"0.5809917",
"0.5797542",
"0.5797542",
"0.57792556",
"0.574086",
"0.5688457",
"0.56873",
"0.5659735",
"0.5644248",
"0.56301934",
"0.56275725",
"0.5604104",
"0.5595625",
"0.558197",
"0.5577002",
"0.55728227",
"0.55728227",
"0.5572585",
"0.5563987",
"0.5560968",
"0.5539486",
"0.5537355",
"0.55280805",
"0.5520281",
"0.5518811",
"0.5514802",
"0.54921234",
"0.5485232",
"0.5468459",
"0.54554045",
"0.54208803",
"0.5414801",
"0.5413691",
"0.5412516",
"0.5390964",
"0.53866374",
"0.5362655",
"0.5336962",
"0.5336751",
"0.53260756",
"0.53173465",
"0.5314169",
"0.52945",
"0.5289446",
"0.5288474",
"0.52796733",
"0.5279304",
"0.52630514",
"0.52630514",
"0.52630514",
"0.52630514",
"0.52630514",
"0.52630514",
"0.52630514",
"0.52630514",
"0.52454805",
"0.52431035",
"0.52338195",
"0.5230532",
"0.5229334",
"0.5226949",
"0.5214261",
"0.5207141"
] | 0.85421234 | 0 |
Sets the coachmarkLocation The coachmark location. | public function setCoachmarkLocation($val)
{
$this->_propDict["coachmarkLocation"] = $val;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getCoachmarkLocation()\n {\n if (array_key_exists(\"coachmarkLocation\", $this->_propDict)) {\n if (is_a($this->_propDict[\"coachmarkLocation\"], \"\\Beta\\Microsoft\\Graph\\Model\\CoachmarkLocation\") || is_null($this->_propDict[\"coachmarkLocation\"])) {\n return $this->_propDict[\"coachmarkLocation\"];\n } else {\n $this->_propDict[\"coachmarkLocation\"] = new CoachmarkLocation($this->_propDict[\"coachmarkLocation\"]);\n return $this->_propDict[\"coachmarkLocation\"];\n }\n }\n return null;\n }",
"public function setLocation(CultureFeed_Cdb_Data_Location $location) {\n $this->location = $location;\n }",
"function setLocation($location);",
"public function setMarkToday($markToday)\n {\n $this->markToday = $markToday;\n }",
"public function setLocation($value)\n {\n $this->location = $value;\n }",
"public function setCurrentLocation($location) {\n $this->currentLocation = $location;\n }",
"private function setCoordinates($chosenCity) {\n $this->cityLongitude = $this->cities[$chosenCity]['Longitude']; \n $this->cityLatitude = $this->cities[$chosenCity]['Latitude'];\n }",
"public function setLocation(string $location): void;",
"public function setOriginLocation($location)\n {\n $this->originLocation = $location;\n }",
"public function setLocation($location)\n {\n $this->location = $location;\n }",
"public function setLocation($location)\n {\n $this->location = $location;\n }",
"public function setLat($value)\n {\n $this->lat = $value;\n }",
"protected function setLocation($location) {\r\n // TODO: Don't really know what this is?\r\n $this->location = $this->create($location);\r\n }",
"public function setRequestLocation(?bool $requestLocation): void\n {\n $this->requestLocation = $requestLocation;\n }",
"public function setCoordinate( Coordinate $coordinate ) {\n\n $this->coordinate = $coordinate;\n }",
"public function setAutomaticLocation( $val, $markChanged=true ) {\n\t\t$this->automaticLocation = $val;\n\t\tif( $markChanged ) $this->isChanged = true;\n\t}",
"public function setBookmarks($bookmark)\n {\n $this->_bookmarks=$bookmark;\n }",
"public function setRequestLocation(bool $requestLocation) {\n\t\t$this->requestLocation = $requestLocation;\n\t}",
"protected function setMark() {\n echo $this->promptMessage('choose_mark');\n $mark = $this->limitInput(array(self::X_MARK, self::O_MARK, self::QUIT_BUTTON));\n switch ($mark) {\n case self::X_MARK:\n $this->_userMark = self::X_MARK;\n $this->_botMark = self::O_MARK;\n break;\n case self::O_MARK:\n $this->_userMark = self::O_MARK;\n $this->_botMark = self::X_MARK;\n break;\n case self::QUIT_BUTTON:\n $this->quit();\n }\n echo \"You will be Player \" . $this->_userMark . \".\" . PHP_EOL;\n echo $this->promptMessage('start_game') . PHP_EOL;\n }",
"function setWorkPlace( $value )\n {\n if ( $this->State_ == \"Dirty\" )\n $this->get( $this->ID );\n\n $this->WorkPlace = $value;\n }",
"function setPlace( &$value )\n {\n $this->Place = $value;\n }",
"public function setCellLocation($value)\n {\n return $this->set('CellLocation', $value);\n }",
"public function setLatitude($latitude) {\n\n $this->latitude = $latitude;\n\n }",
"public function setGeolocation($geolocation)\n {\n $this->geolocation = $geolocation;\n }",
"public function setCustomerLocation($val)\n {\n $this->_propDict[\"customerLocation\"] = $val;\n return $this;\n }",
"public function setLocation($value)\n {\n $this->_headers[ODataConstants::HTTPRESPONSE_HEADER_LOCATION] \n = $value;\n }",
"public function setLocation($value)\n {\n return $this->set('Location', $value);\n }",
"public function setCity($value) {\n\t\tself::$_city = $value;\n\t}",
"public function setPreferredLocation($location) {\n $this->preferredLocation = $location;\n }",
"public function setCoordinate()\n {\n $args = func_get_args();\n\n if (isset($args[0]) && ($args[0] instanceof Coordinate)) {\n $this->coordinate = $args[0];\n } elseif ((isset($args[0]) && is_numeric($args[0])) && (isset($args[1]) && is_numeric($args[1]))) {\n if (!$this->hasCoordinate()) {\n $this->coordinate = new Coordinate();\n }\n\n $this->coordinate->setLatitude($args[0]);\n $this->coordinate->setLongitude($args[1]);\n\n if (isset($args[2]) && is_bool($args[2])) {\n $this->coordinate->setNoWrap($args[2]);\n }\n } elseif (!isset($args[0])) {\n $this->coordinate = null;\n } else {\n throw GeocodingException::invalidGeocoderRequestCoordinate();\n }\n\n return $this;\n }",
"public function setLatitude($latitude)\n {\n $this->latitude = $latitude;\n }",
"public function setLocation($x_location, $y_location, $barID) {\n $this->curLocation->setLocationWithCoordinatesAndMapId($x_location, $y_location, $barID);\n }",
"public function setPlace($place){\n $this->place=$place;\n }",
"public function setLng($value)\n {\n $this->lng = $value;\n }",
"public function setCAInfoPath($caInfoPath)\n {\n $this->_caInfoPath = $caInfoPath;\n }",
"public function testSetPosition ( ) {\n $this->markTestIncomplete (\n 'This test has not been implemented yet.'\n );\n\n }",
"function setOffset($value) {\n $this->offset = $value;\n }",
"public function setCodcaj($codcaj){\n\t\t$this->codcaj = $codcaj;\n\t}",
"public function set_current_location() {\n\t\t\t$this->location_id = get_the_ID();\n\t\t\t$meta_data = $this->wpseo_local_locations_repository->get( [ 'id' => $this->location_id ] );\n\n\t\t\t$this->location_meta['business_type'] = ! empty( $meta_data ) ? $meta_data[ $this->location_id ]['business_type'] : '';\n\t\t\t$this->location_meta['business_address'] = ! empty( $meta_data ) ? $meta_data[ $this->location_id ]['business_address'] : '';\n\t\t\t$this->location_meta['business_address_2'] = ! empty( $meta_data ) ? $meta_data[ $this->location_id ]['business_address_2'] : '';\n\t\t\t$this->location_meta['business_city'] = ! empty( $meta_data ) ? $meta_data[ $this->location_id ]['business_city'] : '';\n\t\t\t$this->location_meta['business_state'] = ! empty( $meta_data ) ? $meta_data[ $this->location_id ]['business_state'] : '';\n\t\t\t$this->location_meta['business_zipcode'] = ! empty( $meta_data ) ? $meta_data[ $this->location_id ]['business_zipcode'] : '';\n\t\t\t$this->location_meta['business_country'] = ! empty( $meta_data ) ? $meta_data[ $this->location_id ]['business_country'] : '';\n\t\t\t$this->location_meta['business_phone'] = ! empty( $meta_data ) ? $meta_data[ $this->location_id ]['business_phone'] : '';\n\t\t\t$this->location_meta['business_phone_2nd'] = ! empty( $meta_data ) ? $meta_data[ $this->location_id ]['business_phone_2nd'] : '';\n\t\t\t$this->location_meta['business_fax'] = ! empty( $meta_data ) ? $meta_data[ $this->location_id ]['business_fax'] : '';\n\t\t\t$this->location_meta['business_email'] = ! empty( $meta_data ) ? $meta_data[ $this->location_id ]['business_email'] : '';\n\t\t\t$this->location_meta['business_url'] = ! empty( $meta_data ) ? $meta_data[ $this->location_id ]['business_url'] : '';\n\t\t\t$this->location_meta['business_vat'] = ! empty( $meta_data ) ? $meta_data[ $this->location_id ]['business_vat'] : '';\n\t\t\t$this->location_meta['business_tax'] = ! empty( $meta_data ) ? $meta_data[ $this->location_id ]['business_tax'] : '';\n\t\t\t$this->location_meta['business_coc'] = ! empty( $meta_data ) ? $meta_data[ $this->location_id ]['business_coc'] : '';\n\t\t\t$this->location_meta['business_price_range'] = ! empty( $meta_data ) ? $meta_data[ $this->location_id ]['business_price_range'] : '';\n\t\t\t$this->location_meta['business_currencies_accepted'] = ! empty( $meta_data ) ? $meta_data[ $this->location_id ]['business_currencies_accepted'] : '';\n\t\t\t$this->location_meta['business_payment_accepted'] = ! empty( $meta_data ) ? $meta_data[ $this->location_id ]['business_payment_accepted'] : '';\n\t\t\t$this->location_meta['business_area_served'] = ! empty( $meta_data ) ? $meta_data[ $this->location_id ]['business_area_served'] : '';\n\t\t\t$this->location_meta['coords']['lat'] = ! empty( $meta_data ) ? $meta_data[ $this->location_id ]['coords']['lat'] : '';\n\t\t\t$this->location_meta['coords']['long'] = ! empty( $meta_data ) ? $meta_data[ $this->location_id ]['coords']['long'] : '';\n\t\t\t$this->location_meta['business_timezone'] = ! empty( $meta_data ) ? $meta_data[ $this->location_id ]['business_timezone'] : '';\n\t\t\t$this->location_meta['business_logo'] = ! empty( $meta_data ) ? $meta_data[ $this->location_id ]['business_logo'] : '';\n\t\t\t$this->location_meta['custom_marker'] = ! empty( $meta_data ) ? $meta_data[ $this->location_id ]['custom_marker'] : '';\n\t\t}",
"function setCity($city) {\r\r\n\t\t$this->city = $city;\r\r\n\t}",
"public function setMarkers($markers) \n {\n $this->_markers = $markers; \n }",
"public function setLatitude(?float $latitude): void\n {\n $this->latitude['value'] = $latitude;\n }",
"public function setCenter()\n {\n $args = func_get_args();\n\n if (isset($args[0]) && ($args[0] instanceof Coordinate)) {\n $this->center = $args[0];\n } elseif ((isset($args[0]) && is_numeric($args[0])) && (isset($args[1]) && is_numeric($args[1]))) {\n $this->center->setLatitude($args[0]);\n $this->center->setLongitude($args[1]);\n\n if (isset($args[2]) && is_bool($args[2])) {\n $this->center->setNoWrap($args[2]);\n }\n } else {\n throw MapException::invalidCenter();\n }\n }",
"public function setCACert(?string $cacert): void\n {\n }",
"public function setCAPath($ca_path = null, $ca_info = null) {}",
"public function setMarkIdentification($value) {\n\t\tself::$_markIdentification = $value;\n\t}",
"public function setLocationAttribute($value)\n {\n $value=empty($value)?'0,0':$value;\n $this->attributes['location'] = DB::raw(\"POINT($value)\") ;\n }",
"public function setEmailCCAddress($value) { $this->_emailCCAddress = $value; }",
"public function setLocation(Location $location = null)\n {\n $this->location = $location;\n }",
"public function testSetCodeAt() {\n\n $obj = new Employes();\n\n $obj->setCodeAt(10);\n $this->assertEquals(10, $obj->getCodeAt());\n }",
"public function setCidMap(\\SetaPDF_Core_Font_Cmap $cidMap) {}",
"public function setGeometry(GeocoderGeometry $geometry)\n {\n $this->geometry = $geometry;\n }",
"public function setPosition() {\n }",
"abstract public function setCurrentPoint(int $x, int $y);",
"public function setCity($city)\r\n {\r\n $this->_city = $city;\r\n }",
"private function setNameLocation($newName)\n\t {\n\t $this->nameLocation = $newName;\n\t }",
"public function setLat( $lat ) {\n $this->lat = $lat;\n return $this;\n }",
"public function setContentLocation($contentLocation) {\n $this->properties['contentLocation'] = $contentLocation;\n\n return $this;\n }",
"function set_checkpoint()\n\t{\n\t\t$this->guardar();\n\t}",
"public function setOrigin($value)\n {\n $this->origin = $value;\n }",
"public function setCenterLat($value) {\n $this->settings['center_lat'] = $value;\n // Return for chaining\n return $this;\n }",
"public function setPlace($ParseString) {\n parse_str($ParseString, $this->Places);\n $this->Execute();\n }",
"public function setOfficeLocation($value)\n {\n $this->setProperty(\"OfficeLocation\", $value, true);\n }",
"public function _setCustomerQuote()\n {\n // Retrieve a valid quote\n if ($quote = $this->_retrieveQuote()) {\n\n // Verify that the customer is a valid customer of the quote\n $this->_verifyCustomerForQuote($quote);\n /* Set the session quote if required.\n Needs to be done after verifying the current customer */\n if ($this->_getCheckoutSession()->getQuoteId() != $quote->getId()) {\n $this->_logger->debug(__(\"Setting quote to current session\"));\n // Set the quote in the current object\n $this->_setQuote($quote);\n // Set the quote in the session\n $this->_getCheckoutSession()->setQuoteId($quote->getId());\n }\n // Make sure the qoute is active\n $this->_activateQuote($quote);\n } else {\n throw new \\Magento\\Framework\\Exception\\LocalizedException(__(\"Could not retrieve the quote\"));\n }\n }",
"public function setLocation($var)\n {\n GPBUtil::checkString($var, True);\n $this->location = $var;\n\n return $this;\n }",
"public function setLocation($var)\n {\n GPBUtil::checkString($var, True);\n $this->location = $var;\n\n return $this;\n }",
"public function setLocation($var)\n {\n GPBUtil::checkString($var, True);\n $this->location = $var;\n\n return $this;\n }",
"public function setLocation($var)\n {\n GPBUtil::checkString($var, True);\n $this->location = $var;\n\n return $this;\n }",
"public function setLatitude($value)\n {\n return $this->set('Latitude', $value);\n }",
"public function setLatitude($value)\n {\n return $this->set('Latitude', $value);\n }",
"public function setLatitude($value)\n {\n return $this->set('Latitude', $value);\n }",
"public function setLatitude($value)\n {\n return $this->set('Latitude', $value);\n }",
"public function setLocation($newLocation) {\n\t\t// verify the location is secure\n\t\t$newLocation = trim($newLocation);\n\t\t$newLocation = filter_var($newLocation, FILTER_SANITIZE_STRING);\n\t\tif(empty($newLocation) === true) {\n\t\t\tthrow(new InvalidArgumentException(\"location is empty or insecure\"));\n\t\t}\n\n\t\t// verify the location name will fit in the database\n\t\tif(strlen($newLocation) > 64) {\n\t\t\tthrow(new RangeException(\"location name too long\"));\n\t\t}\n\n\t\t// store the location\n\t\t$this->location = $newLocation;\n\t}",
"public function setLocation($x, $y, $alignment=Zend_Pdf_Cell::ALIGN_LEFT) {\n\t\t$this->_position=$alignment;\n\t\t$this->_x=$x;\n\t\t$this->_y=$y;\n\t\t\n\t}",
"public function setCity($city) {\n\t\t$this->city = $city;\n\t}",
"public function __construct($lat)\r\n {\r\n $this->_lat = $lat;\r\n }",
"function SetXY($x,$y)\n\t\t{\n\t\t\t$this->SetY($y);\n\t\t\t$this->SetX($x);\n\t\t}",
"public function setCity($city)\n {\n $this->city = $city;\n }",
"public function setCity($city)\n {\n $this->city = $city;\n }",
"public function setLatitude($nLatitude) {\n $this->nLatitude = $nLatitude;\n }",
"public function setToCell(Cell &$Cell);",
"public function setCity(string $city): void\n {\n $this->_city = $city;\n }",
"public static function setCitation(Citation $citation)\n {\n self::$citation = $citation;\n }",
"public function setCouncilReference(string $council_reference) {\n\n $this->council_reference = $council_reference;\n\n }",
"public function setLat($value)\n {\n return $this->set(self::LAT, $value);\n }",
"public function setLat($value)\n {\n return $this->set(self::LAT, $value);\n }",
"function setCoords($a_coords)\n\t{\n\t\t$this->coords = $a_coords;\n\t}",
"public function setPhotoLocation($value)\n {\n return $this->set('PhotoLocation', $value);\n }",
"public function setCenterLng($value) {\n $this->settings['center_lng'] = $value;\n // Return for chaining\n return $this;\n }",
"public function setPointCoordinates($latA, $lonA, $latB, $lonB);",
"public function set_locations() {\n\t\t\t$this->locations = $this->wpseo_local_locations_repository->get( [], false );\n\t\t}",
"public function setAddress(?CustomerAddressFilter $address): void\n {\n $this->address = $address;\n }",
"public function setOffset($offset) {\n\t\t$this->offset = $offset;\n\t}",
"function setCakePath($cakePath) {\n $this->cakePath = $cakePath;\n }",
"public function setOrigin(Point $origin)\n {\n $this->options['origin'] = $origin;\n }",
"public function testSetCodeCentre() {\n\n $obj = new Collaborateurs();\n\n $obj->setCodeCentre(\"codeCentre\");\n $this->assertEquals(\"codeCentre\", $obj->getCodeCentre());\n }",
"public function setOffset($offset) { $this->_offset = $offset; }",
"function updateFacebookCurrentCity () {\n }",
"function setCC($cc){\n\t\t\t$this->cc = $cc;\n\t\t}",
"public function setAddress($address)\n {\n $this->set('address', $address);\n }"
] | [
"0.6356563",
"0.56165236",
"0.5455847",
"0.539666",
"0.52562803",
"0.52390504",
"0.5126067",
"0.50752324",
"0.5073",
"0.50416464",
"0.50416464",
"0.5037526",
"0.49231446",
"0.48471037",
"0.48150584",
"0.47880453",
"0.47329837",
"0.47106293",
"0.47086388",
"0.47046208",
"0.46965918",
"0.4689465",
"0.46219942",
"0.4618711",
"0.46179777",
"0.45136163",
"0.45121342",
"0.45084664",
"0.44903505",
"0.44810694",
"0.44718465",
"0.44503093",
"0.44494745",
"0.44449294",
"0.44268835",
"0.44257712",
"0.4396348",
"0.43903482",
"0.43830743",
"0.4352785",
"0.43473724",
"0.43468645",
"0.43462715",
"0.43296587",
"0.43079937",
"0.43067825",
"0.42966664",
"0.42957473",
"0.42946684",
"0.42812842",
"0.42793712",
"0.42786622",
"0.4277165",
"0.4262234",
"0.42620277",
"0.4256092",
"0.42558038",
"0.42532897",
"0.4247064",
"0.4244632",
"0.42348087",
"0.42311144",
"0.4224571",
"0.42218858",
"0.42180145",
"0.42180145",
"0.42180145",
"0.42180145",
"0.42165288",
"0.42165288",
"0.42165288",
"0.4215781",
"0.42126483",
"0.42054746",
"0.4203411",
"0.42013907",
"0.41970786",
"0.41968238",
"0.41968238",
"0.41880256",
"0.41835922",
"0.41801473",
"0.41780362",
"0.41755798",
"0.41732144",
"0.41732144",
"0.4164444",
"0.41601944",
"0.41591516",
"0.41549048",
"0.41538155",
"0.41523498",
"0.41494468",
"0.4145736",
"0.4140647",
"0.41375557",
"0.4130166",
"0.41244686",
"0.41207442",
"0.4118249"
] | 0.7585093 | 0 |
Gets the description The description about the coachmark. | public function getDescription()
{
if (array_key_exists("description", $this->_propDict)) {
return $this->_propDict["description"];
} else {
return null;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function get_description()\n\t{\n\t\treturn $this->m_description;\n\t}",
"private function get_description()\n\t{\n\t\treturn $this->m_description;\n\t}",
"public function get_description() {\r\n return $this->description;\r\n }",
"public function get_description() {\n return $this->description;\n }",
"public function get_description() { \n\n\t\treturn $this->description; \n\t\n\t}",
"public function get_description()\n\t{\n\t\treturn $this->description;\n\t}",
"public function get_description()\n\t{\n\t\treturn $this->description;\n\t}",
"public function get_description() {\n\t\treturn $this->description;\n\t}",
"public function getDescription()\r\n {\r\n return $this->m_description;\r\n }",
"public function get_description(){\n\t\treturn $this->description;\n\t}",
"function getDescription()\r\n\t\t{\r\n\t\t\treturn $this->description;\r\n\t\t\t\r\n\t\t}",
"public function get_description()\n {\n }",
"public function get_description()\n {\n }",
"public function getDescription()\n {\n return $this->description;\n }",
"public function getDescription()\r\n {\r\n return $this->description;\r\n }",
"protected function getDescription() {\r\n\t\treturn $this->description;\r\n\t}",
"public function getDescription()\n {\n return $this->description;\n }",
"public function getDescription()\r\n {\r\n return $this->description;\r\n }",
"public function getDescription()\r\n {\r\n return $this->description;\r\n }",
"public function getDescription()\r\n {\r\n return $this->description;\r\n }",
"public function getDescription()\n {\n return $this->description;\n }",
"public function getDescription()\n {\n return $this->description;\n }",
"function getDescription()\n {\n return $this->description;\n }",
"function get_description() \t{\n \t\treturn $this->description;\n \t}",
"public function getDescription() {\n return $this->description;\n }",
"public function getDescription()\n {\n return $this->description;\n }",
"public function getDescription()\n { \n return $this->description;\n }",
"public function getDescription() \n {\n return $this->description;\n }",
"public function getDescription() {\r\n return $this->description;\r\n }",
"public function getDescription() {\n return $this->_get( 'description' );\n }",
"function getDescription() {\n return $this->description;\n }",
"function getDescription() {\n\t\treturn $this->description;\n\t}",
"public function getDescription()\n {\n return $this->description;\n }",
"public function getDescription()\n {\n return $this->description;\n }",
"public function getDescription()\n {\n return $this->description;\n }",
"public function getDescription()\n {\n return $this->description;\n }",
"public function getDescription()\n {\n return $this->description;\n }",
"public function getDescription()\n {\n return $this->description;\n }",
"public function getDescription()\n {\n return $this->description;\n }",
"public function getDescription()\n {\n return $this->description;\n }",
"public function getDescription()\n {\n return $this->description;\n }",
"public function getDescription()\n {\n return $this->description;\n }",
"public function getDescription()\n {\n return $this->description;\n }",
"public function getDescription()\n {\n return $this->description;\n }",
"public function getDescription()\n {\n return $this->description;\n }",
"public function getDescription()\n {\n return $this->description;\n }",
"public function getDescription()\n {\n return $this->description;\n }",
"public function getDescription()\n {\n return $this->description;\n }",
"public function getDescription()\n {\n return $this->description;\n }",
"public function getDescription()\n {\n return $this->description;\n }",
"public function getDescription()\n {\n return $this->description;\n }",
"public function getDescription()\n {\n return $this->description;\n }",
"public function getDescription()\n {\n return $this->description;\n }",
"public function getDescription()\n {\n return $this->description;\n }",
"public function getDescription()\n {\n return $this->description;\n }",
"public function getDescription()\n {\n return $this->description;\n }",
"public function getDescription()\n {\n return $this->description;\n }",
"public function getDescription()\n {\n return $this->description;\n }",
"public function getDescription()\n {\n return $this->description;\n }",
"public function getDescription()\n {\n return $this->description;\n }",
"public function getDescription()\n {\n return $this->description;\n }",
"public function getDescription()\n {\n return $this->description;\n }",
"public function getDescription()\n {\n return $this->description;\n }",
"public function getDescription()\n {\n return $this->description;\n }",
"public function getDescription()\n {\n return $this->description;\n }",
"public function getDescription()\n {\n return $this->description;\n }",
"public function getDescription()\n {\n return $this->description;\n }",
"public function getDescription()\n {\n return $this->description;\n }",
"public function getDescription()\n {\n return $this->description;\n }",
"public function getDescription()\n {\n return $this->description;\n }",
"public function getDescription()\n {\n return $this->description;\n }",
"public function getDescription()\n {\n return $this->description;\n }",
"public function getDescription()\n {\n return $this->description;\n }",
"public function getDescription()\n {\n return $this->description;\n }",
"public function getDescription()\n {\n return $this->description;\n }",
"public function getDescription()\n {\n return $this->description;\n }",
"public function getDescription()\n {\n return $this->description;\n }",
"public function getDescription()\n {\n return $this->description;\n }",
"public function getDescription()\n {\n return $this->description;\n }",
"public function getDescription()\n {\n return $this->description;\n }",
"public function getDescription()\n {\n return $this->description;\n }",
"public function getDescription()\n {\n return $this->description;\n }",
"public function getDescription()\n {\n return $this->description;\n }",
"public function getDescription()\n {\n return $this->description;\n }",
"public function getDescription()\n {\n return $this->description;\n }",
"public function getDescription()\n {\n return $this->description;\n }",
"public function getDescription()\n {\n return $this->description;\n }",
"public function getDescription()\n {\n return $this->description;\n }",
"public function getDescription()\n {\n return $this->description;\n }",
"public function getDescription()\n {\n return $this->description;\n }",
"public function getDescription()\n {\n return $this->description;\n }",
"public function getDescription()\n {\n return $this->description;\n }",
"public function getDescription()\n {\n return $this->description;\n }",
"public function getDescription()\n {\n return $this->description;\n }",
"public function getDescription()\n {\n return $this->description;\n }",
"public function getDescription()\n {\n return $this->description;\n }",
"public function getDescription()\n {\n return $this->description;\n }",
"public function getDescription()\n {\n return $this->description;\n }",
"public function getDescription()\n {\n return $this->description;\n }",
"public function getDescription()\n {\n return $this->description;\n }",
"public function getDescription()\n {\n return $this->description;\n }"
] | [
"0.7225935",
"0.7225935",
"0.7210332",
"0.71980506",
"0.7154407",
"0.71478224",
"0.71478224",
"0.7143804",
"0.710101",
"0.7097348",
"0.7059265",
"0.70569336",
"0.70569336",
"0.70539963",
"0.7029612",
"0.70262444",
"0.70082444",
"0.70014447",
"0.6999991",
"0.6999991",
"0.6997915",
"0.6997915",
"0.69938886",
"0.6990835",
"0.69884145",
"0.69862765",
"0.69858134",
"0.6985043",
"0.6977327",
"0.6973609",
"0.6971559",
"0.6965909",
"0.6953272",
"0.6953272",
"0.6953272",
"0.6953272",
"0.6953272",
"0.6953272",
"0.6953272",
"0.6953272",
"0.6953272",
"0.6953272",
"0.6953272",
"0.6953272",
"0.6953272",
"0.6953272",
"0.6953272",
"0.6953272",
"0.6953272",
"0.6953272",
"0.6953272",
"0.6953272",
"0.6953272",
"0.6953272",
"0.6953272",
"0.6953272",
"0.6953272",
"0.6953272",
"0.6953272",
"0.6953272",
"0.6953272",
"0.6953272",
"0.6953272",
"0.6953272",
"0.6953272",
"0.6953272",
"0.6953272",
"0.6953272",
"0.6953272",
"0.6953272",
"0.6953272",
"0.6953272",
"0.6953272",
"0.6953272",
"0.6953272",
"0.6953272",
"0.6953272",
"0.6953272",
"0.6953272",
"0.6953272",
"0.6953272",
"0.6953272",
"0.6953272",
"0.6953272",
"0.6953272",
"0.6953272",
"0.6953272",
"0.6953272",
"0.6953272",
"0.6953272",
"0.6953272",
"0.6953272",
"0.6953272",
"0.6953272",
"0.6953272",
"0.6953272",
"0.6953272",
"0.6953272",
"0.6953272",
"0.6953272",
"0.6953272"
] | 0.0 | -1 |
Sets the description The description about the coachmark. | public function setDescription($val)
{
$this->_propDict["description"] = $val;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function setDescription($description) {\r\n $this->description = $description;\r\n }",
"public function setDesciption($description);",
"function setDescription($description) {\n\t\t$this->description = $description;\n\t}",
"public function setDescription($description){\n\t\t$this->description = $description;\n\t}",
"public function set_description ($description) {\n $this->description = $description;\n }",
"public function setDescription($description) {\n $this->_description = $description;\n }",
"public function setDescription($description) {\n $this->description = $description;\n }",
"public function setDescription($description)\r\n {\r\n $this->description = $description;\r\n }",
"public function setDescription($description) {\n\t\t$this->description = $description;\n\t}",
"public function setDescription($description)\n {\n $this->_description = $description;\n }",
"public function setDescription( $description )\r\n\t{\r\n\t\t$this->description = $description;\r\n\t}",
"public function setDescription($description)\n {\n $this->description = $description;\n }",
"public function setDescription($description)\n {\n $this->description = $description;\n }",
"public function setDescription($description)\n {\n $this->description = $description;\n }",
"public function setDescription($description)\n {\n $this->description = $description;\n }",
"public function setDescription($description)\n {\n $this->description = $description;\n }",
"public function setDescription($description)\n {\n $this->description = $description;\n }",
"public function setDescription($description)\n {\n $this->description = $description;\n }",
"public function setDescription($description)\n {\n $this->description = $description;\n }",
"public function setDescription($description)\n {\n $this->description = $description;\n }",
"public function setDescription($description)\n {\n $this->description = $description;\n }",
"public function setDescription($description)\n {\n $this->description = $description;\n }",
"public function setDescription($description)\n {\n $this->description = $description;\n }",
"public function setDescription($description)\n {\n $this->description = $description;\n }",
"public function setSetDescription($description) {\r\n\t\t$this -> setdescription = $description;\r\n\t}",
"public function setDescription($description)\n {\n $this->_description = $description;\n }",
"public function set_description($desciption){\n\t\t$this->set_channel_element('description', $desciption);\n\t}",
"public function setDescription($description)\n\t{\n\t\t$this->_description = $description;\n\t}",
"function setDescription($description) {\n $this->checkChange();\n\n $this->description = $description;\n return $this;\n }",
"public function setDescription(string $description)\n {\n $this->description = $description;\n }",
"public function setDescription($description);",
"public function setDescription($description);",
"public function setDescription($description);",
"public function setDescription($description);",
"public function setDescription($description);",
"public function setDescription($description);",
"public function setDescription($desc) {\n\t\t$this->description = $desc;\n\t}",
"public function setDescription($description) \n\t{\n \n $this->description = empty($description) ? \"\" : $description;\t\n\t}",
"public function setDescription($description)\n {\n $this->description = $description;\n \n return $this;\n }",
"protected function assignDescription()\n {\n $this->description = '';\n }",
"function set_description($description)\r\n {\r\n $this->set_default_property(self :: PROPERTY_DESCRIPTION, $description);\r\n }",
"function set_description($description)\n {\n $this->set_default_property(self :: PROPERTY_DESCRIPTION, $description);\n }",
"public function setDescription($desc)\n {\n $this->description = $desc;\n }",
"public function setDescription($description)\n\t{\n\t\t$this->description = $description;\n\n\t\tif($this->pageInitialized)\n\t\t\t$this->setMetaTag('description', $this->description);\n\t}",
"public function setDescription($description){\n $this->description = $description;\n return $this;\n }",
"public function setDescription($description) {\n\t\t$this->addChannelTag('description', $description);\n\t}",
"function setDescription( $value )\r\n {\r\n $this->Description = $value;\r\n }",
"function setDescription( $value )\r\n {\r\n $this->Description = $value;\r\n }",
"public function setDescription(string $description)\n {\n $this->description = $description;\n }",
"public function setDescription($description)\n {\n $this->feedbackFields['description'] = $description;\n }",
"public function setDescription(?string $description): void\n {\n $this->description = $description;\n }",
"protected function setDescription() {\r\n\t\t$descriptionCrop = intval($this->settings['news']['semantic']['general']['description']['crop']);\r\n\t\t$descriptionAction = $this->settings['news']['semantic']['general']['description']['action'];\r\n\t\t$descriptionText = $this->newsItem->getTeaser();\r\n\t\tif (empty($descriptionText)) {\r\n\t\t\t$descriptionText = $this->newsItem->getBodytext();\r\n\t\t}\r\n\t\tif (!empty($descriptionText) && !empty($descriptionAction)) {\r\n\t\t\tif (!empty($GLOBALS['TSFE']->page['description'])) {\r\n\t\t\t\tswitch ($descriptionAction) {\r\n\t\t\t\t\tcase 'prepend':\r\n\t\t\t\t\t\t$descriptionText .= ': ' . $GLOBALS['TSFE']->page['description'];\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 'append':\r\n\t\t\t\t\t\t$descriptionText = $GLOBALS['TSFE']->page['description'] . ': ' . $descriptionText;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$this->description = $this->contentObject->crop($descriptionText, $descriptionCrop . '|...|' . TRUE);\r\n\t\t}\r\n\t}",
"public function setDescription($description) {\n $this->_description = $description;\n return $this;\n }",
"public function setDescription($description): self\r\n {\r\n $this->extras['description'] = $description;\r\n return $this;\r\n }",
"public function setDescription($description)\n {\n $this->description = $description;\n\n return $this;\n }",
"public function setDescription($description)\r\n {\r\n $this->description = $description;\r\n\r\n return $this;\r\n }",
"public function set_description($description)\n {\n $this->set_default_property(self::PROPERTY_DESCRIPTION, $description);\n }",
"public function set_description($description) \n\t{\n\t\t$tag = ($this->version == ATOM)? 'summary' : 'description'; \n\t\t$this->add_element($tag, $description);\n\t}",
"public function setDescription($newDescription)\n {\n $this->description = $newDescription;\n }",
"protected function assignDescription()\n {\n $this->description = 'This is a test for a Template Variable migration class';\n }",
"public function setDescription($description)\n {\n $this->description = $description;\n\n return $this;\n }",
"public function setDescription($description)\n {\n $this->description = $description;\n\n return $this;\n }",
"public function setDescription($description) {\n $this->description = $description;\n return $this;\n }",
"public function setDescription($description) {\n $this->description = $description;\n return $this;\n }",
"public function setDescription($description)\r\n {\r\n $this->description = $description;\r\n\r\n return $this;\r\n }",
"public function setDescription($description)\n\t{\n\t\t$this->description = $description;\n\t\treturn $this;\n\t}",
"public function setDescription($description)\n {\n $this->description = $description;\n\n return $this;\n }",
"public function setDescription($description)\n {\n \n $this->__set(self::FIELD_DESCRIPTION,$description);\n \n return $this;\n }",
"public function description( string $description ) : self\n {\n $this->description = $description;\n return $this;\n }",
"public function setDescription($description)\n {\n $this->description = $description;\n return $this;\n }",
"public function setDescription($description)\n {\n $this->description = $description;\n return $this;\n }",
"public function setDescription($description)\n {\n $this->description = $description;\n return $this;\n }",
"public function setDescription($description)\n {\n $this->description = $description;\n return $this;\n }",
"public function setDescription($description)\n {\n $this->description = $description;\n return $this;\n }",
"public function setDescription($description)\n {\n $this->description = $description;\n return $this;\n }",
"public function setDescription($description)\n {\n $this->description = $description;\n return $this;\n }",
"public function setDescription($description)\n {\n $this->description = $description;\n return $this;\n }",
"public function setDescription($description)\n {\n $this->description = $description;\n return $this;\n }",
"public function setDescription($description)\n {\n $this->description = $description;\n return $this;\n }",
"public function setDescription($description)\n {\n $this->description = $description;\n return $this;\n }",
"public function setDescription($description)\n {\n $this->description = $description;\n return $this;\n }",
"public function setDescription($description)\n {\n $this->_description = $description;\n return $this;\n }",
"public function setDescription($desciption)\n {\n $this->setChannelElement('description', $desciption);\n }",
"public function setDescription($description) {\n\t\tTemplate::setSiteMetaDescription($description);\n\t}",
"public function setDescription($description) {\n $this->description = $description;\n\n return $this;\n }",
"public function setDescription($var)\n {\n GPBUtil::checkString($var, True);\n $this->description = $var;\n\n return $this;\n }",
"public function setDescription($var)\n {\n GPBUtil::checkString($var, True);\n $this->description = $var;\n\n return $this;\n }",
"public function setDescription($var)\n {\n GPBUtil::checkString($var, True);\n $this->description = $var;\n\n return $this;\n }",
"public function setDescription($var)\n {\n GPBUtil::checkString($var, True);\n $this->description = $var;\n\n return $this;\n }",
"public function setDescription($var)\n {\n GPBUtil::checkString($var, True);\n $this->description = $var;\n\n return $this;\n }",
"public function setDescription($var)\n {\n GPBUtil::checkString($var, True);\n $this->description = $var;\n\n return $this;\n }",
"public function setDescription($var)\n {\n GPBUtil::checkString($var, True);\n $this->description = $var;\n\n return $this;\n }",
"public function setDescription($var)\n {\n GPBUtil::checkString($var, True);\n $this->description = $var;\n\n return $this;\n }",
"public function setDescription($var)\n {\n GPBUtil::checkString($var, True);\n $this->description = $var;\n\n return $this;\n }",
"public function setDescription($var)\n {\n GPBUtil::checkString($var, True);\n $this->description = $var;\n\n return $this;\n }",
"public function setDescription($var)\n {\n GPBUtil::checkString($var, True);\n $this->description = $var;\n\n return $this;\n }",
"public function setDescription($var)\n {\n GPBUtil::checkString($var, True);\n $this->description = $var;\n\n return $this;\n }",
"public function setDescription($var)\n {\n GPBUtil::checkString($var, True);\n $this->description = $var;\n\n return $this;\n }",
"public function setDescription($var)\n {\n GPBUtil::checkString($var, True);\n $this->description = $var;\n\n return $this;\n }",
"public function setDescription($var)\n {\n GPBUtil::checkString($var, True);\n $this->description = $var;\n\n return $this;\n }",
"public function setDescription($var)\n {\n GPBUtil::checkString($var, True);\n $this->description = $var;\n\n return $this;\n }"
] | [
"0.7636624",
"0.7616953",
"0.7593382",
"0.7582772",
"0.7576811",
"0.75481546",
"0.7496564",
"0.747569",
"0.7475582",
"0.7457246",
"0.7401291",
"0.7395878",
"0.7395878",
"0.7395878",
"0.7395878",
"0.7395878",
"0.7395878",
"0.7395878",
"0.7395878",
"0.7395878",
"0.7395878",
"0.7395878",
"0.7395878",
"0.7395878",
"0.73955935",
"0.7395209",
"0.73871195",
"0.7379918",
"0.73380506",
"0.7242878",
"0.72404927",
"0.72404927",
"0.72404927",
"0.72404927",
"0.72404927",
"0.72404927",
"0.7227686",
"0.72088575",
"0.7171792",
"0.71663827",
"0.7164101",
"0.71299464",
"0.7126858",
"0.7101982",
"0.7063073",
"0.70558864",
"0.70441055",
"0.70441055",
"0.7040011",
"0.7022255",
"0.70141006",
"0.6992598",
"0.6979084",
"0.6969629",
"0.69681704",
"0.69629174",
"0.69437444",
"0.69383764",
"0.69378245",
"0.6908037",
"0.69049084",
"0.69049084",
"0.6881311",
"0.6881311",
"0.68736315",
"0.6873148",
"0.6855425",
"0.6835898",
"0.6814652",
"0.6808969",
"0.6808969",
"0.6808969",
"0.6808969",
"0.6808969",
"0.6808969",
"0.6808969",
"0.6808969",
"0.6808969",
"0.6808969",
"0.6808969",
"0.6808969",
"0.6790635",
"0.6788751",
"0.67732483",
"0.6772544",
"0.6766935",
"0.6766935",
"0.6766935",
"0.6766935",
"0.6766935",
"0.6766935",
"0.6766935",
"0.6766935",
"0.6766935",
"0.6766935",
"0.6766935",
"0.6766935",
"0.6766935",
"0.6766935",
"0.6766935",
"0.6766935"
] | 0.0 | -1 |
Gets the indicator The coachmark indicator. | public function getIndicator()
{
if (array_key_exists("indicator", $this->_propDict)) {
return $this->_propDict["indicator"];
} else {
return null;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getIndicator() ;",
"public function getIndicatorElement() {\n\t\treturn $this->indicator;\n\t}",
"public function getFormattedIndicator()\n {\n return $this->formattedIndicator;\n }",
"public function getAuctionConstraintIndicator()\n {\n return $this->auctionConstraintIndicator;\n }",
"public function getInsance() {\r\n\t\treturn $this->tcpdf;\r\n\t}",
"public function getBalanceBroughtForwardIndicator()\n {\n return $this->balanceBroughtForwardIndicator;\n }",
"public function getBalanceBroughtForwardIndicator()\n {\n return $this->balanceBroughtForwardIndicator;\n }",
"public function getMarkIdentification() {\n\t\treturn self::$_markIdentification;\n\t}",
"public function getInitialMarking() {\n\t\treturn $this->initialMarking;\n\t}",
"public function getCIF(){\n $info = $this->getInfo();\n return $info[\"cif\"];\n }",
"public function getAccion()\n {\n return $this->accion;\n }",
"public function getCodage()\n {\n return $this->codage;\n }",
"public function getCoachmarkLocation()\n {\n if (array_key_exists(\"coachmarkLocation\", $this->_propDict)) {\n if (is_a($this->_propDict[\"coachmarkLocation\"], \"\\Beta\\Microsoft\\Graph\\Model\\CoachmarkLocation\") || is_null($this->_propDict[\"coachmarkLocation\"])) {\n return $this->_propDict[\"coachmarkLocation\"];\n } else {\n $this->_propDict[\"coachmarkLocation\"] = new CoachmarkLocation($this->_propDict[\"coachmarkLocation\"]);\n return $this->_propDict[\"coachmarkLocation\"];\n }\n }\n return null;\n }",
"public function getInd()\n {\n return $this->hasOne(Indicador::className(), ['ind_id' => 'ind_id']);\n }",
"public function getAttorney()\n {\n return $this->get(self::ATTORNEY);\n }",
"public static function getCurrentClinic() {\n $user = Auth::user();\n\n return $user->clinic;\n }",
"public function getCareof()\n {\n return $this->careof;\n }",
"public function getAccident()\n {\n return $this->accident;\n }",
"public function getMarkToday()\n {\n return $this->markToday;\n }",
"public function getCadence(){\n return $this->cadence;\n }",
"public function getCoveredCodeMutationScoreIndicator(): float\n {\n return $this->getCalculator()->getCoveredCodeMutationScoreIndicator();\n }",
"public function getCodeguichet()\n {\n return $this->codeguichet;\n }",
"public function getCandidat()\n {\n return $this->candidat;\n }",
"public function getCurrentMarker()\n {\n if($this->currentMarker < 0 || $this->currentMarker > count($this->markers) - 1) return false;\n return $this->markers[$this->currentMarker];\n }",
"public function getCodcaj(){\n\t\treturn $this->codcaj;\n\t}",
"public function getAccion() {\r\n return $this->pAccion;\r\n }",
"public function getCoInformeIncidente()\n\t{\n\t\treturn $this->co_informe_incidente;\n\t}",
"public function getAceite();",
"public function getCilindrada()\n {\n return $this->cilindrada;\n }",
"public function getAttributeName()\n\t{\n\t\treturn 'Indicator';\n\t}",
"public function getInterest()\n\t\t{\n\t\t return $this->interest;\n\t\t}",
"public function getCitta() {\n return $this->citta;\n }",
"public function getIteneraryNonRefundableIndicator()\n {\n return $this->IteneraryNonRefundableIndicator;\n }",
"public function getCinema()\n {\n return $this->cinema;\n }",
"public function getEncounter()\n {\n return $this->encounter;\n }",
"public function networkDataAtcCurrent()\n {\n return $this->hasOne(\\App\\Models\\NetworkData\\Atc::class, 'account_id', 'id')\n ->whereNull('disconnected_at')\n ->limit(1);\n }",
"public function getChartOfAccountId()\n {\n return $this->chartOfAccountId;\n }",
"public function getCind()\n {\n return $this->hasOne(ComportamientoIndicador::className(), ['cind_id' => 'cind_id']);\n }",
"function GetAnimation() {\n return ($this->GIF);\n }",
"public function getCoin()\n {\n return $this->coin;\n }",
"public function getCoin()\n {\n return $this->coin;\n }",
"function getMarker() {\n\t\treturn $this->marker;\n\t}",
"public function getHazardousRiskIndicator()\n {\n return $this->hazardousRiskIndicator;\n }",
"public function getC()\n {\n return $this->C;\n }",
"public function getCriado()\n {\n return $this->criado;\n }",
"public function getCriado()\n {\n return $this->criado;\n }",
"public function setIndicator($val)\n {\n $this->_propDict[\"indicator\"] = $val;\n return $this;\n }",
"public function getCni()\n {\n return $this->cni;\n }",
"public function get_current_interstitial() {\n\t\treturn $this->data['current'];\n\t}",
"public function setIndicator($indicator)\n {\n $this->indicator = $indicator;\n return $this;\n }",
"public function getShipperReleaseIndicator()\n {\n return isset($this->shipperReleaseIndicator) ? $this->shipperReleaseIndicator : null;\n }",
"public function getIndiceCateg(): ?int {\n return $this->indiceCateg;\n }",
"public function getCurrenty()\n {\n return $this->getIfSet('currency', $this->data->amount);\n }",
"public function getMarker()\n {\n\t\treturn $this->_marker;\n\t}",
"public function getIncome()\n {\n return $this->get(self::_INCOME);\n }",
"public function getIncome()\n {\n return $this->get(self::_INCOME);\n }",
"public function getAttributeName()\n\t{\n\t\treturn 'HousingIndicator';\n\t}",
"public function getCurrentCandidat()\n\t{\n\t\t$em = $this->getDoctrine()->getManager();\n\t\t\n\t\t$loggedUser = parent::getLoggedUser();\n\t\t\n\t\t$this->currentCandidat = $em->getRepository('JobHubBundle:Candidat')->findOneBy(array('compteUser' => $loggedUser));\n\t\t\n\t\treturn $this->currentCandidat;\n\t}",
"public function getIndiceAem() {\n return $this->indiceAem;\n }",
"public function getCodope(){\n\t\treturn $this->codope;\n\t}",
"public function getCivilite()\n {\n return $this->civilite;\n }",
"public function getFirstMarker()\n {\n $this->currentMarker = 0;\n return $this->getCurrentMarker();\n }",
"public function getClassificacao() {\n return $this->oClassificacao;\n }",
"private function get_icon()\n\t{\n\t\treturn $this->m_icon;\n\t}",
"private function get_icon()\n\t{\n\t\treturn $this->m_icon;\n\t}",
"public function getCouncilReference() {\n return $this->council_reference;\n\n }",
"public function getCouleur()\n {\n return $this->couleur;\n }",
"public function current()\n {\n if (isset($this->_annotations[$this->_position])) {\n return $this->_annotations[$this->_position];\n } else {\n return false;\n }\n }",
"public function getCriacao()\n {\n return $this->criacao;\n }",
"public function get_cidade() : ?int\n {\n return $this->cidade;\n }",
"public function getCreditActief() {\n\t\treturn $this->creditActief;\n\t}",
"public function getInsurace(): int\n {\n return $this->insurace;\n }",
"public function getNombreIndicador( ){\n\t\t\treturn $this->nombreIndicador;\n\t\t}",
"public function getC1()\r\n {\r\n return $this->C1;\r\n }",
"public function getCoveragePref()\n {\n return $this->coveragePref;\n }",
"public function getActif()\n {\n return $this->actif;\n }",
"public function getActif()\n {\n return $this->actif;\n }",
"public function getCesta()\n {\n return $this->cesta;\n }",
"public function getCesta()\n {\n return $this->cesta;\n }",
"public function getCidTax()\n {\n return $this->cid_tax;\n }",
"public function getCouncilId() {\n\n return $this->councils_id;\n\n }",
"public function getBachilleratoAccion()\n\t{\n\t\treturn $this->bachilleratoAccion;\n\t}",
"public function get_cat_url_indicator()\n {\n if(isset(ee()->publisher_model->current_language['cat_url_indicator']) &&\n ee()->publisher_model->current_language['cat_url_indicator'] != '')\n {\n return ee()->publisher_model->current_language['cat_url_indicator'];\n }\n\n return ee()->config->item('reserved_category_word');\n }",
"public function getRestrictedDisplayIndicator()\n {\n return $this->restrictedDisplayIndicator;\n }",
"public function getCoInformeForense()\n\t{\n\t\treturn $this->co_informe_forense;\n\t}",
"public function getCognome()\n {\n return $this->cognome;\n }",
"public function getHattricksInCareer()\n {\n return $this->getXml()->getElementsByTagName('CareerHattricks')->item(0)->nodeValue;\n }",
"public function getCoEdificio()\n\t{\n\t\treturn $this->co_edificio;\n\t}",
"public function getAccNoImg()\n {\n return $this->acc_no_img;\n }",
"public function getStatusAto()\n {\n return $this->status_ato;\n }",
"public function getCodice()\n {\n return $this->codice;\n }",
"public function getSectoreconomicoAccion()\n\t{\n\t\treturn $this->sectoreconomicoAccion;\n\t}",
"public function getAttribution()\n {\n return $this->attribution;\n }",
"public function getCognome() {\n return $this->cognome;\n }",
"public function getCLIENTE()\r\n {\r\n return $this->CLIENTE;\r\n }",
"public function current() \n {\n return current($_COOKIE);\n }",
"public function current()\n {\n return $this->pager->current();\n }",
"public function get_beacon(): int\n {\n // $res is a enumONOFF;\n // $dev is a YDevice;\n if ($this->_cacheExpiration <= YAPI::GetTickCount()) {\n $dev = $this->_getDev();\n if (!($dev == null)) {\n return $dev->getBeacon();\n }\n if ($this->load(YAPI::$_yapiContext->GetCacheValidity()) != YAPI::SUCCESS) {\n return self::BEACON_INVALID;\n }\n }\n $res = $this->_beacon;\n return $res;\n }",
"public function icon()\n {\n return $this->icon;\n }",
"function getAttribution() \n {\n return $this->_attribution;\n }"
] | [
"0.6871639",
"0.6764327",
"0.60312074",
"0.54736185",
"0.5411955",
"0.54088974",
"0.54088974",
"0.5402555",
"0.53989804",
"0.53844714",
"0.53071046",
"0.5295997",
"0.5281968",
"0.5263277",
"0.52573156",
"0.5253479",
"0.5245824",
"0.5219351",
"0.5211711",
"0.51964664",
"0.5193231",
"0.5189959",
"0.51857305",
"0.51855195",
"0.5159655",
"0.5158757",
"0.51576096",
"0.5152144",
"0.5148264",
"0.51421416",
"0.5131856",
"0.51236725",
"0.511993",
"0.5111149",
"0.50963724",
"0.5088804",
"0.5086239",
"0.50655186",
"0.50573444",
"0.5052168",
"0.5052168",
"0.5048701",
"0.5038645",
"0.50312364",
"0.5030086",
"0.5030086",
"0.50262344",
"0.50234973",
"0.50208545",
"0.50199443",
"0.5004139",
"0.5002499",
"0.49969754",
"0.49846646",
"0.49829054",
"0.49829054",
"0.49734467",
"0.4970602",
"0.4963287",
"0.49622416",
"0.49536237",
"0.49448666",
"0.49425653",
"0.49410096",
"0.49410096",
"0.4939365",
"0.49359816",
"0.49273217",
"0.49270752",
"0.4920682",
"0.49174482",
"0.49007004",
"0.4898984",
"0.48939642",
"0.4883137",
"0.48814595",
"0.48814595",
"0.48808506",
"0.48808506",
"0.48805505",
"0.48675144",
"0.4857724",
"0.48555315",
"0.4851005",
"0.48375514",
"0.48180875",
"0.48149347",
"0.48042512",
"0.4801797",
"0.47954035",
"0.4790517",
"0.47874796",
"0.47853196",
"0.47811836",
"0.4781006",
"0.47791505",
"0.47739658",
"0.4773653",
"0.47660226",
"0.47646642"
] | 0.68549293 | 1 |
Sets the indicator The coachmark indicator. | public function setIndicator($val)
{
$this->_propDict["indicator"] = $val;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setIndicator($indicator)\n {\n $this->indicator = $indicator;\n return $this;\n }",
"public function setProgressIndicator(int $indicator) {\n $this->setValue(0x3C5, $indicator);\n }",
"public function __construct($cashIndicator = null)\n {\n $this\n ->setCashIndicator($cashIndicator);\n }",
"public function setMaternityCoverageIndicator($maternityCoverageIndicator)\n {\n $this->maternityCoverageIndicator = $maternityCoverageIndicator;\n return $this;\n }",
"public function setMarkIdentification($value) {\n\t\tself::$_markIdentification = $value;\n\t}",
"public function setPublicIndicator($publicIndicator)\n {\n $this->publicIndicator = $publicIndicator;\n return $this;\n }",
"protected function setMark() {\n echo $this->promptMessage('choose_mark');\n $mark = $this->limitInput(array(self::X_MARK, self::O_MARK, self::QUIT_BUTTON));\n switch ($mark) {\n case self::X_MARK:\n $this->_userMark = self::X_MARK;\n $this->_botMark = self::O_MARK;\n break;\n case self::O_MARK:\n $this->_userMark = self::O_MARK;\n $this->_botMark = self::X_MARK;\n break;\n case self::QUIT_BUTTON:\n $this->quit();\n }\n echo \"You will be Player \" . $this->_userMark . \".\" . PHP_EOL;\n echo $this->promptMessage('start_game') . PHP_EOL;\n }",
"public function setVisionCoverageIndicator($visionCoverageIndicator)\n {\n $this->visionCoverageIndicator = $visionCoverageIndicator;\n return $this;\n }",
"function getIndicator() ;",
"public function setCoachmarkLocation($val)\n {\n $this->_propDict[\"coachmarkLocation\"] = $val;\n return $this;\n }",
"public function setInitialMarking($initialMarking, $setTokens = false) {\n\t\t$this->initialMarking = (int) $initialMarking;\n\t\tif($setTokens) {\n\t\t\t$this->resetTokens();\n\t\t}\n\t}",
"public function setCi($_ci)\n {\n $this->ci = $_ci;\n }",
"public function getIndicatorElement() {\n\t\treturn $this->indicator;\n\t}",
"private function setIndicators($type) {\n $this->setIndicator($type, 'left');\n $this->setIndicator($type, 'right');\n $this->setIndicator($type, 'separator');\n }",
"protected function set_accessory() {\n $this->accessory = $this->safe_find_from_id('Accessory');\n }",
"public function testSetIndemnAutre() {\n\n $obj = new AttestationCacm();\n\n $obj->setIndemnAutre(true);\n $this->assertEquals(true, $obj->getIndemnAutre());\n }",
"public function show(CategoryIndicator $categoryIndicator)\n {\n //\n }",
"public function setFormattedIndicator($formattedIndicator)\n {\n $this->formattedIndicator = $formattedIndicator;\n return $this;\n }",
"public function getIndicator()\n {\n if (array_key_exists(\"indicator\", $this->_propDict)) {\n return $this->_propDict[\"indicator\"];\n } else {\n return null;\n }\n }",
"public function saveIndicatorCoupon($order, $indicatorCoupon)\n {\n try{\n $dateNow = new DateTime();\n $collection = mage::getModel('affiliateclub/affiliateclub')\n ->getCollection()\n ->addFieldToFilter('order_id', $order->getId());\n\n $collection->getFirstItem()\n ->setIndicatorCoupon($indicatorCoupon)\n ->setUpdatedAt($dateNow->getTimestamp())\n ->save();\n \n $this->helper->log(\"Atualizou o cupom do indicador no banco\");\n } catch (Exception $e) {\n $this->helper->log($e->getMessage());\n } \n }",
"public function setMarkToday($markToday)\n {\n $this->markToday = $markToday;\n }",
"public function setC($x) { $this->c = $x; }",
"function setMaCauHoi($ma_cau_hoi){\r\n\t\t$this->ma_cau_hoi = $ma_cau_hoi;\r\n\t}",
"public function setAuctionConstraintIndicator($auctionConstraintIndicator)\n {\n $this->auctionConstraintIndicator = $auctionConstraintIndicator;\n return $this;\n }",
"public function setDomesticPartnerIndicator($domesticPartnerIndicator)\n {\n $this->domesticPartnerIndicator = $domesticPartnerIndicator;\n return $this;\n }",
"public function setAttribution($attribution)\n {\n $this->attribution = $attribution;\n }",
"public function testSetIndemnLegale() {\n\n $obj = new AttestationCacm();\n\n $obj->setIndemnLegale(true);\n $this->assertEquals(true, $obj->getIndemnLegale());\n }",
"public function testSetAnnulationClient() {\n\n $obj = new Collaborateurs();\n\n $obj->setAnnulationClient(true);\n $this->assertEquals(true, $obj->getAnnulationClient());\n }",
"public function setIndicatorString($indicatorString)\n {\n $this->indicatorString = $indicatorString;\n return $this;\n }",
"protected function setCuitOrDni($afipInvoice,$customer){\n\t\t$ivaAmount = $afipInvoice->getIva_0250() + $afipInvoice->getIva_0500() + $afipInvoice->getIva_1050() + $afipInvoice->getIva_2100() + $afipInvoice->getIva_2700();\n\t\t$netoAmount = $afipInvoice->getNeto_0250() + $afipInvoice->getNeto_0500() + $afipInvoice->getNeto_1050() + $afipInvoice->getNeto_2100() + $afipInvoice->getNeto_2700() + $afipInvoice->getNetoExento();\n\t\t//Factura B\n\t\tif($afipInvoice->getType() == TypeEnum::B){\n\t\t\t//>= $1000\n\t\t\tif(($customer->getIvaCondition() == 1 || $customer->getIvaCondition() == 4) && ($ivaAmount + $netoAmount) >= 1000){\n\t\t\t\tif(strlen($customer->getTaxvat()) == 11){\n\t\t\t\t\t$this->setCUITNumber($customer->getTaxvat());\n\t\t\t\t}else{\n\t\t\t\t\t$this->setDNINumber($customer->getTaxvat());\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t//Responsable monotributo o Exento\n\t\t\t\tif($customer->getIvaCondition() == 3 || $customer->getIvaCondition() == 5){\n\t\t\t\t\tif(strlen($customer->getTaxvat()) == 11){\n\t\t\t\t\t\t$this->setCUITNumber($customer->getTaxvat());\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$this->setDNINumber($customer->getTaxvat());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t//Factura A\t\n\t\t}else{\n\t\t\t$this->setCUITNumber($customer->getTaxvat());\n\t\t}\n\t\t \n\t\t \n\t\t\n\t}",
"public function setAlbumCover($aid, $iid, $uid) {\n\t\t$album = $this->find('first', array('conditions' => array('Album.id' => $aid, 'Album.user_id' => $uid)));\n\t\tif ($album) {\n\t\t\t$this->id = intval($aid);\n\t\t\t$this->saveField('cover_id', intval($iid));\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"public function edit(CategoryIndicator $categoryIndicator)\n {\n //\n }",
"function setInteractive($interactive)\n {\n $this->interactive = $interactive;\n }",
"public function setDrugCoverageIndicator($drugCoverageIndicator)\n {\n $this->drugCoverageIndicator = $drugCoverageIndicator;\n return $this;\n }",
"public function setDentalCoverageIndicator($dentalCoverageIndicator)\n {\n $this->dentalCoverageIndicator = $dentalCoverageIndicator;\n return $this;\n }",
"public function getAttributeName()\n\t{\n\t\treturn 'Indicator';\n\t}",
"public function getFormattedIndicator()\n {\n return $this->formattedIndicator;\n }",
"public function setSubstanceAbuseCoverageIndicator($substanceAbuseCoverageIndicator)\n {\n $this->substanceAbuseCoverageIndicator = $substanceAbuseCoverageIndicator;\n return $this;\n }",
"public function setAttorney(\\Diadoc\\Api\\Proto\\Invoicing\\Attorney $value=null)\n {\n return $this->set(self::ATTORNEY, $value);\n }",
"public function testSetStatutCadre() {\n\n $obj = new AttestationCacm();\n\n $obj->setStatutCadre(true);\n $this->assertEquals(true, $obj->getStatutCadre());\n }",
"public function setIntercept($toggle)\n {\n $this->intercept = (bool) $toggle;\n }",
"protected function init() {\n $this->_markers = array(self::X_MARK => array(), self::O_MARK => array());\n }",
"public function setSameSexPartnerIndicator($sameSexPartnerIndicator)\n {\n $this->sameSexPartnerIndicator = $sameSexPartnerIndicator;\n return $this;\n }",
"public function setCancelationFlag(int $flag): void\n {\n API::ffi()->ts_parser_set_cancellation_flag($this->data, $flag);\n }",
"private function cObjData_setFlagDisplayInCaseOfNoCounting()\n {\n static $bool_DRSprompt = true;\n\n if ( !$this->ts_getDisplayInCaseOfNoCounting() )\n {\n return;\n }\n\n // Set key and value for treeview field\n $key = $this->pObj->prefixId . '.flag_displayInCaseOfNoCounting';\n $value = 1;\n\n // Set treeview field\n $this->pObj->cObj->data[ $key ] = $value;\n\n // DRS\n if ( $this->pObj->b_drs_cObjData && $bool_DRSprompt )\n {\n $prompt = 'cObj->data[ ' . $key . '] = ' . $value;\n t3lib_div::devlog( '[INFO/COBJ] ' . $prompt, $this->pObj->extKey, 0 );\n $bool_DRSprompt = false;\n }\n // DRS\n }",
"public function setCountryCode( $val, $markChanged=true ) {\n\t\t$this->countryCode = $val;\n\t\tif( $markChanged ) $this->isChanged = true;\n\t}",
"public function edit(Indicator $indicator)\n {\n //\n }",
"public function set_beacon(int $newval): int\n {\n $rest_val = strval($newval);\n return $this->_setAttr(\"beacon\", $rest_val);\n }",
"public function setCookie($cookie)\n {\n $this->cookie = $cookie;\n curl_setopt($this->ch, CURLOPT_COOKIE, $cookie);\n }",
"private function set_accessory_catid_arr()\n {\n $this->accessory_catid_arr = $this->sc['complementaryAccModel']->getAccessoryCatidArr();\n }",
"public function setCodcaj($codcaj){\n\t\t$this->codcaj = $codcaj;\n\t}",
"public function testSetNumeroAttestation() {\n\n $obj = new AttestationCacm();\n\n $obj->setNumeroAttestation(\"numeroAttestation\");\n $this->assertEquals(\"numeroAttestation\", $obj->getNumeroAttestation());\n }",
"public function setIncidents($val)\n {\n $this->_propDict[\"incidents\"] = $val;\n return $this;\n }",
"static public function setClientOffset($numClientOffset) {\n\t\t\tself::getInstance()->intClientOffset = $numClientOffset * 3600;\n\t\t}",
"public function testSetAnnulationAffaire() {\n\n $obj = new Collaborateurs();\n\n $obj->setAnnulationAffaire(true);\n $this->assertEquals(true, $obj->getAnnulationAffaire());\n }",
"public function setNewsfeedImpression($value)\n\t{\n\t\t$this->newsfeed_impression = $value;\n\t}",
"public function setMentalCoverageIndicator($mentalCoverageIndicator)\n {\n $this->mentalCoverageIndicator = $mentalCoverageIndicator;\n return $this;\n }",
"public function activate_indicator(Request $request)\n {\n $id = Crypt::decrypt($request->id);\n $indicator = AceDlrIndicator::find($id);\n\n if ($indicator->status == 1){\n $indicator->status = 0;\n $indicator->save();\n $indicator->where('parent_id','=',$id)->update(['status'=>0]);\n notify(new ToastNotification('Successful!', 'DLR Indicator Deactivated', 'success'));\n }else{\n $indicator->status = 1;\n $indicator->save();\n $indicator->where('parent_id','=',$id)->update(['status'=>1]);\n notify(new ToastNotification('Successful!', 'DLR Indicator Activated', 'success'));\n }\n return back();\n }",
"function setTieColor($tiecolor) {\n $this->tiecolor = $tiecolor;\n }",
"public function getAuctionConstraintIndicator()\n {\n return $this->auctionConstraintIndicator;\n }",
"public function setAcciNoti($value) {\n\t\t//validando de que el valor sea alfabetico y que sea mayor a uno y menor a cien\n\t\tif ($this->validateAlphanumeric($value, 1, 400)) {\n\t\t\t//seteando valor a la variable de nombre de categoria\n\t\t\t$this->acci_noti = $value;\n\t\t\t//retornando respuesta true\n\t\t\treturn true;\n\t\t} else {\n\t\t\t//retornando respuesta false\n\t\t\treturn false;\n\t\t}\n\t}",
"public function setScrapClient(CrawlingAdapterInterface $client)\n {\n $this->scrapClient = $client;\n }",
"public function testSetAnnulationChantier() {\n\n $obj = new Collaborateurs();\n\n $obj->setAnnulationChantier(true);\n $this->assertEquals(true, $obj->getAnnulationChantier());\n }",
"public function testSetAccesStatCab() {\n\n $obj = new Collaborateurs();\n\n $obj->setAccesStatCab(true);\n $this->assertEquals(true, $obj->getAccesStatCab());\n }",
"public function setIsBillingServiceIndicator(?bool $isBillingServiceIndicator): self\n {\n $this->initialized['isBillingServiceIndicator'] = true;\n $this->isBillingServiceIndicator = $isBillingServiceIndicator;\n\n return $this;\n }",
"public function testSetBic() {\n\n $obj = new Collaborateurs();\n\n $obj->setBic(\"bic\");\n $this->assertEquals(\"bic\", $obj->getBic());\n }",
"function ShowBorder($exterior=true,$interior=true) {\n\t$this->pie_border = $exterior;\n\t$this->pie_interior_border = $interior;\n }",
"protected function setMoneyBar()\n {\n $mysidia = Registry::get(\"mysidia\");\n $this->moneyBar = new Paragraph;\n $this->moneyBar->add(new Comment(\"You have {$mysidia->user->money} {$mysidia->settings->cost}.\"));\n \n $donate = new Link(\"donate\");\n $donate->setText(\"Donate Money to Friends\");\n $this->moneyBar->add($donate);\n $this->setDivision($this->moneyBar);\n }",
"protected function setCae($value)\n\t{\n\t\t$this->setTextFont(10);\n\t\tfor($i=0;$i<$this->copies;$i++){\n\t\t\t$this->_getPdf()->pages[$i]->drawText($value, 466, 67, 'UTF-8');\n\t\t}\n\t\t$this->barcode->addCAE($value);\n\t}",
"public function setSocialImpression($value)\n\t{\n\t\t$this->socialImpression = $value;\n\t}",
"public function testSetIndemnSupp() {\n\n $obj = new AttestationCacm();\n\n $obj->setIndemnSupp(true);\n $this->assertEquals(true, $obj->getIndemnSupp());\n }",
"public function setCourrielCandidat($courrielCandidat)\n\t{\n\t\t$this->_courriel_candidat = $courrielCandidat;\n\t}",
"public function setCookie($cookie) {\n $this->cookie = $cookie;\n }",
"function setSeeking($newSeeking){\n $this->seeking = $newSeeking;\n }",
"private function setAvatar(Avatar $avatar) {\n $this->avatar = $avatar;\n }",
"public function setAnalitics($cad) { $this->analitics = $cad; }",
"public function testSetNiveauQualif() {\n\n $obj = new AttestationCacm();\n\n $obj->setNiveauQualif(\"niveauQualif\");\n $this->assertEquals(\"niveauQualif\", $obj->getNiveauQualif());\n }",
"private function setIndicator($type, $indicatorType) {\n $type = strtolower($type);\n $indicatorType = strtolower($indicatorType);\n $func = 'get' . ucfirst($type) . ucfirst($indicatorType) . 'Indicator';\n $indicator = _SUGAR::getGlobalConfiguration()->$func();\n\n $arrayKey = $type . ucfirst($indicatorType);\n if (!array_key_exists($arrayKey, $this->sugarTemplateIndicators)) {\n throw new SugarExecutionException;\n }\n\n $this->sugarTemplateIndicators[$arrayKey] = $indicator !== null ?\n $indicator :\n $this->sugarTemplateIndicators[$arrayKey];\n }",
"public function setAccion($pAccion) {\r\n $this->pAccion = $pAccion;\r\n return $this;\r\n }",
"public function testSetAutreStatut() {\n\n $obj = new AttestationCacm();\n\n $obj->setAutreStatut(\"autreStatut\");\n $this->assertEquals(\"autreStatut\", $obj->getAutreStatut());\n }",
"public function setInteractive($value)\n {\n $this->interactive = $value;\n }",
"public function setUniqueImpression($value)\n\t{\n\t\t$this->uniqueImpression = $value;\t\n\t}",
"public function markRead ()\n\t{\n\t\tif (isset($_COOKIE[\"read\"]) && $_COOKIE[\"read\"] == 1)\n\t\t{\n\t\t\t$Statement = $this->Database->prepare(\"UPDATE messages SET unread = 0 WHERE reciever = ?\");\n\t\t\t$Statement->execute(array($this->id));\n\t\t\tsetcookie('read', 0, time()-3600);\n\t\t}\n\t}",
"public function setFrozenDocumentIndicator($frozenDocumentIndicator)\n {\n $this->frozenDocumentIndicator = $frozenDocumentIndicator;\n return $this;\n }",
"public static function setCitation(Citation $citation)\n {\n self::$citation = $citation;\n }",
"public static function setCitationItem(CitationAbstract $citationItem)\n {\n self::$citationItem = $citationItem;\n }",
"public function setCareof($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->careof !== $v) {\n $this->careof = $v;\n $this->modifiedColumns[OrdrhedTableMap::COL_CAREOF] = true;\n }\n\n return $this;\n }",
"public function setIcon(int $icon):void {\r\n\t\tif ($icon !== null) {\r\n\t\t\t$this->icon = new IconVector();\r\n\t\t\t$this->icon->setIcon($icon);\r\n\t\t} else {\r\n\t\t\t$this->icon = null;\r\n\t\t}\r\n\t}",
"public function set()\n {\n // to reflect the current bar.\n\n // Why?\n\n // Otherwise the bar count gets repeated. And that people notice.\n\n $this->variables->setVariable(\"count\", $this->bar_count);\n $this->variables->setVariable(\"max_bar_count\", $this->max_bar_count);\n\n $this->variables->setVariable(\"refreshed_at\", $this->current_time);\n }",
"public function markCompeted() {\n $this->status = self::COMPLETED;\n }",
"public function setIncome($value)\n {\n return $this->set(self::_INCOME, $value);\n }",
"public function setIncome($value)\n {\n return $this->set(self::_INCOME, $value);\n }",
"public function setCC()\n {\n }",
"public function setCreditInfo() {\n\t\t$this->creditInfo = $this->photo['title'] . \" by \" . $this->userName;\n\t}",
"public function setKaina($x) {\n $this->kaina = $x; //privati reiksme tai kaina\n }",
"public function getInitialMarking() {\n\t\treturn $this->initialMarking;\n\t}",
"public function setGoal()\n {\n }",
"public function setActive()\n\t\t{\n\t\t\t$this->_state = 1;\n\t\t}",
"public function setInteriorSeatBelt($value) {\n switch ($value) {\n case 0 : // Sin da�o\n return 0;\n break;\n case 6 : // Malo\n return 10;\n break;\n }\n }",
"public function getAttributeName()\n\t{\n\t\treturn 'HousingIndicator';\n\t}"
] | [
"0.5895671",
"0.55091476",
"0.5131596",
"0.512462",
"0.5121745",
"0.51140857",
"0.49787202",
"0.49094555",
"0.48628163",
"0.47848547",
"0.4719203",
"0.4656031",
"0.458182",
"0.45355946",
"0.44918737",
"0.4491703",
"0.4468697",
"0.44537216",
"0.44352505",
"0.4425843",
"0.44167453",
"0.44144765",
"0.44072235",
"0.43940404",
"0.4390552",
"0.43672413",
"0.43486434",
"0.43006104",
"0.4278873",
"0.4276768",
"0.42734835",
"0.42617023",
"0.42514506",
"0.41884822",
"0.41858944",
"0.4179653",
"0.41696724",
"0.41578203",
"0.41489503",
"0.41435272",
"0.4141097",
"0.4141032",
"0.41406018",
"0.41311467",
"0.41243732",
"0.4102178",
"0.41011125",
"0.40991074",
"0.40890113",
"0.4087994",
"0.40797374",
"0.40791854",
"0.40765953",
"0.40742368",
"0.40727663",
"0.40646753",
"0.40627903",
"0.40591395",
"0.4056318",
"0.40555686",
"0.40525323",
"0.4048949",
"0.4047873",
"0.4044879",
"0.40435895",
"0.40376094",
"0.40371996",
"0.40321368",
"0.40299183",
"0.40286294",
"0.40276304",
"0.40227765",
"0.40217233",
"0.4020004",
"0.401384",
"0.40116102",
"0.40107593",
"0.40092984",
"0.4000063",
"0.39905593",
"0.398899",
"0.39822194",
"0.39805368",
"0.3977424",
"0.39743185",
"0.39733875",
"0.3969496",
"0.39653346",
"0.3962188",
"0.39586726",
"0.3952116",
"0.3952116",
"0.39485767",
"0.39479175",
"0.3939691",
"0.3937787",
"0.393274",
"0.3931798",
"0.39271444",
"0.39211982"
] | 0.59351665 | 0 |
Gets the isValid Indicates whether the coachmark is valid or not. | public function getIsValid()
{
if (array_key_exists("isValid", $this->_propDict)) {
return $this->_propDict["isValid"];
} else {
return null;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getIsValid()\n {\n return $this->isValid;\n }",
"public function getIsValid(){\r\n\t\treturn $this->isValid;\r\n\t}",
"public function isValid() {\n\t\treturn $this->is_valid;\n\t}",
"public function isValid()\n {\n return $this->isValid;\n }",
"public function isValid()\n {\n return $this->data['is_valid'];\n }",
"public function isValid()\n\t{\n\t\treturn $this->_isValid;\n\t}",
"protected function isValid()\r\n\t{\r\n\t\treturn $this->isValid;\r\n\t}",
"public function getIsValid(){\n return $this->isValid;\n }",
"public function isValid()\n\t{\n\t\treturn $this->valid;\n\t}",
"public function isValid()\n\t{\n\t\treturn $this->valid;\n\t}",
"public function isValid() {\n\n return $this->valid;\n\n }",
"public function isValid() {\n return $this->valid;\n }",
"public function isValid(){\r\n\t\treturn $this->valid;\r\n\t}",
"public function isValid()\n {\n return $this->isValid;\n }",
"public function valid()\n {\n return $this->_isValid;\n }",
"public function isValid() : bool {\n\t\t\treturn $this->isValid;\n\t\t}",
"public static function isValid(): bool\n {\n return self::$ok;\n }",
"public function isValid(): bool {\n return $this->valid;\n }",
"function isValid()\n {\n if ($this->validity) {\n return true;\n } else {\n return false;\n }\n }",
"function isValid() {\n return $this->validator ? $this->validator->isValid($this->value) : true;\n }",
"public function isValid()\n {\n return $this->validates();\n }",
"public function valid()\n {\n return $this->valid;\n }",
"public function valid()\n {\n return $this->valid;\n }",
"public function valid()\n {\n return $this->valid;\n }",
"public function is_valid() {\n\t\treturn $this->is_valid;\n\t}",
"public function isValid()\n {\n return ($this->_code > 0) ? true : false;\n }",
"public function valid()\n\t{\n\t\treturn $this->valid;\n\t\t\n\t}",
"public function valid()\n\t{\n\t\treturn $this->valid;\n\t}",
"public function isValid() : bool\n {\n return $this->yesNo === self::YES || $this->yesNo === self::NO;\n }",
"public function getValid()\n {\n return $this->valid;\n }",
"public function getValid()\n {\n return $this->valid;\n }",
"public function getValid()\n {\n return $this->valid;\n }",
"public function isValid(): bool\n {\n\t\tif(!isset($this->valid)) {\n $this->valid = $this->applyValidators(\n $this->applyModifiers((string) $this->getValue())\n );\n\t\t}\n\n\t\treturn $this->valid;\n\t}",
"public function isValid() {\n return $this->isAccepted();\n }",
"public function isValid() : bool {\n\t\t\treturn $this->error == 0;\n\t\t}",
"public function isValid()\n\t{\n\t\treturn TRUE;\n\t}",
"public function isValid()\n {\n return \\Laminas\\Form\\Form::isValid();\n }",
"public function valid()\n {\n return $this->makeValidator()->passes();\n }",
"public function isValidated()\n {\n return $this->attribute('state') == self::STATUS_VALIDATED;\n }",
"public function isValid()\n {\n return $this->hasAddress() || $this->hasCoordinate();\n }",
"public function isValid(){\n return (bool) ($this->hasStarted() && !$this->isCancelled());\n }",
"public function isValid() {\r\n if (isset($this->_comment) && isset($this->_parentCommentId) && isset($this->_userId) && isset($this->_domainId) && isset($this->_formId) && isset($this->_date)) {\r\n $this->_valid = true;\r\n } else {\r\n $this->_valid = false;\r\n }\r\n return $this->_valid;\r\n }",
"public function isValid(){\n $bool = false;\n if($this->res) {\n $bool = true;\n }\n return $bool;\n }",
"public function isValid() {\n\t\t$validation = Validator::make($this->attributes, static::$rules);\n\n\t\tif ($validation->passes()){\n\t\t\treturn true;\n\t\t}\n\n\t\t$this->messages = $validation->messages();\n\t\treturn false;\n\t}",
"public function isValid()\n {\n if ($this->_code == self::RESULT_OK) {\n return true;\n }\n\n return false;\n }",
"public function isValid(): bool;",
"public function isValid(): bool;",
"public function isValid(): bool;",
"public function isValid(): bool;",
"public function isValid(): bool;",
"public function isValid(): bool;",
"public function isValid(): bool;",
"public function isValid() {}",
"public function isValid() {}",
"public function isValid() {}",
"public function isValid() {}",
"public function isValid() {}",
"public function isValid() {}",
"public function isValid() {}",
"public function isValid() {}",
"public function isValid()\n\t{\n\t\treturn true;\n\t}",
"public function getIsValid(): bool\n {\n $token = $this->getToken();\n\n return !empty($token) && !$this->getIsExpired();\n }",
"public function isValid()\n {\n $datetime = new \\DateTime();\n\n return ($this->valid >= $datetime) ? true : false;\n }",
"public function isValid()\n\t\t{\n\t\t\treturn !is_null($this->data);\n\t\t}",
"public function isValid()\n {\n return ($this->obj != false);\n }",
"public function valid()\n {\n return current($this->rules) !== false;\n }",
"public function isValid() {\n return $this->getValidation()->isValidField($this->getName());\n }",
"public function is_valid()\n {\n foreach ($this->status as $status)\n {\n if ($status !== $this->valid_message)\n {\n return (false);\n }\n }\n return (true);\n }",
"public function isValid(): bool {\n return true;\n }",
"public function isValid() {\n\t\ttry {\n\t\t\t$this->validate();\n\t\t\treturn true;\n\t\t} catch (ValidationException $e) {\n\t\t\treturn false;\n\t\t}\n\t}",
"public function is_valid(){\n return $this->is_valid;\n }",
"public function isValid()\n {\n return $this->lat >= -90 && $this->lat <= 90 &&\n $this->lon >= -180 && $this->lon <= 180;\n }",
"public function isValid()\n\t{\n\t\treturn false;\n\t}",
"public function isValid();",
"public function isValid();",
"public function isValid();",
"public function isValid();",
"public function isValid();",
"public function isValid();",
"public function isValid();",
"public function isValid();",
"public function isValid();",
"public function isValid();",
"public function isValid();",
"public function isValid();",
"public function isValid();",
"public function isValid();",
"public function isValid();",
"public function isValid();",
"public function isValid(): bool\n {\n }",
"public function valid()\n {\n return $this->validateData();\n }",
"public function valid() : bool\n {\n return $this->errors() ? false : true;\n }",
"function isValid () {\r\n if ( count ($this->errors) > 0 ) {\r\n return false;\r\n } else {\r\n return true;\r\n }\r\n }",
"public function isValid(): bool{\n if ($this->getError() == null){return true;}\n return false;\n }",
"public function valid(): bool;",
"public function valid(): bool;",
"public function valid(): bool;",
"public function valid(): bool;",
"public function valid()\n {\n if (!empty($this->validateStatus())) {\n return false;\n }\n if (!empty($this->validateTime())) {\n return false;\n }\n return true;\n }",
"public function valid()\n {\n\n if ($this->container['days_of_validity'] === null) {\n return false;\n }\n if ($this->container['certificate'] === null) {\n return false;\n }\n if ($this->container['show_in_catalog'] === null) {\n return false;\n }\n if ($this->container['enable_catchup'] === null) {\n return false;\n }\n return true;\n }"
] | [
"0.7673838",
"0.7636281",
"0.75833887",
"0.7582684",
"0.7541888",
"0.75232756",
"0.7522555",
"0.7509746",
"0.74905956",
"0.74905956",
"0.7465529",
"0.7459131",
"0.7432402",
"0.74318254",
"0.73070943",
"0.7307087",
"0.7137973",
"0.71263367",
"0.6983288",
"0.69422",
"0.6930487",
"0.6899638",
"0.6899638",
"0.6899638",
"0.6895228",
"0.6871343",
"0.6865596",
"0.6847397",
"0.6844932",
"0.68323773",
"0.68323773",
"0.68323773",
"0.6706505",
"0.6697063",
"0.6693223",
"0.66893286",
"0.66885054",
"0.66796875",
"0.6643625",
"0.66425216",
"0.6633268",
"0.66173446",
"0.6599437",
"0.6597502",
"0.6592892",
"0.6575081",
"0.6575081",
"0.6575081",
"0.6575081",
"0.6575081",
"0.6575081",
"0.6575081",
"0.6571718",
"0.65713966",
"0.65713966",
"0.65713966",
"0.65713966",
"0.65713966",
"0.65713054",
"0.65713054",
"0.65559596",
"0.65236336",
"0.65096766",
"0.64963025",
"0.6490058",
"0.6487852",
"0.64818925",
"0.6476018",
"0.6458664",
"0.6436258",
"0.6431925",
"0.6430114",
"0.64235276",
"0.6397259",
"0.6397259",
"0.6397259",
"0.6397259",
"0.6397259",
"0.6397259",
"0.6397259",
"0.6397259",
"0.6397259",
"0.6397259",
"0.6397259",
"0.6397259",
"0.6397259",
"0.6397259",
"0.6397259",
"0.6397259",
"0.638288",
"0.6368693",
"0.63573414",
"0.6347849",
"0.63453776",
"0.63171434",
"0.63171434",
"0.63171434",
"0.63171434",
"0.63033646",
"0.6288448"
] | 0.6759073 | 32 |
Sets the isValid Indicates whether the coachmark is valid or not. | public function setIsValid($val)
{
$this->_propDict["isValid"] = $val;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setIsValid($isValid)\n {\n $this->isValid = $isValid;\n return $this;\n }",
"public function setIsValid(bool $isValid): ValidationResult\n {\n $this->isValid = $isValid;\n return $this;\n }",
"public function set_valid($is_valid){\n $this->is_valid = $this->is_valid && (bool)$is_valid;\n }",
"public function setValid($valid);",
"function setIsValid(bool $valid)\n{\n\tvar_dump($valid);\n}",
"public function changeValid($valid)\n\t{\n\t\t$this->_valid = $valid;\n\t}",
"public function setValid($valid)\n\t{\n\t\t$column = self::COL_VALID;\n\t\t$this->$column = $valid;\n\n\t\treturn $this;\n\t}",
"public function setValid($valid)\n\t{\n\t\t$column = self::COL_VALID;\n\t\t$this->$column = $valid;\n\n\t\treturn $this;\n\t}",
"public function setIsValidated(int $isValidated): self\n {\n $this->isValidated = $isValidated;\n\n return $this;\n }",
"public function setValid(bool $flag): self\n {\n $this->valid = $flag;\n if(!$flag){\n $this->flushCache();\n }\n return $this;\n }",
"public function __construct($isValid = false, $error = null)\n {\n $this->_isValid = $isValid;\n $this->_error = $error;\n }",
"public function isValid()\n {\n return $this->isValid;\n }",
"public function isValid() {}",
"public function isValid() {}",
"public function isValid() {}",
"public function isValid() {}",
"public function isValid() {}",
"public function isValid() {}",
"public function isValid() {}",
"public function isValid() {}",
"public function getIsValid(){\n return $this->isValid;\n }",
"public function isValid()\n {\n return $this->isValid;\n }",
"public function isValid() : bool {\n\t\t\treturn $this->isValid;\n\t\t}",
"public function setValidate($bool)\n {\n $this->validate = (bool)$bool;\n }",
"public function setValid($value)\n {\n return $this->set(self::VALID, $value);\n }",
"public function isValid(): bool {\n return true;\n }",
"public function setValid($var)\n {\n GPBUtil::checkBool($var);\n $this->valid = $var;\n\n return $this;\n }",
"public function isValid(): bool {\n return $this->valid;\n }",
"protected function isValid(): bool {\n return true;\n }",
"function IsValid()\r\n\t{\r\n\r\n\t}",
"protected function isValid()\r\n\t{\r\n\t\treturn $this->isValid;\r\n\t}",
"public function isValid()\n\t{\n\t\treturn true;\n\t}",
"public function setValidate($value) { $this->_validate = $value; }",
"public function getIsValid(){\r\n\t\treturn $this->isValid;\r\n\t}",
"public function isValid(){\r\n\t\treturn $this->valid;\r\n\t}",
"function setValid($surferId, $valid = 1) {\n if (is_numeric($valid) && (int)$valid >= 1 && (int)$valid <= 4) {\n $data = array('surfer_valid' => (int)$valid);\n $success = $this->databaseUpdateRecord(\n $this->tableSurfer, $data, 'surfer_id', $surferId\n );\n // Call the action dispatcher method for other modules\n // who need to do surfer cleanup stuff\n include_once(PAPAYA_INCLUDE_PATH.'system/base_pluginloader.php');\n $actionsObj = base_pluginloader::getPluginInstance(\n '79f18e7c40824a0f975363346716ff62', $this\n );\n $num = $actionsObj->call(\n 'community',\n 'onSetSurferValid',\n array('surfer_id' => $surferId, 'valid' => $valid)\n );\n return (bool)$success;\n }\n return FALSE;\n }",
"public function isValid(): bool\n {\n }",
"public function is_valid()\n {\n }",
"public function is_valid()\n {\n }",
"public function valid()\n {\n return $this->_isValid;\n }",
"function isValid() {\n return true;\n }",
"public function isValid()\n\t{\n\t\treturn TRUE;\n\t}",
"public function isValid();",
"public function isValid();",
"public function isValid();",
"public function isValid();",
"public function isValid();",
"public function isValid();",
"public function isValid();",
"public function isValid();",
"public function isValid();",
"public function isValid();",
"public function isValid();",
"public function isValid();",
"public function isValid();",
"public function isValid();",
"public function isValid();",
"public function isValid();",
"public function getIsValid()\n {\n return $this->isValid;\n }",
"public function isValid() {\n\n return $this->valid;\n\n }",
"public function isValid() : bool\n {\n return $this->yesNo === self::YES || $this->yesNo === self::NO;\n }",
"function isValid()\n {\n if ($this->validity) {\n return true;\n } else {\n return false;\n }\n }",
"public function isValid()\n\t{\n\t\treturn $this->_isValid;\n\t}",
"public function isValid() {\n return $this->valid;\n }",
"abstract public function isValid();",
"abstract public function isValid();",
"public function isValid(): bool;",
"public function isValid(): bool;",
"public function isValid(): bool;",
"public function isValid(): bool;",
"public function isValid(): bool;",
"public function isValid(): bool;",
"public function isValid(): bool;",
"public function isValid(): bool\n {\n\t\tif(!isset($this->valid)) {\n $this->valid = $this->applyValidators(\n $this->applyModifiers((string) $this->getValue())\n );\n\t\t}\n\n\t\treturn $this->valid;\n\t}",
"public function setCodeCollaboValid(?string $codeCollaboValid): PointEmpHeuresAbsComplRempl {\n $this->codeCollaboValid = $codeCollaboValid;\n return $this;\n }",
"public function isValid()\n {\n return ($this->_code > 0) ? true : false;\n }",
"public function isValid() {\n return $this->isAccepted();\n }",
"public function isValid()\n\t{\n\t\treturn false;\n\t}",
"public function isValid()\n\t{\n\t\treturn $this->valid;\n\t}",
"public function isValid()\n\t{\n\t\treturn $this->valid;\n\t}",
"public static function isValid(): bool\n {\n return self::$ok;\n }",
"public function validFrom($validFrom)\n {\n return $this->setProperty('validFrom', $validFrom);\n }",
"public function validFrom($validFrom)\n {\n return $this->setProperty('validFrom', $validFrom);\n }",
"public function isValid() {\n\t\treturn $this->is_valid;\n\t}",
"public function valid()\n {\n }",
"public function valid()\n {\n }",
"public function valid()\n {\n }",
"public function valid()\n {\n }",
"public function valid()\n {\n return true;\n }",
"public function valid()\n {\n return true;\n }",
"public function valid()\n {\n return true;\n }",
"public function valid()\n {\n return true;\n }",
"public function valid()\n {\n return true;\n }",
"public function valid()\n {\n return true;\n }",
"public function valid()\n {\n return true;\n }",
"public function valid()\n {\n return true;\n }",
"public function IsValidCoordinate()\n {\n return $this->Coords->IsValid();\n }",
"public function valid()\n {\n\n return true;\n }",
"public function valid()\n {\n\n return true;\n }",
"public function valid()\n {\n\n return true;\n }"
] | [
"0.71219414",
"0.6772537",
"0.6744619",
"0.67084914",
"0.63374794",
"0.60667044",
"0.5844828",
"0.5844828",
"0.57504696",
"0.5726487",
"0.56165475",
"0.5435902",
"0.5415412",
"0.5413312",
"0.5413312",
"0.54130715",
"0.54130715",
"0.54130715",
"0.54130715",
"0.54130715",
"0.5396143",
"0.538529",
"0.5362058",
"0.53609914",
"0.5342939",
"0.5341267",
"0.5327151",
"0.5322305",
"0.53208643",
"0.531219",
"0.53026396",
"0.5280998",
"0.52733904",
"0.5271797",
"0.5270257",
"0.5255305",
"0.5248549",
"0.52237076",
"0.5223164",
"0.5220652",
"0.52133656",
"0.5171976",
"0.5163639",
"0.5163639",
"0.5163639",
"0.5163639",
"0.5163639",
"0.5163639",
"0.5163639",
"0.5163639",
"0.5163639",
"0.5163639",
"0.5163639",
"0.5163639",
"0.5163639",
"0.5163639",
"0.5163639",
"0.5163639",
"0.51514083",
"0.5146308",
"0.5142066",
"0.513855",
"0.5135001",
"0.5126232",
"0.5118228",
"0.5118228",
"0.511576",
"0.511576",
"0.511576",
"0.511576",
"0.511576",
"0.511576",
"0.511576",
"0.5113417",
"0.51117295",
"0.51107454",
"0.5105296",
"0.5078882",
"0.50463563",
"0.50463563",
"0.5038276",
"0.5026876",
"0.5026876",
"0.5023023",
"0.5020327",
"0.5020327",
"0.5020327",
"0.5020327",
"0.50027287",
"0.50027287",
"0.50027287",
"0.50027287",
"0.50027287",
"0.50027287",
"0.50027287",
"0.50027287",
"0.4995227",
"0.49879467",
"0.49879467",
"0.49879467"
] | 0.6121735 | 5 |
Gets the language The coachmark language. | public function getLanguage()
{
if (array_key_exists("language", $this->_propDict)) {
return $this->_propDict["language"];
} else {
return null;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getLanguage();",
"public function getLanguage();",
"public function getLanguage();",
"public function getLanguage();",
"public function getLanguage();",
"public function getLanguage();",
"public function getLanguage() {}",
"private static function getLanguage()\n {\n if (isset($_COOKIE[\"language\"]))\n {\n return $_COOKIE[\"language\"];\n }\n else\n {\n // Default is Czech\n return \"cs\";\n }\n }",
"protected function getLanguage()\n {\n return $this->localeHeper->getLanguage();\n }",
"public function getLanguage(): string\n {\n return $this->language;\n }",
"public function getLanguage(): string\n {\n return $this->language;\n }",
"public function getLanguage()\n {\n return self::$language;\n }",
"static public function getLanguage() {\n\t\treturn self::$language;\n\t}",
"public function getLang();",
"public function GetLanguage()\n {\n return $this->language;\n }",
"public function getlanguage()\n {\n return $this->language;\n }",
"public function getLanguage()\n {\n return $this->preloadedLanguage;\n }",
"public function getLanguage()\n {\n return $this->language;\n }",
"public function getLanguage()\n {\n return $this->language;\n }",
"public function getLanguage()\n {\n return $this->language;\n }",
"public function getLanguage()\n {\n return $this->language;\n }",
"public function getLanguage()\n {\n return $this->language;\n }",
"public function getLanguage()\n {\n return $this->language;\n }",
"public function getLanguage()\n {\n return $this->language;\n }",
"public function getLanguage()\n {\n return $this->language;\n }",
"public function getLanguage()\n {\n return $this->language;\n }",
"public function getLanguage()\n {\n return $this->language;\n }",
"protected function getLanguage() {\r\n\t\treturn $this->language;\r\n\t}",
"final public function getLang(): string {\n $this->init();\n return $this->language;\n }",
"public function get_language() {\r\n\t\treturn $this->language;\r\n\t}",
"public function getLang()\n\t{\n\t\treturn $this->token->getLang();\n\t}",
"public static function getLanguage() {\n $settings = self::getSettings();\n \n return $settings->language;\n }",
"public function getLanguage()\n\t{\n\t\treturn $this->language;\n\t}",
"public function getLanguage()\n\t{\n\t\treturn $this->language;\n\t}",
"public function getLanguage() {\n return $this->getValueOrDefault('Language');\n }",
"public function get_language() \n {\n return $this->language;\n }",
"public function getLanguage()\n {\n return $this->_language;\n }",
"public function getLanguage() {\n\t\tif ($this->_language === null) {\n\t\t\t$this->analyzeURL();\n\t\t}\n\t\treturn $this->_language;\n\t}",
"public function getBackOfficeLanguage();",
"public function getLang()\n\t{\n\t\treturn $this->pageLanguage;\n\t}",
"public function get_language()\n {\n }",
"static function getLanguage (){\n return self::$language;\n }",
"public function getLanguage() {\n return $this->language;\n }",
"public function getCurrentLanguage()\n {\n return self::$current_language;\n }",
"public function getLanguage() {\n\t\treturn $this->languageCode;\n\t}",
"public function getLanguage()\n {\n if ($this->_language === null) {\n $this->_language = strtolower(Yii::$app->language);\n }\n return $this->_language;\n }",
"public function getLanguage()\n\t\t\t{\n\t\t\t\treturn $this->language;\n\t\t\t}",
"public function getLanguage()\n {\n if (!$this->language) {\n $langs = $this->getBrowserLanguage();\n // creating output list\n $accepted = array();\n foreach ($langs as $lang) {\n $accepted[] = $this->extractDataOfLanguage($lang);\n }\n // sorting the list by coefficient desc\n krsort($accepted);\n if (isset($accepted[0])) {\n $this->language = $accepted[0]['code'];\n }\n }\n\n return $this->language;\n }",
"public function getLanguage() {\n return $this->_language;\n }",
"public function getLanguage() {\n return $this->_language;\n }",
"public function get_language() {\n return $this->_language;\n }",
"public function getLang() {\n\t\treturn substr(Mage::app()->getLocale()->getLocaleCode(), 0, 2);\n\t}",
"public function getLangcode() {\n }",
"public function getLanguage()\r\n {\r\n $language = $this->getTransaction()->languageName;\r\n if(empty($language))\r\n {\r\n $language = leaf_get('properties', 'language_code');\r\n }\r\n\t\treturn $language;\r\n\t}",
"public function getLang()\n {\n return $this->lang;\n }",
"public function getLang()\n {\n return $this->lang;\n }",
"public static function getLanguage()\n {\n if (!is_array(self::$languages)) {\n self::checkLanguages();\n }\n\n return strtolower(substr(reset(self::$languages), 0, 2));\n }",
"public function getLanguage()\n {\n return $this->getFieldValue('language');\n }",
"public function getLanguage() : ?string ;",
"public function getLanguage()\n\t{\n\t\treturn $this->language ? $this->language->getLid() : null;\n\t}",
"public function getLang()\n {\n return $this->_lang;\n }",
"public static function getLang()\n {\n return self::getInstance()->lang;\n }",
"public function getLanguage()\n {\n return $this->getParameter('language');\n }",
"public function getLang(): string {\n return $this->lang;\n }",
"public static function get_lang() {\n\t\t$language = \\Config::get ( 'language' );\n\t\tempty ( $language ) and $language = static::$fallback [0];\n\t\treturn $language;\n\t}",
"public function lang()\n {\n return $this->currlang();\n }",
"public function getLanguageCode();",
"public function getLanguage()\n\t{\n\t\t$language = isset($this->session->data['language']) ? $this->session->data['language'] : $this->config->get('config_language');\n\n\t\t$language_code = substr($language, 0, 2);\n\n\t\t$this->bootstrap();\n\n\t\t$is_available = @constant('\\Genesis\\API\\Constants\\i18n::' . strtoupper($language_code));\n\n\t\tif ($is_available) {\n\t\t\treturn strtolower($language_code);\n\t\t} else {\n\t\t\treturn 'en';\n\t\t}\n\t}",
"public static function getLanguage()\r\n {\r\n return session()->get(self::$sessLanguageKey);\r\n }",
"public function getFromLanguage(): string;",
"public function get_language()\n\t{\n\t\tif ($this->userdata['language'] != '')\n\t\t{\n\t\t\treturn $this->userdata['language'];\n\t\t}\n\t\tif (ee()->input->cookie('language'))\n\t\t{\n\t\t\treturn ee()->input->cookie('language');\n\t\t}\n\t\telse if (ee()->config->item('deft_lang') != '')\n\t\t{\n\t\t\treturn ee()->config->item('deft_lang');\n\t\t}\n\n\t\treturn 'english';\n\t}",
"public function get_language() {\n if (defined('WPLANG')) {\n $language = WPLANG;\n }\n\n if (empty($language)) {\n $language = get_option('WPLANG');\n }\n\n if (!empty($language)) {\n $languageParts = explode('_', $language);\n return $languageParts[0];\n }\n\n return 'en';\n }",
"public function getPrimaryLanguage();",
"public static function get() {\n\t\treturn self::$lang;\n\t}",
"public function getLanguage() {\n\t\treturn $this->getParameter('app_language');\n\t}",
"public function getLanguage()\n\t{\n\t\treturn $this->languageId;\n\t}",
"private function get_language ()\n {\n $lang = filter_input ( INPUT_COOKIE, 'lang', FILTER_CALLBACK, [ 'options' => [ $this, 'filter_lang' ] ] );\n\t$new_lang = filter_input ( INPUT_GET, 'lang', FILTER_CALLBACK, [ 'options' => [ $this, 'filter_lang' ] ] );\n\tif ( $new_lang ) {\n\t\t$lang = $new_lang;\n\t\tsetcookie( \"lang\", substr ( $lang, 0, 2 ), time() + 3600 * 24 * 365, '/' );\n\t}\n\t\n\treturn $lang ?? 'uk';\n }",
"public function getLanguage()\n {\n return substr($this->server['HTTP_ACCEPT_LANGUAGE'], 0, 2);\n }",
"public function getSelectedLanguage()\n {\n return $this->selectedLanguage;\n }",
"function getLang() {\n\t\treturn $this->mLang;\n\t}",
"public function getLanguage()\r\n {\r\n if ($this->getChatHelper()->getLanguage() == 'auto') {\r\n return null;\r\n }\r\n \r\n if ($this->getChatHelper()->getLanguage() == 'md') {\r\n return \"\\$zopim.livechat.setLanguage('\" . substr(Mage::app()->getLocale()->getLocale(),0,2).\"');\" . \"\\n\";\r\n }\r\n return \"\\$zopim.livechat.setLanguage('\" . $this->getChatHelper()->getLanguage() . \"');\" . \"\\n\";\r\n }",
"public function getLanguage()\n\t{\n\t\treturn $this->language ?: config('laraform.language');\n\t}",
"function lang()\n {\n global $CFG; \n $language = $CFG->item('language');\n \n $lang = array_search($language, $this->languages);\n if ($lang)\n {\n return $lang;\n }\n \n return NULL; // this should not happen\n }",
"public function getUrlLanguage() {\n return $this->storedLanguage;\n }",
"public function getLanguage() : BaseLang {\n\t\treturn $this->baseLang;\n\t}",
"public function get_current_lang() {\n return \\Drupal::languageManager()->getCurrentLanguage()->getId();\n }",
"static function get()\n\t{\n\t\treturn self::$lang;\n\t}",
"public function defaultLanguage()\r\n\t{\r\n\t\treturn $this->default_language;\r\n\t}",
"public function getCookieLanguage()\n {\n return isset($_COOKIE['lang']) ? $_COOKIE['lang'] : null;\n }",
"public function getSiteContributionLanguage();",
"private function _getFallbackLanguage(): string\n {\n /** @var WebApplication|ConsoleApplication $this */\n // See if we have the CP translated in one of the user's browsers preferred language(s)\n if ($this instanceof WebApplication) {\n $languages = $this->getI18n()->getAppLocaleIds();\n return $this->getRequest()->getPreferredLanguage($languages);\n }\n\n // Default to the source language.\n return $this->sourceLanguage;\n }",
"public function getLangcode(): string {\n return $this->langcode;\n }",
"public static function getCurrentLang() {\n if (is_null(self::$current)) {\n self::$current = self::getDefaultLang();\n }\n return self::$current;\n }",
"public static function getLang(){\n\t\tif(!isset(self::$_config['lang'])) return null;\n\t\telse return $_COOKIE['lang'];\n\t}",
"public function getLanguageCode()\n {\n return $this->language_code;\n }",
"public function getLanguageCode()\n {\n return $this->language_code;\n }",
"public function language();",
"public function language();",
"public function getLanguage()\n\t{\n\t\t$languages = array();\n\t\t$acceptLanguage = $this->headers->get('ACCEPT_LANGUAGE');\n\t\tif(strpos($acceptLanguage,',')!==false)\n\t\t{\n\t\t\t$languages = explode(',',$acceptLanguage);\n\t\t}\n\t\treturn $languages[0];\n\t}",
"public function getActiveLanguage(): string\n\t{\n\t\treturn $this->selectedLanguage ?? App::getLocale();\n\t}"
] | [
"0.799344",
"0.799344",
"0.799344",
"0.799344",
"0.799344",
"0.799344",
"0.7948252",
"0.7940443",
"0.78448755",
"0.7645013",
"0.7645013",
"0.7641888",
"0.76383454",
"0.7607193",
"0.7580695",
"0.75802904",
"0.75553954",
"0.75302",
"0.75302",
"0.75302",
"0.75302",
"0.75302",
"0.75302",
"0.75302",
"0.75302",
"0.75302",
"0.75302",
"0.7509178",
"0.7507692",
"0.74943674",
"0.74841005",
"0.74830383",
"0.74815667",
"0.74815667",
"0.74814326",
"0.7464439",
"0.74607813",
"0.7447323",
"0.74462444",
"0.7440895",
"0.7438532",
"0.74163455",
"0.7414759",
"0.74106187",
"0.7410441",
"0.74059325",
"0.73919886",
"0.73903805",
"0.73574203",
"0.7354488",
"0.7354114",
"0.7329342",
"0.73283577",
"0.73131895",
"0.729748",
"0.729748",
"0.72948396",
"0.7291271",
"0.72834134",
"0.72801775",
"0.7272292",
"0.7262759",
"0.7242026",
"0.72122204",
"0.7200279",
"0.71945745",
"0.7190113",
"0.71880007",
"0.7187316",
"0.71728224",
"0.7171231",
"0.71672904",
"0.7150145",
"0.7140788",
"0.7138718",
"0.7137283",
"0.71231186",
"0.71169615",
"0.7099872",
"0.7098687",
"0.7082505",
"0.707757",
"0.7012719",
"0.69911045",
"0.6984513",
"0.6962847",
"0.6948061",
"0.6943157",
"0.69069195",
"0.69044566",
"0.6895538",
"0.68858206",
"0.6872938",
"0.68662786",
"0.68484753",
"0.68484753",
"0.683706",
"0.683706",
"0.6814196",
"0.6807738"
] | 0.7162161 | 72 |
Sets the language The coachmark language. | public function setLanguage($val)
{
$this->_propDict["language"] = $val;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function settingLanguage() {}",
"protected function setLanguage() {\r\n\t\t$this->language = $GLOBALS['TSFE']->config['config']['language'];\r\n\t}",
"public function setLanguage($language);",
"public function setLanguage($l)\n {\n $this->setOption('language',$l);\n }",
"public function setLanguage(string $lang);",
"public function setLanguage($language) {\n if (isset($language)) {\n $this->_language = $language;\n } else {\n $this->_language = '';\n }\n }",
"public function SetLanguage($language)\n {\n $this->language = $language;\n }",
"public function setLanguage($language)\n {\n $this->language = $language;\n }",
"public function setLanguage($code)\n {\n $this->lang = $code;\n }",
"private function setLanguage()\n\t{\n\t\tif (isset($_GET['language']))\n\t\t\t$id_lang = (int)($_GET['language'])>0 ? $_GET['language'] : 0;\n\t\tif (!isset($id_lang))\n\t\t\t$id_lang = ($this->getIdByHAL());\n\t\t$this->lang = $this->xml_file->lang[(int)($id_lang)];\n\t}",
"public function setLanguage($language)\n {\n $this->language = $language;\n $this->load();\n }",
"public function setLanguage($language) {\n if ($language) {\n $this->language = $language;\n }\n }",
"private function setLanguage() {\n//\t\tYii::app()->language = @Yii::app()->user->getState('lang');\n\t}",
"public function setBackOfficeLanguage($language);",
"public static function setLanguage($language) {\n $settings = self::getSettings();\n \n $settings->language = $language;\n $settings->save();\n }",
"static public function setLanguage($new_lang) {\n\t\tself::$language = ($new_lang == 'de' ? 'de' : 'us');\n\t}",
"public static function set_language($language) {\n\t\tsetcookie(self::$cookie_name, $language, time() + (86400 * 30), \"/\"); // 30 days\n\t}",
"function set_language($locale) {\n\t\t\t$this->i18n_locale = $locale;\n\t\t}",
"public function setLanguage($i) {\n\t\t$this->current_language = $i;\n\t}",
"public static function setLang($lang) \n\t{\n\t\tacPhpCas::setReporting();\n\t\tphpCAS::setLang($lang);\t\t\n\t}",
"private function set_CI_language()\n\t{\n\t\t$this->CI->config->set_item('language', $this->get_language());\n\t}",
"protected function _setLanguage() {\n\t// Get the default user language\n\t$userLanguage = Configure::read('User.defaultLanguage');\n\n\t// Use cookie, session, or params\n\tif ($this->Cookie->read('User.language')) {\n\t $userLanguage = $this->Cookie->read('User.language');\n\t}\n\tif ($this->Session->check('User.language')) {\n\t $userLanguage = $this->Session->read('User.language');\n\t}\n\tif (isset($this->params['language'])) {\n\t $userLanguage = $this->params['language'];\n\t}\n\n\t// Update the session\n\t$this->Session->write('User.language', $userLanguage);\n\t// Update the cookie if changed\n\tif ($this->Cookie->read('User.language') != $userLanguage) {\n\t $this->Cookie->write('User.language', $userLanguage, false, '20 days');\n\t}\n\n\t// Update the global used by CakePHP - don't use a different name!!!\n\tConfigure::write('Config.language', $userLanguage);\n }",
"public function setYiiLang(){\r\n $get_lang = Yii::app()->getRequest()->getParam(Yii::app()->urlManager->languageParam);//check if we have lang in url\r\n if (!in_array($get_lang,array_keys(Yii::app()->params['translatedLanguages'])) &&\r\n isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {\r\n $langList = Util::sortByPriority($_SERVER['HTTP_ACCEPT_LANGUAGE']);\r\n foreach ($langList as $lang => $quality) {\r\n foreach (Defaults::$supportedLanguages as $supported) {\r\n if (strcasecmp($supported, $lang) == 0) {\r\n Yii::app()->language = $supported;\r\n break 2;\r\n }\r\n }\r\n }\r\n }\r\n }",
"public function setLocale($language)\n\t{\n\t\t// We'll want to reconsider the below statement.\n\t\t// We'll want to manually add all languages so we can verify no husky stuff is going on.\n\t\tswitch ($language)\n\t\t{\n\t\t\tdefault:\n\t\t\t\t$locale = 'en_EN';\n\t\t\t\tbreak;\n\t\t\tcase 'English':\n\t\t\t\t$locale = 'en_EN';\n\t\t\t\tbreak;\n\t\t\tcase 'Danish':\n\t\t\t\t$locale = 'da_DK';\n\t\t\t\tbreak;\n\t\t\tcase 'Dutch':\n\t\t\t\t$locale = 'nl_NL';\n\t\t\t\tbreak;\n\t\t}\n\n\t\tputenv('LC_ALL=' . $locale);\n\t\tsetlocale(LC_ALL, $locale);\n\t\tbindtextdomain('messages', './locale');\n\t\ttextdomain('messages');\n\t}",
"public function language(string $language);",
"public function setLanguage(string $strLanguage) : void\r\n {\r\n $this->strLanguage = strtolower($strLanguage);\r\n }",
"public static function en(){\n setcookie('language', 'en', time()+60);\n }",
"function setLang($lang)\n {\n $this->_lang = $lang;\n }",
"public function setLanguage(string $lang)\n {\n $lang=substr($lang, 0, 3);\n\n // Verify if the file with translations exists\n $fname = $this->getFolderAppRoot().'languages/marknotes-'.$lang.'.json';\n\n // If no, use the default language\n $aeFiles = \\MarkNotes\\Files::getInstance();\n $this->language = ($aeFiles->exists($fname) ? $lang : DEFAULT_LANGUAGE);\n }",
"public function setLanguage(?LocaleInfo $value): void {\n $this->getBackingStore()->set('language', $value);\n }",
"public static function ja(){\n setcookie('language', 'ja', time()+60);\n }",
"public function actionChangeLanguage($language = null)\n {\n if($language != null)\n {\n UsniAdaptor::app()->cookieManager->setLanguageCookie($language);\n }\n }",
"public function setLanguages($lang) {\n\t\t$this->_language = $lang;\n\t}",
"public function setLang($lang)\n\t{\n\t\t$this->token->setLang($lang);\n\t}",
"public function setLanguage($value)\n {\n $value = strtolower($value);\n if (!isset($this->_models[$value])) {\n $this->_models[$value] = $this->loadTranslation($value);\n }\n $this->_language = $value;\n }",
"public function setLanguage($langcode = 'en', $lang_path = '')\n {\n }",
"public function set_language($language) {\n if (!is_string($language)) { return false; }\n $this->_language = $language;\n return true;\n }",
"public function language(){\n\t\tdefined('MGK_LANGUAGE')\n\t\t || define('MGK_LANGUAGE', $this->lang );\n\n\t\t$language = MGK_LANGUAGE;\t\n\t\t$file_lang = MGK_APPLICATION_DIRECTORY.'/_language/'.$language.'.json';\n\t\t$this->mgkLang = new Amaguk_lang( $language );\t\t\t\n\t\t$this->mgkLang->read_lang($file_lang);\t\t\t\n\t}",
"public function setLanguage($keyword)\n {\n $this->amOnUrl('https://link.springer.com/');\n $this->click('button.flyout-caption.cur');\n $this->click($keyword);\n $this->see('Providing researchers');\n }",
"public function setLang($lang) \n {\n $this->lang = $lang;\n }",
"function setHeadLanguage($var)\n\t{\n\t\t$this -> head_language = $var;\n\t}",
"private function setLang( $lang ) {\n\t\tif( in_array( $lang, $this->mLanguages ) ) {\n\t\t\t$this->mLang = $lang;\n\t\t\t\n\t\t\tsetcookie(\"soxred_lang\", $this->mLang, time()+60*60*24*365);\n\t\t}\n\t}",
"public function setLangue($langue){\n $this->niveauLangue++;\n $this->langue = $langue;\n }",
"public function setLangue($langue){\n $this->niveauLangue++;\n $this->langue = $langue;\n }",
"private function setLocale() {\n if ($this->_language == 'french')\n setlocale (LC_ALL, 'fr_FR.iso88591', 'fr_FR@euro', 'fr_FR', 'french', 'fra');\n else if ($this->_language == 'english')\n setlocale (LC_ALL, 'en_GB.iso88591', 'en_GB', 'english', 'eng');\n }",
"public function setLang($lang = 'en') {\n\t\t$this->_lang = $lang;\n\t}",
"function setLanguage() {\n\t\tif(isset($_GET['lang'])) {\n\t\t\t$language = $this->getLanguageFileName($_GET['lang']);\n\t\t} elseif(isset($_COOKIE['lang'])) {\n\t\t\t$language = $this->getLanguageFileName($_COOKIE['lang']);\n\t\t} else {\n\t\t\t$language = $this->getLanguageFileName('en-us');\n\t\t}\n\n\t\t//Sets the language cookie for 30 days\n\t\tsetcookie('lang', $language['meta'], time() + 60 * 60 * 24 * 30, '/');\n\n\t\treturn $language;\n\t}",
"public function setLanguage( string $language ) {\n $this->language = $language;\n return $this;\n }",
"public function setLanguage($value)\n {\n return $this->set('Language', $value);\n }",
"public function setLanguage($value)\n {\n return $this->set('Language', $value);\n }",
"public function setLanguage($value)\n {\n return $this->set('Language', $value);\n }",
"public function setLanguage($value)\n {\n return $this->set('Language', $value);\n }",
"public function setLanguage($value)\n {\n return $this->set('Language', $value);\n }",
"public function setLanguage($value)\n {\n return $this->set('Language', $value);\n }",
"public function setLanguage($value)\n {\n return $this->set('Language', $value);\n }",
"public function setLanguage($value)\n {\n return $this->set('Language', $value);\n }",
"public function setLanguage($value)\n {\n return $this->set('Language', $value);\n }",
"public function setLanguage($value)\n {\n return $this->set('Language', $value);\n }",
"public function setLanguage($value)\n {\n return $this->set('Language', $value);\n }",
"public function setLanguage($value)\n {\n return $this->set('Language', $value);\n }",
"public function setLanguage($value)\n {\n return $this->set('Language', $value);\n }",
"public function setLanguage(LanguageFieldInterface $language): void\n {\n $this->language = $language;\n }",
"protected static function setLanguageKeys() {}",
"public function setLang($lang)\n\t{\n\t\t$this->pageLanguage = $lang;\n\n\t\tif($this->pageInitialized)\n\t\t\t$this->setMetaTag('language', $this->pageLanguage);\n\t}",
"public function language($language)\n\t{\n\t\t$this->language = $language;\n\t\treturn $this;\n\t}",
"function setLanguage($inLanguage) {\n\t\tif ( $inLanguage !== $this->_Language ) {\n\t\t\t$this->_Language = $inLanguage;\n\t\t\t$this->setModified();\n\t\t}\n\t\treturn $this;\n\t}",
"public function setLanguage($code) {\n\t\tif(preg_match('/^[a-z]{2,3}\\_[A-Z]{2,3}$/',$code)){\n\t\t\t$this->languageCode = $code;\n\t\t} else {\n\t\t\t///TODO:APC: Why does this not throw an I18nException?\n\t\t\tthrow new \\nano\\core\\exception\\CoreException('Could not set language from code \\''.$code.'\\'');\n\t\t}\n\t}",
"public function setLanguage(Language $language)\n {\n $this->language = $language;\n $this->setName($this->language->getId());\n $this->get('translation')->setLabel($this->language->getName());\n }",
"public function chooseLanguage($lang) {\n\t\t$this->_lang = $this->_language[$lang];\n\t}",
"public function setLanguage($var)\n {\n GPBUtil::checkString($var, True);\n $this->language = $var;\n\n return $this;\n }",
"public function setLanguage($var)\n {\n GPBUtil::checkString($var, True);\n $this->language = $var;\n\n return $this;\n }",
"public function setLanguage(CData $language): bool\n {\n return API::ffi()->ts_parser_set_language(\n $this->data,\n API::ffi()->cast('TSLanguage *', $language),\n );\n }",
"public function lang($lang = 'fa'): void\n {\n $this->lang = ucfirst($lang);\n }",
"static function set($lang)\n\t{\n\t\tif (!self::valid($lang)) {\n\t\t\ttrigger_error(\"Invalid language id: '$lang'\");\n\t\t\treturn;\n\t\t}\n\t\tself::$lang = $lang;\n\t}",
"public function setUrlLanguage(LanguageInterface $language) {\n $this->storedLanguage = $language;\n }",
"public function __construct(/*# string */ $language = 'zh_CN')\n {\n $this->language = $language;\n }",
"public function setLanguage($strLanguage) {\n\t\t\t$this->strLanguage = $strLanguage;\n\t\t\t$this->loadReplacements();\n\t\t}",
"public function setDefaultLanguage($language) {\n $this->values->put('DefaultLanguage', $language);\n }",
"private function setLang(){\n\n\t\tif( isset($_GET['lang']) )\n\t\t\t$lang\t= $_GET['lang'];\n\n\t\telse{\n\t\t\t$sess_lang\t= session('lang');\n\t\t\t$lang\t\t= $sess_lang ? $sess_lang : App::getLocale();\n\t\t}\n\n\t\tsession(['lang'=>$lang]);\n\t\tApp::setLocale( $lang );\n\t}",
"public function changeBanglaLanguage(){\n Session::put('lang',[\n 'lang_name' => 'bangla'\n ]);\n return back();\n }",
"protected function setCountry(): void\n {\n Config::set('butik.country', 'DE');\n }",
"public function setLanguageAction($language='')\n {\n if ($language == 'en' || $language == 'ja') {\n $this->session->set('language', $language);\n $this->loadCustomTrans('index');\n }\n\n //Go to the last place\n $referer = $this->request->getHTTPReferer();\n if (strpos($referer, $this->request->getHttpHost().\"/\")!==false) {\n return $this->response->setHeader(\"Location\", $referer);\n } else {\n return $this->dispatcher->forward(array('controller' => 'index', 'action' => 'index'));\n }\n }",
"public function setLanguage(string $language): self\n\t{\n\t\t$this->selectedLanguage = $language;\n\n\t\t// We load the language automatically to avoid interferences between languages\n\t\t$this->loadLanguage($language);\n\n\t\treturn $this;\n\t}",
"public function setLanguage($lang){\n $this->language=$lang; \n return $this;\n }",
"public function setLangcode($langcode) {\n }",
"function setCountry($country) {\r\r\n\t\t$this->country = $country;\r\r\n\t}",
"public static function setLanguageName($paramLanguageName){\n getDatabase()->update(\"settings\",array(\n \"value\" => $paramLanguageName\n ), \"setting = 'website_lang'\");\n Cache::store('website_lang', $paramLanguageName);\n }",
"public function actionSetLocale($locale = 'en_us')\n {\n //Set cookies\n $localeCookie = new CHttpCookie('Locale', $locale);\n $localeCookie->expire = time() + 15 * 24 * 3600;\n Yii::app()->request->cookies['Locale'] = $localeCookie;\n\n //Set application langauge\n Yii::app()->setLanguage($locale);\n }",
"public function setCurrentLanguage($language)\n {\n if (empty(self::$supported_languages[$language])) {\n return false;\n }\n\n self::$current_language = $language;\n\n if (get_cookie(\"language_cookie_allowed\")) {\n set_cookie(self::$context . \"_language\", $language, time() + 365 * 24 * 3600, [\"samesite\" => \"strict\"]);\n }\n\n return true;\n }",
"function us_wpml_tr_switch_language ( $language_code = NULL ) {\r\n\t\tdo_action( 'wpml_switch_language', $language_code );\r\n\t}",
"public function language( string $languageName ) {\n $this->language = \"LANGUAGE $languageName\";\n return $this;\n }",
"function set_current_lang( $lang, $multilingual = null ) {\n\n\t\tif ( is_null( $multilingual ) ) {\n\t\t\t$multilingual = bf_get_current_lang();\n\t\t}\n\n\t\tif ( $multilingual == 'en' || $multilingual == 'none' || empty( $multilingual ) || $multilingual == 'all' ) {\n\t\t\t$multilingual = '';\n\t\t} else {\n\t\t\t$multilingual = '_' . $multilingual;\n\t\t}\n\n\t\tupdate_option( $this->option_panel_id . $multilingual . '-current', $lang );\n\n\t}",
"public function setSelectedLanguage($language)\n {\n if (in_array($language, $this->getPossibleLanguages()) === false) {\n throw new BaseException(TMS(BaseException::LANGUAGE_NOT_SUPPORTED, array('language' => $language)));\n }\n $this->selectedLanguage = $language;\n }",
"public function changeEnglishLanguage(){\n Session::forget('lang');\n return back();\n }",
"public function setlanguage($language)\n {\n $this->language = $language;\n\n return $this;\n }",
"public function setLocale()\n {\n $lang = Request::segment(2);\n\n try {\n $this->language->set($lang);\n return Redirect::back();\n } catch (Exception $e) {\n //show error\n }\n }",
"public static function changeLang($lang) {\n //App::setLocale($lang);\n app()->setLocale($lang);\n }",
"public function setFromLanguage(string $from_language): void;",
"protected function _setLanguage($language = null) {\n\t\t$catalog = false;\n\t\tif ($language !== null) {\n\t\t\t$catalog = $this->catalog($language);\n\t\t}\n\n\t\tif (!$catalog && $this->default) {\n\t\t\t$language = $this->default;\n\t\t\t$catalog = $this->catalog($language);\n\t\t}\n\n\t\tif ($catalog) {\n\t\t\t$this->language = $catalog['language'];\n\t\t\t$this->languagePath = array_unique(array(\n\t\t\t\t$catalog['locale'],\n\t\t\t\t$catalog['localeFallback']\n\t\t\t));\n\t\t\t$this->lang = $language;\n\t\t\t$this->locale = $catalog['locale'];\n\t\t\t$this->charset = $catalog['charset'];\n\t\t\t$this->direction = $catalog['direction'];\n\t\t} elseif ($language) {\n\t\t\t$this->lang = $language;\n\t\t\t$this->languagePath = array($language);\n\t\t}\n\n\t\tif ($this->default && $language !== $this->default) {\n\t\t\t$catalog = $this->catalog($this->default);\n\t\t\t$fallback = $catalog['localeFallback'];\n\t\t\tif (!in_array($fallback, $this->languagePath)) {\n\t\t\t\t$this->languagePath[] = $fallback;\n\t\t\t}\n\t\t}\n\n\t\tif (Configure::read('Config.language') === null) {\n\t\t\tConfigure::write('Config.language', $this->lang);\n\t\t}\n\n\t\tif ($language) {\n\t\t\treturn $language;\n\t\t}\n\t}",
"public function settingLocale() {}"
] | [
"0.7389163",
"0.7225499",
"0.7111213",
"0.6934207",
"0.6932444",
"0.6865729",
"0.6785691",
"0.6725763",
"0.67062086",
"0.670138",
"0.6684337",
"0.66328335",
"0.66307604",
"0.65548295",
"0.6498708",
"0.645191",
"0.64497316",
"0.642572",
"0.6355223",
"0.6339561",
"0.63312715",
"0.6221822",
"0.62063706",
"0.6202797",
"0.6202064",
"0.61904573",
"0.61854804",
"0.61847454",
"0.61757433",
"0.615573",
"0.61455333",
"0.6141749",
"0.6132933",
"0.6090108",
"0.60432684",
"0.6036278",
"0.6027003",
"0.5978592",
"0.597176",
"0.5957044",
"0.5943434",
"0.59376657",
"0.59283495",
"0.59283495",
"0.5922188",
"0.5915328",
"0.59052086",
"0.58981746",
"0.5892961",
"0.5892961",
"0.5892961",
"0.5890772",
"0.5890772",
"0.5890772",
"0.5890772",
"0.5889685",
"0.5889685",
"0.5889685",
"0.5889685",
"0.5889685",
"0.5889685",
"0.5889469",
"0.5869704",
"0.5863384",
"0.585013",
"0.5846758",
"0.5843542",
"0.58395463",
"0.58147293",
"0.5778248",
"0.5778248",
"0.5767717",
"0.57431155",
"0.5721922",
"0.5721217",
"0.5691334",
"0.56791157",
"0.5671438",
"0.5671099",
"0.56675935",
"0.5662494",
"0.5660434",
"0.5646893",
"0.5634627",
"0.5621252",
"0.56076956",
"0.5600565",
"0.56001204",
"0.55928564",
"0.55896735",
"0.55833215",
"0.557697",
"0.5574418",
"0.55743885",
"0.5564232",
"0.5557556",
"0.5549122",
"0.5539439",
"0.5525774",
"0.5517273"
] | 0.5956712 | 40 |
Gets the order The coachmark order. | public function getOrder()
{
if (array_key_exists("order", $this->_propDict)) {
return $this->_propDict["order"];
} else {
return null;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getOrder();",
"public function getOrder();",
"public function getOrder();",
"public function getOrder();",
"public function getOrder();",
"public function getOrder();",
"public function getOrder()\n {\n return $this->getQuote();\n }",
"public function getOrder()\n {\n return $this->__get(\"order\");\n }",
"public function getOrder()\n {\n return $this->order;\n }",
"public function getOrder()\n {\n return $this->order;\n }",
"public function getOrder()\n {\n return $this->order;\n }",
"public function getOrder()\n {\n return $this->order;\n }",
"public function getOrder()\n {\n return $this->order;\n }",
"public function getOrder()\n {\n return $this->order;\n }",
"public function getOrder()\n {\n return $this->order;\n }",
"public function getOrder()\n {\n return $this->order;\n }",
"public function getOrder()\n {\n return $this->order;\n }",
"public function getOrder()\n {\n return $this->order;\n }",
"public function getOrder()\n {\n return $this->order;\n }",
"public function getOrder() {\n return $this->order;\n }",
"public function getOrder ()\r\n\t{\r\n\t\treturn $this->order;\r\n\t}",
"public function getOrder()\n {\n return $this->_order;\n }",
"public function getOrder()\n {\n \treturn $this->_order;\n }",
"public function getOrder() \n\t{\n\t\treturn $this->order;\n\t}",
"public function getOrder()\n {\n return $this->coreRegistry->registry('current_order');\n }",
"public function getOrder()\n\t{\n\t\treturn $this->order;\n\t}",
"public function getOrder()\n\t\t{\n\t\t\treturn $this->order;\n\t\t}",
"public function getOrder()\n {\n // TODO: Implement getOrder() method.\n }",
"public function getOrder()\n {\n // TODO: Implement getOrder() method.\n }",
"public function getOrder()\n {\n // TODO: Implement getOrder() method.\n }",
"function getOrder(){\n\t\treturn $this->order;\n\t}",
"function getOrder();",
"public function getOrder()\n\t{\n\t\treturn $this->_order;\n\t}",
"public function getOrder()\n {\n return 1;// TODO: Implement getOrder() method.\n }",
"public function Order()\n {\n return $this->order;\n }",
"public function getOrder()\n {\n return $this->getItem()->getOrder();\n }",
"public function getOrder()\n {\n return $this->config->getOrder();\n }",
"public function order()\n {\n return $this->order;\n }",
"public function get_order() {\n return wc_get_order( $this->get_order_id() );\n }",
"function get_order() {\n return $this->get_mapped_property('order');\n }",
"public function getOrder()\n {\n return 990;\n }",
"public function getOrder()\n {\n // TODO: Implement getOrder() method.\n return 2;\n }",
"public function getOrder()\n {\n return 101;\n }",
"public function getOrder()\n {\n\n }",
"function getOrder()\n {\n return 1;\n }",
"function getOrder()\n {\n return 1;\n }",
"function getOrder()\n {\n return 1;\n }",
"function getOrder()\n {\n return 1;\n }",
"public function getOrder(): ?string\n {\n return $this->order;\n }",
"public function getOrder(): ?string\n {\n return $this->order;\n }",
"public function getOrder(): ?string\n {\n return $this->_order;\n }",
"public function getOrder()\n {\n return 3;\n }",
"public function getOrder()\n {\n return 3;\n }",
"public function getOrder()\n {\n return 3;\n }",
"public function getOrder()\n {\n return 3;\n }",
"public function getOrder()\n {\n return 3;\n }",
"public function getOrder()\n {\n return 3;\n }",
"public function getOrder()\n {\n return 3;\n }",
"public function getOrder()\n {\n return 3;\n }",
"public function getOrder()\n {\n return 3;\n }",
"function getOrder()\n{\n\n}",
"public function getOrder()\n {\n return 3;\n }",
"public function getOrder()\n {\n return 3;\n }",
"function getOrder()\n {\n return 3;\n }",
"public function getOrder()\n {\n return 1;\n }",
"public function getOrder()\n {\n return 1;\n }",
"public function getOrder()\n {\n return 1;\n }",
"public function getOrder()\n {\n return 1;\n }",
"public function getOrder()\n {\n return 1;\n }",
"public function getOrder()\n {\n return 1;\n }",
"public function getOrder()\n {\n return 1;\n }",
"public function getOrder()\n {\n return 1;\n }",
"public function getOrder()\n {\n return 1;\n }",
"public function getOrder()\n {\n return 1;\n }",
"public function getOrder()\n {\n return 1;\n }",
"public function getOrder()\n {\n return 1;\n }",
"public function getOrder()\n {\n return 1;\n }",
"public function getOrder()\n {\n return 1;\n }",
"public function getOrder()\n {\n return 1;\n }",
"public function getOrder()\n {\n return 1;\n }",
"public function getOrder()\n {\n return 1;\n }",
"public function getOrder()\n {\n return 1;\n }",
"public function getOrder()\n {\n return 1;\n }",
"public function getOrder()\n {\n return 1;\n }",
"public function getOrder()\n {\n return 1;\n }",
"public function getOrder()\n {\n return 1;\n }",
"public function getOrder()\n {\n return 1;\n }",
"public function getOrder()\n {\n return 1;\n }",
"public function getOrder()\n {\n return 1;\n }",
"public function getOrder()\n {\n return 1;\n }",
"public function getOrder()\n {\n return $this->getParameter('order');\n }",
"function getOrder()\n {\n return 0;\n }",
"function getOrder()\n {\n return 0;\n }",
"public static function getOrder(): int;",
"public function get_order() : int\n {\n return $this->order;\n }",
"public function getOrder()\n {\n //Note: order by parts are not \"named\" so it's all or nothing\n return $this->_get('_order');\n }",
"public static function getOrder() {\n\n $session = Yii::$app->session;\n\n if (isset($session['order'])) {\n return $session['order'];\n } else {\n return false;\n }\n }",
"public function getOrder()\n {\n return $this->orderFactory->create()->load($this->getReservedOrderId(), 'increment_id');\n }",
"public function getOrder()\n {\n return 100;\n }",
"public function getOrder()\n {\n return 100;\n }",
"function getOrder()\n {\n return 2;\n }"
] | [
"0.7879014",
"0.7879014",
"0.7879014",
"0.7879014",
"0.7879014",
"0.7879014",
"0.7803556",
"0.7802501",
"0.7745883",
"0.7745883",
"0.7745883",
"0.7745883",
"0.7745883",
"0.7745883",
"0.7745883",
"0.7745883",
"0.7745883",
"0.7745883",
"0.7745883",
"0.77070343",
"0.7689119",
"0.765713",
"0.76377547",
"0.7581866",
"0.7579398",
"0.7567253",
"0.7567151",
"0.75603956",
"0.75603956",
"0.75603956",
"0.75486857",
"0.7537913",
"0.74736965",
"0.74332684",
"0.7429288",
"0.741626",
"0.7390125",
"0.73373187",
"0.73289716",
"0.73212284",
"0.72166044",
"0.7208367",
"0.7198134",
"0.7158217",
"0.7140555",
"0.7140555",
"0.7140555",
"0.7140555",
"0.71317375",
"0.71317375",
"0.7117998",
"0.7085282",
"0.7085282",
"0.7085282",
"0.7085282",
"0.7085282",
"0.7085282",
"0.7085282",
"0.7085282",
"0.7085282",
"0.70848155",
"0.70806754",
"0.70806754",
"0.70627075",
"0.70380914",
"0.70380914",
"0.70380914",
"0.70380914",
"0.70380914",
"0.70380914",
"0.70380914",
"0.70380914",
"0.70380914",
"0.70380914",
"0.70380914",
"0.70380914",
"0.70380914",
"0.70380914",
"0.70380914",
"0.70380914",
"0.70380914",
"0.70380914",
"0.70380914",
"0.70380914",
"0.70380914",
"0.70380914",
"0.70380914",
"0.70380914",
"0.70380914",
"0.70380914",
"0.70348835",
"0.7021603",
"0.7021603",
"0.7018653",
"0.7015781",
"0.7010288",
"0.6995949",
"0.6975341",
"0.6973255",
"0.6973255",
"0.6971303"
] | 0.0 | -1 |
Sets the order The coachmark order. | public function setOrder($val)
{
$this->_propDict["order"] = $val;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function setOrder($order);",
"function setOrder($order){\n\t\t$this->order=$order;\n\t}",
"public function setOrder($order);",
"public function setOrder(string $order): void\n {\n $this->_order = $order;\n }",
"public function setOrder(?string $order): void\n {\n $this->order = $order;\n }",
"public function setOrder(?string $order): void\n {\n $this->order = $order;\n }",
"public function setOrder ($value)\r\n\t{\r\n\t\t$this->order = $value;\r\n\t}",
"public function setOrder($order)\n {\n //TODO: implement method, needed for drag and drop sortable\n }",
"function set_order($value) {\n $this->set_mapped_property('order', $value);\n }",
"function setOrder( $order )\n {\n if ( $this->State_ == \"Dirty\" )\n $this->get( $this->ID );\n\n if ( get_class( $order ) == \"ezorder\" )\n {\n $this->OrderID = $order->id();\n } \n }",
"public function setOrder($Order)\n {\n $this->__set(\"order\", $Order);\n }",
"public function setOrder($name)\n {\n $this->order = $name;\n }",
"public function setOrder($order = self::DIRECTION_DOWN)\n {\n $this->config->setOrder($order);\n }",
"abstract public function setOrder(OrderModel $order);",
"function setOrdering($ordering) {\n $this->ordering = $ordering;\n }",
"public function setOrder($order = Table::DIRECTION_DOWN)\n {\n $this->orderingColumnOrder = $order;\n }",
"public function setOrder(\\Magento\\Sales\\Model\\Order $order);",
"public function setOrder(BudgetEntry $entry, int $order): void\n {\n if ($order <= 0) {\n $order = 1;\n }\n\n $entries = BudgetEntry::where('id', '!=', $entry->id)\n ->where('budgetGroupId', $entry->budgetGroupId)\n ->orderBy('order', 'asc')\n ->get();\n\n $i = 1;\n foreach ($entries as $entry) {\n if ($i === $order) {\n $i++;\n }\n $entry->update(['order' => $i]);\n $i++;\n }\n\n if ($order > $entries->count()) {\n $order = $entries->count();\n }\n\n $entry->order = $order;\n }",
"public function setOrderAttribute($value)\n {\n $this->attributes['order'] = (GeneralFunctions::isSetAndIsNotNull($value)) ? $value : 0;\n }",
"public function setOrderAttribute($value)\n {\n $this->attributes['order'] = (GeneralFunctions::isSetAndIsNotNull($value)) ? $value : 0;\n }",
"public function setOrder(OrderInterface $order);",
"function setOrder($array)\n\t{\n\t\t$this->table->order = $array;\n\t}",
"protected function setOrder() {\r\n if( $this->sqlOrderBy ) {\r\n $this->sql .= ' ORDER BY ' . $this->sqlOrderBy;\r\n }\r\n }",
"public function setOrder($order)\n {\n $this->_order = $order;\n return $this;\n }",
"public function setOrder($order) \n\t{\n\t\t$this->order = $order;\n\t\treturn $this;\n\t}",
"public function __construct($order)\n {\n $this->order = $order;\n }",
"public function __construct($order)\n {\n $this->order = $order;\n }",
"public function __construct($order)\n {\n $this->order = $order;\n }",
"public function __construct($order)\n {\n $this->order = $order;\n }",
"public function __construct($order)\n {\n $this->order = $order;\n }",
"public function __construct($order)\n {\n $this->order = $order;\n }",
"public function __construct($order)\n {\n $this->order = $order;\n }",
"public function __construct($order)\n {\n $this->order = $order;\n }",
"public function setOrder($value)\n {\n return $this->set('Order', $value);\n }",
"public function setOrder(array $order)\n {\n $this->order = $order;\n return $this;\n }",
"private function SetOrderData()\n\t\t{\n\t\t\t// doesn't factor in cookies stored by Interspire Shopping Cart, so we have to pass back the\n\t\t\t// order token manually from those payment providers. We do this by taking the\n\t\t\t// cart ID passed back from the provider which stores the order's unique token.\n\t\t\tif(isset($_COOKIE['SHOP_ORDER_TOKEN'])) {\n\t\t\t\t$this->orderToken = $_COOKIE['SHOP_ORDER_TOKEN'];\n\t\t\t}\n\t\t\telse if(isset($_REQUEST['provider'])) {\n\t\t\t\tGetModuleById('checkout', $this->paymentProvider, $_REQUEST['provider']);\n\n\t\t\t\tif(in_array(\"GetOrderToken\", get_class_methods($this->paymentProvider))) {\n\t\t\t\t\t$this->orderToken = $this->paymentProvider->GetOrderToken();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tob_end_clean();\n\t\t\t\t\theader(sprintf(\"Location:%s\", $GLOBALS['ShopPath']));\n\t\t\t\t\tdie();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Load the pending orders from the database\n\t\t\t$this->pendingData = LoadPendingOrdersByToken($this->orderToken, true);\n\t\t\tif(!$this->orderToken || $this->pendingData === false) {\n\t\t\t\t$this->BadOrder();\n\t\t\t\texit;\n\t\t\t}\n\n\t\t\tif($this->paymentProvider === null) {\n\t\t\t\tGetModuleById('checkout', $this->paymentProvider, $this->pendingData['paymentmodule']);\n\t\t\t}\n\n\t\t\tif($this->paymentProvider) {\n\t\t\t\t$this->paymentProvider->SetOrderData($this->pendingData);\n\t\t\t}\n\t\t}",
"public function setOrder($order)\n {\n $this->order = $order;\n return $this;\n }",
"public function testSetOrder() {\n\n $obj = new DataTablesRequest();\n\n $obj->setOrder([\"order\"]);\n $this->assertEquals([\"order\"], $obj->getOrder());\n }",
"public function order(string $order): self\n {\n $this->order[] = $order;\n return $this;\n }",
"public function setOrder(int $order = 1) : CNabuDataObject\n {\n if ($order === null) {\n throw new ENabuCoreException(\n ENabuCoreException::ERROR_NULL_VALUE_NOT_ALLOWED_IN,\n array(\"\\$order\")\n );\n }\n $this->setValue('nb_commerce_product_category_order', $order);\n \n return $this;\n }",
"public function __construct($order)\n {\n $this->order=$order;\n }",
"function SetOrder($aDepth) {\n\t$this->depth=$aDepth;\n }",
"public function setOrder($value)\n {\n $key = $this->determineOrderColumnName();\n $this->attributes[$key] = $value;\n }",
"public function order($strOrder) {\n\t\t\t$this->arOrder[] = $strOrder; \n\t\t}",
"public function setOrder(int $order)\n {\n $this->order = $order;\n\n return $this;\n }",
"public function setTokenOrder (OrderEvent $event)\n {\n $order = $event->getOrder();\n $token = $this->tokenGenerator->generateToken();\n $order->setToken($token);\n\n }",
"function SetOrdering()\n {\n GLOBAL $_REQUEST;\n\n $sfid = 'sf' . $this->GetID();\n $srid = 'sr' . $this->GetID();\n $this->sf = $_REQUEST[$sfid];\n $this->sr = $_REQUEST[$srid];\n\n if ($this->sf != '') {\n $this->selectSQL->orders[] = $this->sf . \" \" . $this->sr;\n\n if ($this->sr == \"desc\") {\n $this->sr = \"asc\";\n $this->az = \"za\";\n } else {\n $this->sr = \"desc\"; //!< this is for the future \n $this->az = \"az\";\n } \n } else {\n $this->az = '';\n $this->sr = '';\n } \n }",
"function ccategories_order()\n\t{\n\t\tlusers_require(\"categories/order\");\n\n\t\t$post_data = linput_post();\n\t\t$order = $post_data[\"order\"];\n\n\t\t$order = split(\"\\|\", $order);\n\n\t\tfor ($i = 0; $i < count($order); $i++)\n\t\t{\n\t\t\tlcrud_update(lconf_get(\"lang\") . \"_categories\", array(\"id\" => $order[$i]), array(\"orderid\" => $i));\n\t\t}\n\n\t\tlcache_delete_all();\n\t}",
"public function testUpdateOrder()\n {\n }",
"public function setOrder() {\n\t\tif ($_POST) {\n\t\t\t$this->mfaq->setFaqsOrder ( $_POST [\"faq\"] );\n\t\t\t$this->session->set_userdata ( array (\n\t\t\t\t\t\"msg\" => \"1\" \n\t\t\t) );\n\t\t\t$this->mfunctions->actionReport ( \"faq\", \"set_order\" );\n\t\t\tredirect ( base_url () . \"admin/faq\", \"refresh\" );\n\t\t}\n\t}",
"public function setOrder(\\Magento\\Sales\\Model\\Order $order)\n {\n return $this->setData(self::ORDER_ID, $order->getId());\n }",
"public function setOrder($order = null)\n\t{\n\t\tif (is_string($order))\n\t\t{\n\t\t\t$temp = (int)$order;\n\t\t\tif ($temp < 0 || $temp > 0 || $order == '0')\n\t\t\t{\n\t\t\t\t$order = $temp;\n\t\t\t}\n\t\t}\n\n\t\tif (null !== $order && !is_int($order))\n\t\t{\n\t\t\trequire_once 'Zend/Navigation/Exception.php';\n\t\t\tthrow new Zend_Navigation_Exception(\n\t\t\t\t'Invalid argument: $order must be an integer or null, ' .\n\t\t\t\t'or a string that casts to an integer');\n\t\t}\n\n\t\t$this->_order = $order;\n\n\t\treturn $this;\n\t}",
"public function setOrder($orderAttributes)\n {\n $this->email = $orderAttributes['email'];\n $this->orderId = $orderAttributes['orderId'];\n }",
"public function setOrder($order)\n {\n $this->order = $order;\n\n return $this;\n }",
"public function setOrder($order)\n {\n $this->order = $order;\n\n return $this;\n }",
"public function order();",
"public function setCustomFields ($order) {\n \n }",
"public function setOrder($value)\n {\n return $this->setParameter('order', $value);\n }",
"public function setOrder($ids);",
"public function setOrder($order = self::ORDER_DESC)\n {\n $this->data['order'] = $order;\n return $this;\n }",
"function mORDER(){\n try {\n $_type = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$ORDER;\n $_channel = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$DEFAULT_TOKEN_CHANNEL;\n // Tokenizer11.g:161:3: ( 'order' ) \n // Tokenizer11.g:162:3: 'order' \n {\n $this->matchString(\"order\"); \n\n\n }\n\n $this->state->type = $_type;\n $this->state->channel = $_channel;\n }\n catch(Exception $e){\n throw $e;\n }\n }",
"protected function setOrderAsc(): self\r\n {\r\n $this->getBread()->setOrderAsc();\r\n return $this;\r\n }",
"public function setOrderField($x) { $this->orderField = $x; }",
"public function setTabOrder($tabOrder) {}",
"public function setOrder(&$var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::MESSAGE, \\Google\\Datastore\\V1beta3\\PropertyOrder::class);\n $this->order = $arr;\n }",
"function getOrder(){\n\t\treturn $this->order;\n\t}",
"private function setMenuOrder() {\n $this->product->set_menu_order($this->wcData->getMenuOrder());\n }",
"public function setOrder($order, $direction)\n {\n return $this->setParam(\"order\", array($order => $direction));\n }",
"function SetUpSortOrder() {\r\n\t\tglobal $rekeningju;\r\n\r\n\t\t// Check for \"order\" parameter\r\n\t\tif (@$_GET[\"order\"] <> \"\") {\r\n\t\t\t$rekeningju->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\r\n\t\t\t$rekeningju->CurrentOrderType = @$_GET[\"ordertype\"];\r\n\t\t\t$rekeningju->setStartRecordNumber(1); // Reset start position\r\n\t\t}\r\n\t}",
"public function setSortOrder($order)\n {\n if ($order == 4) {\n session(['membershipStatusSortOrder' => 'updated_at']);\n } elseif ($order == 3) {\n session(['membershipStatusSortOrder' => 'description']);\n } else {\n session(['membershipStatusSortOrder' => 'id']);\n }\n return redirect('maintenance/membershipstatus');\n }",
"function getOrder()\n {\n return 3;\n }",
"protected static function on_change_order_state($order)\n {\n \n }",
"public function order()\n {\n return $this->order;\n }",
"public function setOrder(Order $order)\n {\n $this->order = $order;\n\n return $this;\n }",
"public function setOrderId(?string $orderId): void\n {\n $this->orderId['value'] = $orderId;\n }",
"public function order($order = null) {\n\t\tif ($order) {\n\t\t\t$this->_config['order'] = $order;\n\t\t\treturn $this;\n\t\t}\n\t\treturn $this->_config['order'];\n\t}",
"public function setSortOrder($sort_order)\r\n {\r\n $this->sort_order = $sort_order;\r\n }",
"public function setOrderBy($orderBy)\r\n\t{\r\n\t\t$this->orderBy = $orderBy;\r\n\t}",
"public function __construct($order=null)\n {\n $this->data = $order;\n }",
"public function set_order_field($order_field = NULL)\n\t{\n\t\t$this->_order_field = $order_field;\n\t}",
"public function addOrder($order){\n $this->collection[] = $order;\n }",
"public function setOrder($str) { $this->val .= ' ' . $str; }",
"public function setOrder($orderBy)\n {\n return $this->setOrderBy($orderBy);\n }",
"public function setOrderBy(array $orderBy);",
"public function setOrder($order)\n {\n if ($order != null and !empty($order)) {\n $this->order = $order;\n $this->shippingData = $this->getShippingData();\n } else {\n $msg = \"[PagSeguroModuleException] Message: Parâmetro Inválido para o método setOrder().\";\n throw new Exception(Mage::helper('pagseguro')->__($msg));\n }\n }",
"public function getOrder()\n {\n return 3;\n }",
"public function getOrder()\n {\n return 3;\n }",
"public function getOrder()\n {\n return 3;\n }",
"public function getOrder()\n {\n return 3;\n }",
"public function getOrder()\n {\n return 3;\n }",
"public function getOrder()\n {\n return 3;\n }",
"public function getOrder()\n {\n return 3;\n }",
"public function getOrder()\n {\n return 3;\n }",
"public function getOrder()\n {\n return 3;\n }",
"public function getOrder()\n {\n return 3;\n }",
"public function getOrder()\n {\n return 3;\n }",
"public function testSetOrderr()\n {\n $game = new DiceGame(4, 1);\n $this->assertInstanceOf(\"\\Ida\\Dice\\DiceGame\", $game);\n\n $notSet = $game->hasOrder();\n $game->setOrder();\n $set = $game->hasOrder();\n\n $this->assertNotEquals($notSet, $set);\n }",
"public function testSetOrderPlayer()\n {\n $game = new DiceGame(4, 1);\n $this->assertInstanceOf(\"\\Ida\\Dice\\DiceGame\", $game);\n\n $game->setOrder();\n $order = $game->getOrder();\n $firstPlayer = $game->getPlayerTurn();\n\n $this->assertEquals($order[0], $firstPlayer);\n }",
"public function getOrder()\n {\n return $this->order;\n }"
] | [
"0.78249323",
"0.7655479",
"0.7575065",
"0.7457658",
"0.738177",
"0.738177",
"0.7149565",
"0.6964631",
"0.68200505",
"0.6807214",
"0.67889076",
"0.67025256",
"0.66972053",
"0.6641806",
"0.66116184",
"0.65898466",
"0.65705967",
"0.6373387",
"0.6371623",
"0.6371623",
"0.6323406",
"0.630621",
"0.6234573",
"0.61953413",
"0.61653143",
"0.6155833",
"0.6155833",
"0.6155833",
"0.6155833",
"0.6155833",
"0.6155833",
"0.6155833",
"0.6155833",
"0.61327547",
"0.61045945",
"0.60840875",
"0.60683477",
"0.6067579",
"0.606309",
"0.6036146",
"0.602518",
"0.60025567",
"0.5952921",
"0.5945674",
"0.593898",
"0.5938681",
"0.5908937",
"0.5906013",
"0.5894009",
"0.58699363",
"0.5860245",
"0.58534575",
"0.5850752",
"0.5848417",
"0.5848417",
"0.58386534",
"0.5832675",
"0.5820494",
"0.5799155",
"0.5775176",
"0.5757688",
"0.5755338",
"0.5717168",
"0.57002074",
"0.56895846",
"0.56882423",
"0.56770486",
"0.56517285",
"0.56512725",
"0.5650118",
"0.56403613",
"0.5617542",
"0.56119686",
"0.5605875",
"0.5590154",
"0.5587542",
"0.55832285",
"0.5580526",
"0.5578939",
"0.5576618",
"0.5572449",
"0.556968",
"0.55553216",
"0.5550134",
"0.5535734",
"0.553521",
"0.553521",
"0.553039",
"0.553039",
"0.553039",
"0.553039",
"0.553039",
"0.553039",
"0.553039",
"0.553039",
"0.553039",
"0.5527582",
"0.5525859",
"0.5522203"
] | 0.5877699 | 50 |
this function named [module_name]_delete is called whenever a course content is deleted which includes when restoring a backup with override set, or when deleting an entire course. the function must delete all modulespecific material associated with this course. $course is the ID of the course to delete. | function cerify_delete($course) {
global $db;
/*
// delete hello_world course table entries
$sql = "DELETE FROM ".TABLE_PREFIX."certify, ".TABLE_PREFIX."certify_members, ".TABLE_PREFIX."certify_tests ";
$sql .= "USING ".TABLE_PREFIX."certify INNER JOIN ".TABLE_PREFIX."certify_members INNER JOIN ".TABLE_PREFIX."certify_tests ";
$sql .= "WHERE ".TABLE_PREFIX."certify.course = $course ";
$sql .= "AND ".TABLE_PREFIX."certify.certify_id = ".TABLE_PREFIX."certify_members.certify_id ";
$sql .= "AND ".TABLE_PREFIX."certify.certify_id = ".TABLE_PREFIX."certify_tests.certify_id";
mysql_query($sql, $db);
*/
// $sql = 'DELETE members FROM '.TABLE_PREFIX.'certify AS certify INNER JOIN '.TABLE_PREFIX.'certify_members AS members WHERE certify.course='.$course.' AND certify.certify_id=members.certify_id';
// mysql_query($sql, $db);
$sql = 'DELETE tests FROM '.TABLE_PREFIX.'certify AS certify INNER JOIN '.TABLE_PREFIX.'certify_tests AS tests WHERE certify.course='.$course.' AND certify.certify_id=tests.certify_id';
mysql_query($sql, $db);
$sql = 'DELETE FROM '.TABLE_PREFIX.'certify AS certify WHERE certify.course='.$course;
mysql_query($sql, $db);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function course_module_deleted($event) {\n global $DB;\n $courseid = $event->courseid;\n $coursecontext = context_course::instance($courseid);\n $cmid = $event->contextinstanceid;\n \n $users = $this->get_google_authenticated_users($courseid);\n $filerecs = $DB->get_records('repository_gdrive_references', array('cmid' => $cmid), '', 'id, reference');\n $deletecalls = array();\n\n foreach ($filerecs as $filerec) {\n foreach ($users as $user) {\n if (has_capability('moodle/course:view', $coursecontext, $user->userid)) {\n // Manager; do nothing (don't delete permission so they can restore if necessary).\n } elseif (is_enrolled($coursecontext, $user->userid, null, true) && has_capability('moodle/course:manageactivities', $coursecontext, $user->userid)) {\n // Teacher (enrolled) (active); do nothing (don't delete permission so they can restore if necessary).\n } else {\n // Student (enrolled) or unenrolled user; delete permission.\n try {\n $permissionid = $this->service->permissions->getIdForEmail($user->gmail);\n $permission = $this->service->permissions->get($filerec->reference, $permissionid->id);\n if ($permission->role != 'owner') {\n $call = new stdClass();\n $call->fileid = $filerec->reference;\n $call->permissionid = $permissionid->id;\n $deletecalls[] = $call;\n if (count($deletecalls) == 1000) {\n $this->batch_delete_permissions($deletecalls);\n $deletecalls = array();\n }\n }\n } catch (Exception $e) {\n debugging($e);\n }\n } \n }\n }\n\n // Call any remaining batch requests.\n if (count($deletecalls) > 0) {\n $this->batch_delete_permissions($deletecalls);\n }\n $DB->delete_records('repository_gdrive_references', array('cmid' => $cmid));\n }",
"public function test_delete() {\n global $DB;\n\n $startcount = $DB->count_records('course_modules');\n\n // Delete the course module.\n course_delete_module($this->quiz->cmid);\n\n // Now, run the course module deletion adhoc task.\n phpunit_util::run_all_adhoc_tasks();\n\n // Try purging.\n $recyclebin = new \\tool_recyclebin\\course_bin($this->course->id);\n foreach ($recyclebin->get_items() as $item) {\n $recyclebin->delete_item($item);\n }\n\n // Item was deleted, so no course module was restored.\n $this->assertEquals($startcount - 1, $DB->count_records('course_modules'));\n $this->assertEquals(0, count($recyclebin->get_items()));\n }",
"function local_mediacore_course_delete_event_handler($course) {\n global $DB;\n $DB->delete_records('config_plugins',\n array(\n 'plugin' => MEDIACORE_LOCAL_COURSELTI_SETTING_NAME,\n 'name' => (string)$course->id,\n )\n );\n return TRUE;\n}",
"public function test_pre_course_module_delete_hook() {\n global $DB;\n\n // Should have nothing in the recycle bin.\n $this->assertEquals(0, $DB->count_records('tool_recyclebin_course'));\n\n // Delete the course module.\n course_delete_module($this->quiz->cmid);\n\n // Now, run the course module deletion adhoc task.\n phpunit_util::run_all_adhoc_tasks();\n\n // Check the course module is now in the recycle bin.\n $this->assertEquals(1, $DB->count_records('tool_recyclebin_course'));\n\n // Try with the API.\n $recyclebin = new \\tool_recyclebin\\course_bin($this->course->id);\n $this->assertEquals(1, count($recyclebin->get_items()));\n }",
"private function course_content_deleted($event) {\n global $DB;\n $courseid = $event->courseid;\n $DB->delete_records('repository_gdrive_references', array('courseid' => $courseid));\n }",
"public function deletecourses ($id_course) {\n $sqlQuery = \" DELETE FROM courses \";\n $sqlQuery .= \" WHERE id_course= $id_course\";\n $result = $this -> getDbManager () -> executeQuery ( $sqlQuery );\n return $result ;\n }",
"function course_delete(){\n\n\t\t$id = $this->input->post('id');\n\t\t$field = $this->input->post('field');\n\t\t$table = $this->input->post('table');\n\t\n\t\tif($this->setting_model->deleteData($table, $field, $id)) {\n\t\t\t$this->setting_model->delete('course_module_subject','course_id',$id);\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"public function destroy(Course $course)\n\t{\n\t\tforeach ($course->modules as $module) {\n\t\t\t$module->contents()->delete();\n\t\t}\n\n\t\t$course->modules()->delete();\n\t\t$course->delete();\n\t\treturn response([\n\t\t\t'status' => 'success',\n\t\t\t'msg' => trans('messages.delete_msg', ['record' => trans('form.course')])\n\t\t]);\n\t}",
"public function destroy(course $course)\n {\n //\n }",
"public static function course_deleted(\\core\\event\\base $event) {\n global $DB;\n \n\t\t$courseid = $event->courseid; \n\t\t\t\n\t\t$sql = \t\"SELECT msg.id\n\t\t\t\t\t\tFROM {block_alerts_generator_msg} AS msg\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tWHERE msg.courseid = :course_id \";\n\t\t\t\t\t\t\t\n\t\t$params = array('course_id' => $courseid );\t\t\n\t\t$result = $DB ->get_recordset_sql($sql, $params);\n\t\t\n\t\tforeach ($result as $rs) {\t\t\t\t\t\n\t\t\t\t$DB->delete_records('block_alerts_generator_abs', array('messageid' => $rs->id ));\t\n\t\t\t\t$DB->delete_records('block_alerts_generator_abs_s', array('messageid' => $rs->id ));\t\n\t\t\t\t$DB->delete_records('block_alerts_generator_ans', array('messageid' => $rs->id ));\n\t\t\t\t$DB->delete_records('block_alerts_generator_ans_s', array('messageid' => $rs->id ));\n\t\t\t\t$DB->delete_records('block_alerts_generator_assig', array('messageid' => $rs->id ));\t\n\t\t\t\t$DB->delete_records('block_alerts_generator_dest', array('messageid' => $rs->id ));\n\t\t\t\t$DB->delete_records('block_alerts_generator_sch_a', array('messageid' => $rs->id ));\t\t\t\n\t\t}\t\t\t\t\n\t\t\t\n\t\t$DB->delete_records('block_alerts_generator_abs_u', array('courseid' => $courseid));\n\t\t$DB->delete_records('block_alerts_generator_abs_z', array('courseid' => $courseid));\n\t\t$DB->delete_records('block_alerts_generator_msg', array('courseid' => $courseid));\n\t\t\t\n }",
"public static function deleteCourse()\n {\n global $cont;\n $script = $_POST['script'];\n $courseId = $_POST['delete_id'];\n $request = $cont->prepare(\"SELECT FROM requests WHERE courses_id = ?\");\n $request->execute([$courseId]);\n if(!empty($request->fetchColumn()))\n {\n session_start();\n $_SESSION['error'] = \"Not Allowed\";\n header(\"location:../admin/pages/tables/Courses.php\");\n die(); \n }\n if(!empty($script))\n {\n session_start();\n $_SESSION['error'] = \"Not Allowed\";\n header(\"location:../admin/pages/tables/Courses.php\");\n die();\n }\n $courses = $cont->prepare(\"DELETE FROM courses WHERE id = ?\");\n $courses->execute([$courseId]);\n session_start();\n $_SESSION['message'] = \"course was deleted\";\n header(\"location:../admin/pages/tables/Courses.php\");\n \n \n \n }",
"public function delete_course()\n {\n $id = $this->input->get(\"id\");\n if($id==\"\"){\n echo \"there seems to be a problem\"; \n }else{\n $id = $this->security->xss_clean($id);\n $id = htmlspecialchars($id);\n $course_from_id = $this->admin_student_courses_mdl->course_from_id($id);\n $deleted_class = $this->admin_student_courses_mdl->delete_course($id);\n if($deleted_class){\n $this->admin_student_courses_mdl->delete_course_everywhere($course_from_id);\n echo \"content was successfully deleted\";\n }else{\n echo\"there seeems to be a problem\";\n } \n \n }\n }",
"public function destroy(Course $course)\n {\n $user = Auth::user();\n //check if user has the priviledge to delete course record.\n $isAuthorized = app('App\\Http\\Controllers\\UserPrivilegeController')->checkPrivileges($user->id, Config::get('settings.course_management'), 'delete_priv');\n if($isAuthorized){\n try {\n $course->delete();\n //record in activity log\n $activityLog = ActivityLog::create([\n 'user_id' => $user->id,\n 'activity' => 'Deleted the course ' . $course->course_desc . '.',\n 'time' => Carbon::now()\n ]);\n return response()->json(['message' => 'Course record successfully deleted.'], 200);\n } catch (Exception $e) {\n report($e);\n return false;\n }\n }else{\n //record in activity log\n $activityLog = ActivityLog::create([\n 'user_id' => $user->id,\n 'activity' => 'Attempted to delete the course ' . $course->course_desc . '.',\n 'time' => Carbon::now()\n ]);\n return response()->json([\n 'message' => 'You are not authorized to delete course records.'\n ],401); //401: Unauthorized\n }\n\n }",
"public function destroy(Course $course)\n {\n //\n }",
"public function destroy(Course $course)\n {\n //\n }",
"public function deleteAllCourseInfo($id_course = false) {\n\t\t\t// Initialize variables\n\t\t\t$return\t\t\t\t= false;\n\t\t\t$question_ids\t\t= false;\n\t\t\t// Database Connection\n\t\t\t$db\t\t\t\t\t= $GLOBALS['db'];\n\t\t\t// If Course ID was sent\n\t\t\tif ($id_course) {\n\t\t\t\t// Delete all related Questions\n\t\t\t\t$ids\t\t\t\t\t= $this->getQuestionsIdByCourseId($id_course);\n\t\t\t\tif ($ids) {\n\t\t\t\t\tforeach ($ids as $id) {\n\t\t\t\t\t\tif ($question_ids) {\n\t\t\t\t\t\t\t$question_ids\t.= ', '.$id['id_question'];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$question_ids\t= $id['id_question'];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$db->deleteRow('tb_question', 'id IN ('.$question_ids.')');\n\t\t\t\t}\n\t\t\t\t// Delete Course\n\t\t\t\t$db->deleteRow('tb_course', 'id = '.$id_course);\n\t\t\t\t// Prepare return\n\t\t\t\t$return\t\t= 'ok';\n\t\t\t}\n\t\t\treturn $return;\n\t\t}",
"public function deleteCourse($courseid){\n Logger::Log(\n 'starts DELETE DeleteCourse',\n LogLevel::DEBUG\n );\n\n $courseid = DBJson::mysql_real_escape_string( $courseid );\n\n foreach ( $this->_createCourse as $_link ){\n $result = Request::routeRequest(\n 'DELETE',\n '/course/course/'.$courseid,\n array(),\n '',\n $_link,\n 'course'\n );\n\n // checks the correctness of the query\n if ( $result['status'] >= 200 &&\n $result['status'] <= 299 ){\n\n $this->app->response->setStatus( 201 );\n if ( isset( $result['headers']['Content-Type'] ) )\n $this->app->response->headers->set(\n 'Content-Type',\n $result['headers']['Content-Type']\n );\n\n } else {\n Logger::Log(\n 'POST DeleteCourse failed',\n LogLevel::ERROR\n );\n $this->app->response->setStatus( isset( $result['status'] ) ? $result['status'] : 409 );\n $this->app->stop( );\n }\n }\n }",
"public function deletecourse($id){\n $course = $this->courseModel->getCourseById($id);\n $recomended = $this->courseModel->getrecomendedCourse($id);\n\n $data = [\n 'course' => $course,\n 'recomended' => $recomended\n ];\n \n // Check for POST\n if($_SERVER['REQUEST_METHOD'] == 'POST'){\n\n\n if($this->courseModel->deletecourse($id)){\n flash('delete_message', 'Course Deleted');\n redirect('admin/index');\n\n } else {\n die('Something went wrong');\n } \n\n } \n \n $this->view('courses/deletecourse', $data);\n\n \n }",
"public function delete(Module $module);",
"public static function delete_module_instance_data($cm) {\n global $DB;\n $where = 'courseid=? AND coursemoduleid=?';\n $wherearray = array($cm->course, $cm->id);\n\n $course = get_course($cm->course);\n $year = year_tables::get_year_for_tables($course);\n $occurstable = year_tables::get_occurs_table($year);\n $docstable = year_tables::get_docs_table($year);\n\n $DB->delete_records_select($occurstable,\n 'documentid IN (SELECT id FROM {' . $docstable . '} WHERE ' .\n $where . ')', $wherearray);\n $DB->delete_records_select($docstable, $where, $wherearray);\n\n // If this course is currently being transferred to the year-table\n // system, delete in both places in case this data was already\n // transferred.\n if (!$year && year_tables::currently_transferring_course($cm->course)) {\n $newyear = year_tables::get_year_for_course($course);\n $occurstable = year_tables::get_occurs_table($newyear);\n $docstable = year_tables::get_docs_table($newyear);\n $DB->delete_records_select($occurstable,\n 'documentid IN (SELECT id FROM {' . $docstable . '} WHERE ' .\n $where . ')', $wherearray);\n $DB->delete_records_select($docstable,\n $where, $wherearray);\n }\n }",
"public static function course_deleted_observer(\\core\\event\\course_deleted $event) {\n global $DB;\n $DB->delete_records('tool_kholland', ['courseid' => $event->objectid]);\n }",
"public function destroy(CourseContent $courseContent)\n {\n //\n\n\n\n\n foreach ($courseContent->lectures as $value) {\n $delete = (new HelperController)->deleteImage($value->file);\n $value->delete();\n }\n $latest = $courseContent['position'];\n $res = array();\n $id = Session::get('courseid') ?? $courseContent->course_id;\n $cc = CourseContent::where('course_id', $id)->count();\n for ($i = $latest + 1; $i <= $cc; $i++) {\n # code...\n CourseContent::firstWhere([['position', $i], ['course_id', $id]])->decrement('position', 1);\n }\n // $courseContent->delete();\n\n return back()->withStatus(__('Course Content deleted'));\n }",
"public function destroy(Course $course)\n {\n if(Session::get('accountID') === null){\n return view('authHN.extends.login');\n }else if(Account::where('id',Session::get('accountID'))->first()->level !== 1){\n return Redirect::to(route('home'));\n }else{\n if($course->joinAccount->count() !== 0){\n Session::put('message', 'Không thể xoá Khoá học đã có người đăng ký!');\n }\n else{\n $course->delete();\n Session::put('message', 'Xoá thành công!');\n }\n return Redirect::to(route('course.index'));\n } \n }",
"public function deleteAction()\n {\n if ( $this->getRequest()->getParam('id') > 0) {\n try {\n $coursedoc = Mage::getModel('bs_coursedoc/coursedoc');\n $coursedoc->setId($this->getRequest()->getParam('id'))->delete();\n Mage::getSingleton('adminhtml/session')->addSuccess(\n Mage::helper('bs_coursedoc')->__('Course Document was successfully deleted.')\n );\n $this->_redirect('*/*/');\n return;\n } catch (Mage_Core_Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError($e->getMessage());\n $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));\n } catch (Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_coursedoc')->__('There was an error deleting course doc.')\n );\n $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));\n Mage::logException($e);\n return;\n }\n }\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_coursedoc')->__('Could not find course doc to delete.')\n );\n $this->_redirect('*/*/');\n }",
"public function destroy(Course $course)\n {\n if($course->image)\n {\n $filename = $course->image;\n unlink('images/' . $filename);\n } \n $course->delete();\n return redirect('/admin/courses')->withStatus('Course successfully deleted');\n }",
"function dllc_grade_item_delete($dllc) {\n global $CFG;\n require_once($CFG->libdir.'/gradelib.php');\n\n return grade_update('mod/dllc', $dllc->course, 'mod', 'dllc',\n $dllc->id, 0, null, array('deleted' => 1));\n}",
"public function massDeleteAction()\n {\n $coursedocIds = $this->getRequest()->getParam('coursedoc');\n if (!is_array($coursedocIds)) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_coursedoc')->__('Please select course docs to delete.')\n );\n } else {\n try {\n foreach ($coursedocIds as $coursedocId) {\n $coursedoc = Mage::getModel('bs_coursedoc/coursedoc');\n $coursedoc->setId($coursedocId)->delete();\n }\n Mage::getSingleton('adminhtml/session')->addSuccess(\n Mage::helper('bs_coursedoc')->__('Total of %d course docs were successfully deleted.', count($coursedocIds))\n );\n } catch (Mage_Core_Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError($e->getMessage());\n } catch (Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_coursedoc')->__('There was an error deleting course docs.')\n );\n Mage::logException($e);\n }\n }\n $this->_redirect('*/*/index');\n }",
"function delete_course($id){\n\t\t\tprint_r($this->input->post());\n\t\t}",
"public function delete_course($id) {\n $del_query=\"DELETE FROM `courses` WHERE course_id='$id'\";\n $del_exe=mysqli_query($GLOBALS['con'],$del_query);\n if ($del_exe) {\n header('Location:..\\courses_page.php?msg=successfuly Deleted record');//redirecting to main page of courses\n }else {\n header('Location:..\\courses_page.php?msg=Error Deleting record');//redirecting to main page of courses\n }\n }",
"public function destroy($course)\n {\n $course = Course::find($course);\n // dd($course);\n $course->delete();\n return redirect('/profile/'.auth()->user()->id)->with('success','Course deleted successfully');\n }",
"public function destroy(Course $id)\n {\n $course = Course::all()->where('user_id', Auth::user()->id)->find($id);\n $modules = Module::all()->where('course_id', $id->id);\n\n foreach ($modules as $key => $module) {\n $module->delete();\n }\n\n $course->delete();\n return response()->json([ 'message' => 'Course deleted' ], 200);\n }",
"function deletecouse_subjects(){\n\n\t\t$course_Module_id = $this->input->post('id'); // this input post came on custom js\n\n\t\t$this->setting_model->delete('course_module_subject','module_id',$course_Module_id);\n\n\t\t//================= Activity Log Monitoring==========================//\n $activity_log_activity = \"One of course deleted\"; \n\n $activitylogs = array( \n 'activity_log_activity' =>$activity_log_activity, \n 'activity_date'=> date('Y-m-d h:i:s:a') ,\n 'user_id'=> $this->session->userdata('user_id')\n ); \n\n $this->setting_model->insert($activitylogs , 'activity_log');\n\n //==================== Activity Log Monitoring End=====================//\n\t}",
"public function delete() {\n\n // Does the course object have an ID?\n if ( is_null( $this->courseId ) ) trigger_error ( \"Course::delete(): Attempt to delete course object that does not have its ID property set.\", E_USER_ERROR );\n\n // Delete the Student\n $conn = new PDO( DB_DSN, DB_USERNAME, DB_PASSWORD );\n $st = $conn->prepare ( \"DELETE FROM course WHERE courseId = :courseId LIMIT 1\" );\n $st->bindValue( \":courseId\", $this->courseId, PDO::PARAM_INT );\n $st->execute();\n $conn = null;\n }",
"public static function delete_module($modules) {\n $context = get_context_instance(CONTEXT_SYSTEM);\n self::validate_context($context);\n require_capability('moodle/course:view', $context);\n $success = 1; \n foreach($modules as $module){\n \t$moduleid = $module[\"moduleid\"];\n \t$courseid = $module[\"courseid\"]; \n \t$result = glueserver_course_db::glueserver_delete_module($moduleid, $courseid);\n \tif ($result == 0){\n \t\t$success = $result;\n \t}\n }\n\t\treturn array ('success' => $success);\n }",
"public function deleteCourseMaterial(Request $request)\n\t{\n\t $route_params = $request->route()->parameters();\n\n\t Session::flash('message', FAILURE_TRY_AGAIN_MESSAGE);\n\t Session::flash('alert-class', 'alert-danger');\n\n $deleteCourse = courseMaterial::where('id', $route_params['uid'])->delete();\n if($deleteCourse)\n {\n Session::flash('message', 'Course Material Deleted Successfully'); \n Session::flash('alert-class', 'alert-success');\n }\n else\n {\n Session::flash('message', FAILURE_TRY_AGAIN_MESSAGE);\n Session::flash('alert-class', 'alert-danger');\n }\n\n\t return redirect()->route('admin-course-materials');\n\t}",
"function mnetadmin_rpc_delete_course($user, $shortname = null, $idnumber = null, $jsonrequired = true) {\n global $DB;\n\n debug_trace(\"VMOODLE : Starting Delete course\");\n debug_trace('RPC '.json_encode($user));\n\n if ($auth_response = invoke_local_user((array)$user)) {\n if ($jsonrequired) {\n return $auth_response;\n } else {\n return json_decode($auth_response);\n }\n }\n\n // Creating response.\n $response = new stdClass;\n $response->status = RPC_SUCCESS;\n\n if (!empty($shortname)) {\n $course = $DB->get_record('course', array('shortname' => $shortname));\n } else {\n if (!empty($idnumber)) {\n $course = $DB->get_record('course', array('shortname' => $shortname));\n }\n }\n\n if (empty($course)) {\n $response->status = RPC_FAILURE_RUN;\n $response->error = get_string('errornocourse', 'vmoodleadminset_courses');\n $response->errors[] = get_string('errornocourse', 'vmoodleadminset_courses');\n } else {\n delete_course($course->id, false);\n }\n\n debug_trace('RPC Bind : Sending response');\n\n // Returns response (success or failure).\n if ($jsonrequired) {\n return json_encode($response);\n } else {\n return $response;\n }\n}",
"public function destroy(Course $course, $id)\n {\n if(Auth::user()->role != 1){\n return redirect()->route('home');\n }\n $courseToDelete = $course->find($id);\n $deleteStatus = $courseToDelete->delete();\n if($deleteStatus){\n return redirect()->back()->with(\"success\",\"Course deleted successifully !!!\");\n }\n }",
"public function destroy($course)\n {\n $course = Course::query()->withoutGlobalScope('publish')\n ->where('slug', $course)->firstOrFail();\n\n $course->delete();\n\n return delete_response();\n }",
"public function destroy(Course $course)\n {\n //\n // $this->authorize('delete', Course::class);\n // $course->delete();\n // return redirect('/course');\n return response(['message'=>'Deleted']);\n }",
"public function actionDelete($id_skill, $id_course)\n\t{\n $model = CourseAndSkills::model()->findByAttributes(array('id_skill'=>$id_skill, 'id_course'=>$id_course));\n if($model) {\n $model->delete();\n $res['success'] = 1;\n } else {\n $res['success'] = 0;\n }\n echo CJSON::encode($res);\n\t}",
"public function deleteModuleRow($module_row)\n {\n //\n }",
"function delete_note($module_key,$space_key,$link_key,$delete_action) \r\n{\r\n\tglobal $CONN, $CONFIG;\r\n\t\r\n\tif ($delete_action=='all' || $delete_action=='last') {\r\n\r\n\t\t$sql = \"DELETE FROM {$CONFIG['DB_PREFIX']}notes WHERE module_key='$module_key'\";\r\n\t\t\r\n\t\t$CONN->Execute($sql);\t\t\r\n\t\t $rows_affected = $CONN->Affected_Rows();\r\n\r\n\t\t if ($rows_affected < '1') {\t\r\n\r\n\t\t\t $message = \"There was an problem deleting a $module_code link during a module link deletion module_key=$module_key\".$CONN->ErrorMsg();\r\n\t\t\temail_error($message);\r\n\t\t\treturn $message;\r\n\t\t\r\n\t\t} else { \r\n\t\r\n\t\t\treturn true;\r\n\t\t\t\t\t\t\r\n\t\t}\r\n\t\r\n\t} else {\t\r\n\t\r\n\t\treturn true;\r\n\t\t\r\n\t}\r\n\r\n}",
"function DeleteCourse($courseId, $deleteLatestVersionOnly = False)\r\n\t{\r\n\r\n if($deleteLatestVersionOnly === true || $deleteLatestVersionOnly === \"true\")\r\n {\r\n $versionResult = $this->courseApiClient->getCourseLastVersionByCourseId($courseId);\r\n $this->courseApiClient->deleteCourseByCourseIdByVersion($courseId, $versionResult->result);\r\n }\r\n else\r\n {\r\n $this->courseApiClient->deleteCourseByCourseId($courseId);\r\n }\r\n return '<?xml version=\"1.0\" encoding=\"utf-8\" ?>' . \"\\n\" . '<rsp stat=\"ok\"><success /></rsp>';\r\n }",
"public function delete() {\n global $CFG, $DB;\n require_once($CFG->libdir.'/gradelib.php');\n require_once($CFG->dirroot.'/calendar/lib.php');\n\n $DB->delete_records(\"languagelesson\", array(\"id\"=>$this->properties->id));;\n $DB->delete_records(\"languagelesson_pages\", array(\"lessonid\"=>$this->properties->id));\n $DB->delete_records(\"languagelesson_answers\", array(\"lessonid\"=>$this->properties->id));\n $DB->delete_records(\"languagelesson_attempts\", array(\"lessonid\"=>$this->properties->id));\n $DB->delete_records(\"languagelesson_grades\", array(\"lessonid\"=>$this->properties->id));\n $DB->delete_records(\"languagelesson_timer\", array(\"lessonid\"=>$this->properties->id));\n $DB->delete_records(\"languagelesson_branch\", array(\"lessonid\"=>$this->properties->id));\n $DB->delete_records(\"languagelesson_high_scores\", array(\"lessonid\"=>$this->properties->id));\n if ($events = $DB->get_records('event', array(\"modulename\"=>'lesson', \"instance\"=>$this->properties->id))) {\n foreach ($events as $event) {\n $event = calendar_event::load($event);\n $event->delete();\n }\n }\n\n grade_update('mod/languagelesson', $this->properties->course, 'mod', 'languagelesson', $this->properties->id, 0, NULL, array('deleted'=>1));\n return true;\n }",
"public static function course_deleted(core\\event\\course_deleted $event)\n {\n global $CFG;\n\n $request_data = array(\n 'action' => 'course_deleted',\n 'course_id' => $event->objectid,\n );\n\n $api_handler = api_handler_instance();\n if (isset($CFG->eb_connection_settings)) {\n $sites = unserialize($CFG->eb_connection_settings);\n $synch_conditions = unserialize($CFG->eb_synch_settings);\n\n foreach ($sites as $key => $value) {\n if (isset($synch_conditions[$value[\"wp_name\"]][\"course_deletion\"]) && $synch_conditions[$value[\"wp_name\"]][\"course_deletion\"] && $value['wp_token']) {\n // Adding Token for verification in WP from Moodle.\n $request_data['secret_key'] = $value['wp_token'];\n\n $api_handler->connect_to_wp_with_args($value[\"wp_url\"], $request_data);\n }\n }\n }\n }",
"public function drop(Course $course){\n $this->authorize('drop', $course);\n\n $registered_course = CourseUser::select('id')\n ->where('user_id', Auth::user()->id)\n ->where('course_id', $course->id);\n\n $registered_course->delete();\n\n return redirect('/coursemanager');\n }",
"public function destroy(Course $course)\n {\n if (Storage::exists($course->image)) {\n Storage::delete($course->image);\n }\n if ($course->delete()) {\n Toastr::success('Successfully Course Deleted', \"Success\");\n } else {\n Toastr::error('Something Went Wrong!', \"Error\");\n }\n return back();\n }",
"public function delete_index_for_course(int $oldcourseid) {\n $this->deletes[] = ['course', $oldcourseid];\n return true;\n }",
"function ccontent_delete($content)\n\t{\n\t\tlusers_require('content/delete');\n\n\t\t$cat = mcontent_get_cat($content);\n\t\tmcontent_delete($content);\n\t\tmcategories_delete($cat['id']);\n\n\t\tlcache_delete_all();\n\n\t\tluri_redirect('main/user/admin/content', l('Content successfully deleted.'));\n\t}",
"public function deleteModule($moduleComponentId) {\n\t\t$pageId=getPageIdFromModuleComponentId(\"article\",$moduleComponentId);\n\t\t$path=getPagePath($pageId);\n\t\tglobal $urlRequestRoot;\n\t\t$delurl = \"http://\".$_SERVER['HTTP_HOST'].$urlRequestRoot.\"/home\".$path;\n\t\t$query=\"SELECT link_id FROM `links` WHERE url='$delurl'\";\n\t\t\n\t\t$result=mysql_query($query);\n\t\tif(mysql_num_rows($result)==0) return true; //Nothing to delete \n\t\t$delids=\"\";\n\t\twhile($row=mysql_fetch_row($result))\n\t\t\t$delids.=$row[0].\",\";\n\t\t\n\t\t$delids=rtrim($delids,\",\");\n\t\t\n\t\t$query=\"DELETE FROM `links` WHERE url='$delurl'\";\n\t\t\n\t\tmysql_query($query);\n\t\tfor ($i=0;$i<=15; $i++) \n\t\t{\n\t\t\t$char = dechex($i);\n\t\t\t$query=\"DELETE FROM `link_keyword$char` WHERE link_id IN ($delids)\";\n\t\t\t\n\t\t\tmysql_query($query) or die(mysql_error().\" article.lib.php L:441\");\n\t\t\t\n\t\t}\n\t\treturn true;\n\t\t\n\n\t}",
"public function deleteModule($website, $module){\n //Before to delete it, delete all user permissions for this website and module\n $permissionTable = new TableGateway(\"company_user_permissions\", $this->tableGateway->getAdapter());\n $permissionTable = $permissionTable->delete(array(\"website_module_idWebsite\"=>$website, \"website_module_idModule\"=>$module));\n\n //If permissions delete are ok, delete module relationship\n $moduleTable = new TableGateway(\"company_website_has_system_module\", $this->tableGateway->getAdapter());\n $result = $moduleTable->delete(array(\"company_website_idWebsite\"=>$website, \"system_module_idModule\"=>$module));\n if($result){ \n return \"WEBSITE011\";\n }else{\n return \"WEBSITE012\";\n }\n }",
"function deleteuniversitycourse($id){\n\n\t\t$this->db->WHERE('uni_courseid',$id);\n\t\t$this->db->DELETE('tbl_university_course_eligibility');\n\n\t\t$this->db->WHERE('uni_courseid',$id);\n\t\t$this->db->DELETE('tbl_university_course_process');\n\n\t\t$this->db->WHERE('uni_courseid',$id);\n\t\t$this->db->DELETE('tbl_university_course_subjects');\n\n\t\t$this->db->WHERE('courseid',$id);\n\t\t$this->db->DELETE('tbl_course_intakes');\n\n\t\t$data = array();\n\t\t$Q = $this->db->QUERY('SELECT id FROM tbl_university_courses_fees_title WHERE uni_courseid=\"'.$id.'\"');\n\t\tif ($Q->num_rows() > 0)\n\t\t{\n\t\t\tforeach ($Q->result_array() as $row)\n\t\t\t{\n\t\t\t\tif($row['id']!=\"\" || $row['id']!=NULL)\n\t\t\t\t{\n\t\t\t\t\t$this->db->WHERE('feestitleid',$row['id']);\n\t\t\t\t\t$this->db->DELETE('tbl_university_course_fees');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$this->db->WHERE('uni_courseid',$id);\n\t\t$this->db->DELETE('tbl_university_courses_fees_title');\n\n\t\t$this->db->WHERE('id',$id);\n\t\t$this->db->DELETE('tbl_university_courses');\n\t}",
"public function destroy(Course $courseParticular)\n {\n $courseParticular->delete();\n return redirect()->route('courseParticular.index')->with('message', 'item has been deleted successfully.');\n }",
"function del_course($course_name){\n $sql_conn = mysqli_connect(SQL_SERVER, SQL_USER, SQL_PASSWD, DATABASE);\n if(!$sql_conn){\n return 1;\n }\n\n $query = \"DELETE FROM courses WHERE course_name=?\";\n $stmt = mysqli_prepare($sql_conn, $query);\n if(!$stmt){\n mysqli_close($sql_conn);\n return 1;\n }\n mysqli_stmt_bind_param($stmt, \"s\",$course_name);\n if(!mysqli_stmt_execute($stmt)){\n mysqli_stmt_close($stmt);\n mysqli_close($sql_conn);\n return 1;\n }\n\n mysqli_stmt_close($stmt);\n mysqli_close($sql_conn);\n return 0;\n}",
"private function course_restored($event) {\n global $DB;\n $courseid = $event->courseid;\n $course = $DB->get_record('course', array('id' => $courseid), 'visible');\n $coursecontext = context_course::instance($courseid);\n $siteadmins = $this->get_siteadmins();\n $users = $this->get_google_authenticated_users($courseid);\n $coursemodinfo = get_fast_modinfo($courseid, -1);\n $cms = $coursemodinfo->get_cms();\n $insertcalls = array();\n $deletecalls = array();\n foreach ($cms as $cm) {\n $cmid = $cm->id;\n $cmcontext = context_module::instance($cmid);\n $fileids = $this->get_fileids($cmid);\n if ($fileids) {\n foreach ($fileids as $fileid) {\n foreach ($users as $user) {\n if (has_capability('moodle/course:view', $coursecontext, $user->userid)) {\n // Manager; insert writer permission.\n $call = new stdClass();\n $call->fileid = $fileid;\n $call->gmail = $user->gmail;\n $call->role = 'writer';\n $insertcalls[] = $call;\n if (count($insertcalls) == 1000) {\n $this->batch_insert_permissions($insertcalls);\n $insertcalls = array();\n }\n } elseif (is_enrolled($coursecontext, $user->userid, null, true) && has_capability('moodle/course:manageactivities', $cmcontext, $user->userid)) {\n // Enrolled teacher; insert writer permission.\n $call = new stdClass();\n $call->fileid = $fileid;\n $call->gmail = $user->gmail;\n $call->role = 'writer';\n $insertcalls[] = $call;\n if (count($insertcalls) == 1000) {\n $this->batch_insert_permissions($insertcalls);\n $insertcalls = array();\n }\n } elseif (is_enrolled($coursecontext, $user->userid, null, true)) {\n // Enrolled student; continue checks for reader permission.\n if ($course->visible == 1) {\n // Course is visible, continue checks.\n if ($cm->visible == 1) {\n // Course module is visible, continue checks.\n rebuild_course_cache($courseid, true);\n $modinfo = get_fast_modinfo($courseid, $user->userid);\n $cminfo = $modinfo->get_cm($cmid);\n $sectionnumber = $this->get_cm_sectionnum($cmid);\n $secinfo = $modinfo->get_section_info($sectionnumber);\n if ($cminfo->uservisible && $secinfo->available) {\n // Course module is visible and accessible, section is accessible; insert reader permission.\n $call = new stdClass();\n $call->fileid = $fileid;\n $call->gmail = $user->gmail;\n $call->role = 'reader';\n $insertcalls[] = $call;\n if (count($insertcalls) == 1000) {\n $this->batch_insert_permissions($insertcalls);\n $insertcalls = array();\n }\n }\n // User cannot access course module or section, do nothing.\n }\n // Course module not visible, do nothing.\n }\n // Course not visible, do nothing.\n } else {\n // User is not enrolled; do nothing.\n }\n }\n\n $newdata = new stdClass();\n $newdata->courseid = $courseid;\n $newdata->cmid = $cmid;\n $newdata->reference = $fileid;\n $DB->insert_record('repository_gdrive_references', $newdata);\n \n // Insert writer permissions for site admins.\n foreach ($siteadmins as $siteadmin) {\n $call = new stdClass();\n $call->fileid = $fileid;\n $call->gmail = $siteadmin->gmail;\n $call->role = 'writer';\n $insertcalls[] = $call;\n if (count($insertcalls) == 1000) {\n $this->batch_insert_permissions($insertcalls);\n $insertcalls = array();\n }\n }\n }\n }\n\n // Call any remaining batch requests.\n if (count($insertcalls) > 0) {\n $this->batch_insert_permissions($insertcalls);\n }\n\n if (count($deletecalls) > 0) {\n $this->batch_delete_permissions($deletecalls);\n }\n }\n }",
"public static function delete($module, $id) {\n return self::deleteDb($module, $id) ;\n }",
"public function destroy(Course $course)\n {\n try {\n if ($course->delete())\n {\n notify()->success('course deleted successfully');\n return redirect()->route('courses.index');\n }\n else\n {\n notify()->warning('there is something wrong');\n return redirect()->back();\n }\n }\n catch (\\Exception $e)\n {\n notify()->error('there is something wrong. please, try again later');\n return redirect()->route('courses.index');\n }\n }",
"public function delete( $block_id ){\n\t\t\n\t\t$row\t\t= $this->getTable( 'block' );\n\t\t\t\n\t \tif( !$row->load( $block_id ) ){\n\t \t\n\t\t\t$this->setError( $this->_db->getErrorMsg() );\n\t\t\treturn false;\n\t\t\n\t\t}\n\t\t\n\t\t$type\t\t= $this->_getContentType( $row->content_block_type );\n\t\t\n\t\trequire_once JPATH_COMPONENT.'/content/'.$type->content_type_folder.'/'.$type->content_type_element;\t\t\n\t\t$class \t\t= 'ZbrochureContent'.$type->content_type_folder;\n\t\t\n\t\t$success\t= $class::deleteContent( $row->content_block_current_version );\n\t\t\n\t\t//if( $sucess ){\n\t\t\t\n\t\t\t$block\t\t= $this->getTable( 'block' );\t\n\t\t\t\n\t\t\tif( !$block->delete( $block_id ) ){\n\t\t\t\n\t\t\t\t$this->setError( JText::_( 'ERROR_DELETING_CONTENT_BLOCK' ) );\n\t\t\t\treturn false;\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\treturn true;\n\t\t\t\n\t\t//}\n\t\t\n\t\t//return false;\n\t\t\n\t}",
"function deleteCategoryMeta($cat_id) {\n\t\t$course_meta = new CourseMeta($cat_id);\n\t\t$course_meta->delete();\n\t}",
"function dialogue_delete_instance($id) {\n global $DB;\n\n if (! $dialogue = $DB->get_record('dialogue', array('id' => $id))) {\n return false;\n }\n if (! $cm = get_coursemodule_from_instance('dialogue', $dialogue->id)) {\n return false;\n }\n $entryids = $DB->get_records('dialogue_entries', array('dialogueid' => $dialogue->id), null, 'id');\n if ($entryids) {\n $entryids = array_keys($entryids);\n list($insql, $inparams) = $DB->get_in_or_equal($entryids);\n $DB->delete_records_select('dialogue_read', \"entryid $insql\", $inparams);\n }\n $DB->delete_records('dialogue_entries', array('dialogueid' => $dialogue->id));\n $DB->delete_records('dialogue_conversations', array('dialogueid' => $dialogue->id));\n $DB->delete_records('dialogue', array('id' => $dialogue->id));\n // now get rid of all files\n $context = get_context_instance(CONTEXT_MODULE, $cm->id);\n $fs = get_file_storage();\n $fs->delete_area_files($context->id);\n\n return true;\n}",
"public function deleteCourse($id, $tablename){\n if($tablename == \"users\"){\n $queryString = \"matric_no\";\n }\n else if($tablename == \"courses\"){\n $queryString = \"course_id\";\n }\n else if($tablename == \"staff\"){\n $queryString = \"staff_id\";\n }\n else if($tablename == \"subscribe\"){\n $queryString = \"subscriber_id\";\n }\n else if($tablename == \"replythread\"){\n $queryString = \"reply_id\";\n }\n\n $con = new data();\n $sql = \"DELETE FROM \" .$tablename. \" WHERE \".$queryString .\" =:id\";\n $statement = $con->prepare($sql);\n if($statement){\n $statement->execute(array(':id' => $id));\n if($statement->rowCount() == 1){\n echo \"<br><p style='color: green;'>\".$statement->rowCount().\" Record Deleted Successfully</p>\";\n }else{\n $error = $statement->errorInfo();\n echo \"<br><p style='color: red;'>Query failed with message: \" . $error[2].\"</p>\";\n }\n }\n }",
"public function deleteall($args)\r\n {\r\n // Security and argument check\r\n if (!SecurityUtil::checkPermission('EZComments::', '::', ACCESS_ADMIN)) {\r\n return LogUtil::registerPermissionError(ModUtil::url('EZComments', 'admin', 'main'));\r\n }\r\n\r\n if (!isset($args['module'])) {\r\n return false;\r\n }\r\n\r\n // get tables\r\n $tables = DBUtil::getTables();\r\n $column = $tables['EZComments_column'];\r\n // construct where clause and delete...\r\n $where = \"WHERE $column[modname] = '$args[module]'\";\r\n\r\n return DBUtil::deleteWhere('EZComments',$where);\r\n }",
"public function deleted(Module $module)\n {\n if ($module->images) {\n $this->deleteFiles($module);\n }\n }",
"public function delete() {\n\t\tif ($this->checkDependencies() == true ) {\n\t\t\t$sql = \"DELETE FROM \".$this->tablename.\" where \".$this->idcol.\" = \".$this->page->ctrl['record'];\n\t\t\t$this->dbc->exec($sql);\n\t\t}\n\t}",
"public function del_mycourses($id_courses, $id_students)\n\t{\n $data = array(\n 'id_students' => $id_students,\n 'id_courses'\t\t => $id_courses\n );\n $this->MyModel->deleteData2('students_courses', $data);\n \n\t\tredirect('SiropCont/mycourses');\n\t}",
"function cms_delete($id) {\n GLOBAL $db;\n// удаление данных о статье\n $db -> query(\"DELETE FROM content WHERE id='$id'\");\n $db -> query(\"DELETE FROM content WHERE pid = '$id'\");\n// удаление информации о статьях из \"связанных\" таблиц\n $db -> query(\"UPDATE items SET article=REPLACE(article,'|\".$id.\"|','|') WHERE article LIKE '%|\".$id.\"|%'\");\n $db -> query(\"UPDATE spec SET article=REPLACE(article,'|\".$id.\"|','|') WHERE article LIKE '%|\".$id.\"|%'\");\n\n}",
"function bookking_grade_item_delete($bookking) {\n global $CFG;\n require_once($CFG->libdir.'/gradelib.php');\n\n if (!isset($bookking->courseid)) {\n $bookking->courseid = $bookking->course;\n }\n\n return grade_update('mod/bookking', $bookking->courseid, 'mod', 'bookking', $bookking->id, 0, null, array('deleted' => 1));\n}",
"static public function ctrDeletePart(){\n\n\t\tif(isset($_GET[\"idPart\"])){\n\n\t\t\t$table =\"parts\";\n\t\t\t$data = $_GET[\"idPart\"];\n\n\t\t\tif($_GET[\"image\"] != \"\" && $_GET[\"image\"] != \"views/img/parts/default/anonymous.png\"){\n\n\t\t\t\tunlink($_GET[\"image\"]);\n\t\t\t\trmdir('views/img/parts/'.$_GET[\"code\"]);\n\n\t\t\t}\n\n\t\t\t$answer = PartsModel::mdlDeletePart($table, $data);\n\n\t\t\tif($answer == \"ok\"){\n\n\t\t\t\techo'<script>\n\n\t\t\t\tswal({\n\t\t\t\t\t type: \"success\",\n\t\t\t\t\t title: \"The Part has been successfully deleted\",\n\t\t\t\t\t showConfirmButton: true,\n\t\t\t\t\t confirmButtonText: \"Close\"\n\t\t\t\t\t }).then(function(result){\n\t\t\t\t\t\t\t\tif (result.value) {\n\n\t\t\t\t\t\t\t\twindow.location = \"parts\";\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t})\n\n\t\t\t\t</script>';\n\n\t\t\t}\t\t\n\t\t\n\t\t}\n\n\t}",
"public function delete()\n {\n auth_admin();\n $this->load->model(getAdminFolder() . '/module_model', 'Module_model');\n if ($this->input->post('id') != \"\" && ctype_digit($this->input->post('id')) && $this->input->post('id') > 0) {\n if (auth_access_validation(adm_sess_usergroupid(), $this->ctrl)) {\n\n $this->Module_model->DeleteModule($this->input->post('id'));\n\n #insert to log\n $log_last_user_id = $this->input->post('id');\n $log_id_user = adm_sess_userid();\n $log_id_group = adm_sess_usergroupid();\n $log_action = 'Delete ' . $this->title . ' ID : ' . $log_last_user_id;\n $log_desc = 'Delete ' . $this->title . ' ID : ' . $log_last_user_id . ';';\n $data_log = array(\n 'id_user' => $log_id_user,\n 'id_group' => $log_id_group,\n 'action' => $log_action,\n 'desc' => $log_desc,\n 'create_date' => date('Y-m-d H:i:s'),\n );\n insert_to_log($data_log);\n $this->session->set_flashdata('success_msg', $this->title . ' (s) has been deleted.');\n } else {\n $this->session->set_flashdata('error_msg', 'You can\\'t manage this content.<br/>');\n }\n } else {\n $this->session->set_flashdata('error_msg', 'Delete failed. Please try again.');\n }\n }",
"public function course()\n\t{ \n//echo \"<pre>\";print_r($_POST);die;\t\n\t\t$data=$_POST;\n\t\t//$data['action']='get_module';\n\t\t//$data['action']='delete_module';\n\t\t//$data['action']='course';\n\t\t//$data['action']='delete_lession';\n\t\t$action='';\n\t\tif(isset($data['action'])){\n\t\t\t$action=$data['action'];\n\t\t}\n\t\tswitch ($action) {\n\t\tcase 'course':\n\t\t\t$this->add_update_course($data);\n\t\t\tbreak;\n\t\tcase 'delete_module':\n\t\t\t$this->delete_course($data);\n\t\t\tbreak;\n\t\tcase 'delete_lession':\n\t\t\t$this->delete_lession($data);\n\t\t\tbreak;\n\t\tcase 'get_module':\n\t\t\t$this->getMOduleDetailsByModuleId($data);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t$result['msg']='Bad request!';\n\t\t\t$returnData['response']=$result;\n\t\t\tdie(json_encode($returnData));\n\t\t}\n\t\t\n\t}",
"function categories_delete()\n{\n // Get database information\n $dbconn = xarDBGetConn();\n $xartable = xarDBGetTables();\n\n // Delete categories table\n $query = \"DROP TABLE \".$xartable['categories'];\n $result= $dbconn->Execute($query);\n if (!$result) return;\n\n // Delete links table\n $query = \"DROP TABLE \".$xartable['categories_linkage'];\n $result= $dbconn->Execute($query);\n if (!$result) return;\n\n // Delete categories ext privileges table\n $query = \"DROP TABLE \".$xartable['categories_ext_privileges'];\n $result= $dbconn->Execute($query);\n if (!$result) return;\n\n // Delete module variables\n// xarModDelVar('categories', 'bold');\n xarModDelVar('categories', 'catsperpage');\n\n // Remove module hooks\n if (!xarModUnregisterHook('item', 'new', 'GUI',\n 'categories', 'admin', 'newhook')) return;\n if (!xarModUnregisterHook('item', 'create', 'API',\n 'categories', 'admin', 'createhook')) return;\n if (!xarModUnregisterHook('item', 'modify', 'GUI',\n 'categories', 'admin', 'modifyhook')) return;\n if (!xarModUnregisterHook('item', 'update', 'API',\n 'categories', 'admin', 'updatehook'))return;\n if (!xarModUnregisterHook('item', 'delete', 'API',\n 'categories', 'admin', 'deletehook'))return;\n if (!xarModUnregisterHook('module', 'modifyconfig', 'GUI',\n 'categories', 'admin', 'modifyconfighook'))return;\n if (!xarModUnregisterHook('module', 'updateconfig', 'API',\n 'categories', 'admin', 'updateconfighook'))return;\n if (!xarModUnregisterHook('module', 'remove', 'API',\n 'categories', 'admin', 'removehook')) return;\n\n // UnRegister blocks\n if (!xarModAPIFunc('blocks', 'admin', 'unregister_block_type',\n array('modName' => 'categories',\n 'blockType'=> 'navigation'))) return;\n\n xarTplUnregisterTag('categories-navigation');\n xarTplUnregisterTag('categories-filter');\n xarTplUnregisterTag('categories-catinfo');\n /**\n * Remove instances and masks\n */\n\n // Remove Masks and Instances\n xarRemoveMasks('categories');\n xarRemoveInstances('categories');\n\n // Deletion successful\n return true;\n}",
"function Delete($customWriteModuleId = null)\n\t{\n\t\tinclude_once ('RCCWP_CustomGroup.php');\n\t\tif (isset($customWriteModuleId))\n\t\t{\n\t\t\tglobal $wpdb;\n\t\t\t\n\t\t\t$customWriteModule = RCCWP_CustomWriteModule::Get($customWriteModuleId);\n\t\t\t$customWriteModuleName = $customWriteModule->name;\n\t\t \t\n \t\t\t$sql = sprintf(\n\t\t\t\t\"DELETE FROM \" . RC_CWP_TABLE_MODULES .\n\t\t\t\t\" WHERE id = %d\",\n\t\t\t\t$customWriteModuleId\n\t\t\t\t);\n\t\t\t$wpdb->query($sql);\n\n\t\t\t// Remove template folder\n\t\t\tif (!empty($customWriteModuleName)){\n\t\t\t\t$moduleTemplateFolder = dirname(__FILE__).\"/modules/\".$customWriteModuleName;\n\t\t\t\tRCCWP_CustomWriteModule::remove_dir($moduleTemplateFolder);\n\t\t\t}\n \n\t\t\t// Remove Layout data\n\t\t\tFlutterLayoutBlock::DeleteModule($customWriteModuleId);\n\t\t}\n\t\t\n\t}",
"public function deleteShareCourseMaterial() {\n $incomingFormData = $this->readHttpRequest();\n $formData = json_decode($incomingFormData);\n\n $deleteResult = $this->Coursematerial_model->deleteShareCourseMaterial($formData);\n\n if ($deleteResult == true) {\n $data['status'] = 'ok';\n } else {\n $data['status'] = 'fail';\n }\n// $shareCourseMaterialList = $this->index($shareCrsListFlag); // call department List\n// $data['shareCourseMaterialList'] = $shareCourseMaterialList;\n echo json_encode($data);\n }",
"public function destroy(Course $course)\n {\n $course->delete();\n return redirect('/home');\n }",
"function delete_by_id($id)\n\t{\n\t\t$delete = \"DELETE FROM courses WHERE id = $id\";\n\t\t// echo $query;\n\t\t$this->db->query($delete);\n\t}",
"public function delete (\n\t)\t\t\t\t\t// RETURNS <bool> TRUE on success, FALSE on failure.\n\t\n\t// ContentForm::delete($contentID);\n\t{\n\t\t// Prepare Values\n\t\t$contentID = $this->contentID;\n\t\t\n\t\t// Begin the deletion process\n\t\tDatabase::startTransaction();\n\t\t\n\t\t// Delete the main entry\n\t\tif(!Database::query(\"DELETE FROM content_entries WHERE id=? LIMIT 1\", array($contentID)))\n\t\t{\n\t\t\tAlert::error(\"Delete Error\", \"There was an error deleting the main content entry.\");\n\t\t\treturn Database::endTransaction(false);\n\t\t}\n\t\t\n\t\t// Delete the URL Data\n\t\tif(!Database::query(\"DELETE FROM content_by_url WHERE url_slug=? LIMIT 1\", array($this->contentData['url_slug'])))\n\t\t{\n\t\t\tAlert::error(\"Delete Error\", \"Deletion halted: the URL section could not be deleted properly.\");\n\t\t\treturn Database::endTransaction(false);\n\t\t}\n\t\t\n\t\t// Delete the User Data\n\t\tif(!Database::query(\"DELETE FROM content_by_user WHERE uni_id=? AND content_id=? LIMIT 1\", array($this->contentData['uni_id'], $contentID)))\n\t\t{\n\t\t\tAlert::error(\"Delete Error\", \"Deletion halted: the user data could not be deleted properly.\");\n\t\t\treturn Database::endTransaction(false);\n\t\t}\n\t\t\n\t\t// Delete the Content Queue\n\t\tif(!Database::query(\"DELETE FROM content_queue WHERE content_id=? LIMIT 1\", array($contentID)))\n\t\t{\n\t\t\tAlert::error(\"Delete Error\", \"Deletion halted: the content queue could not be deleted properly.\");\n\t\t\treturn Database::endTransaction(false);\n\t\t}\n\t\t\n\t\t// Loop through each module's purge functionality\n\t\tforeach($this->settings as $module => $bool)\n\t\t{\n\t\t\tif(method_exists(\"Module\" . $module, \"purge\"))\n\t\t\t{\n\t\t\t\tif(!$success = call_user_func(array(\"Module\" . $module, \"purge\"), $contentID))\n\t\t\t\t{\n\t\t\t\t\tAlert::error(\"Delete Error\", \"Deletion halted: the \" . $module . \" module could not be deleted properly.\");\n\t\t\t\t\treturn Database::endTransaction(false);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Delete the Content Tracking\n\t\tif(!Database::query(\"DELETE FROM content_tracking WHERE content_id=? LIMIT 1\", array($contentID)))\n\t\t{\n\t\t\tAlert::error(\"Delete Error\", \"Deletion halted: the content tracking could not be deleted properly.\");\n\t\t\treturn Database::endTransaction(false);\n\t\t}\n\t\t\n\t\t// Check which additional pieces need to be deleted\n\t\t$hashtag = DatabaseAdmin::tableExists(\"content_by_hashtag\");\n\t\t$comments = DatabaseAdmin::tableExists(\"content_comments\");\n\t\t\n\t\t// Delete the comments data\n\t\tif($comments)\n\t\t{\n\t\t\t// Retrieve the list of comments that need to be deleted\n\t\t\tif(!Database::query(\"DELETE c.* FROM content_comments c INNER JOIN content_comments_by_entry x ON c.id=x.comment_id WHERE x.content_id=?\", array($contentID)))\n\t\t\t{\n\t\t\t\tAlert::error(\"Delete Error\", \"Deletion halted: the comments could not be deleted properly.\");\n\t\t\t\treturn Database::endTransaction(false);\n\t\t\t}\n\t\t\t\n\t\t\tif(!Database::query(\"DELETE FROM content_comments_by_entry WHERE content_id=? LIMIT 1\", array($contentID)))\n\t\t\t{\n\t\t\t\tAlert::error(\"Delete Error\", \"Deletion halted: the comment tracker data could not be deleted properly.\");\n\t\t\t\treturn Database::endTransaction(false);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Get the list of content segments\n\t\t$results = Database::selectMultiple(\"SELECT type, block_id FROM content_block_segment WHERE content_id=? ORDER BY sort_order ASC\", array($contentID));\n\t\t\n\t\t$pass = true;\n\t\t\n\t\tforeach($results as $result)\n\t\t{\n\t\t\tif(method_exists(\"Module\" . $result['type'], \"purgeBlock\"))\n\t\t\t{\n\t\t\t\t$pass = call_user_func(array(\"Module\" . $result['type'], \"purgeBlock\"), (int) $result['block_id'], $contentID);\n\t\t\t}\n\t\t\t\n\t\t\tif(!$pass) { break; }\n\t\t}\n\t\t\n\t\tif(!$pass)\n\t\t{\n\t\t\tAlert::error(\"Delete Error\", \"Deletion halted: the content blocks could not be deleted properly.\");\n\t\t\treturn Database::endTransaction(false);\n\t\t}\n\t\t\n\t\t// Delete the Content Segments\n\t\tif(!Database::query(\"DELETE FROM content_block_segment WHERE content_id=?\", array($contentID)))\n\t\t{\n\t\t\tAlert::error(\"Delete Error\", \"Deletion halted: the content segments could not be deleted properly.\");\n\t\t\treturn Database::endTransaction(false);\n\t\t}\n\t\t\n\t\t// Delete the User Content Tracking\n\t\t// This is run last because it's a non-indexed value and may consume more time\n\t\tif(!Database::query(\"DELETE FROM content_tracking_users WHERE content_id=?\", array($contentID)))\n\t\t{\n\t\t\tAlert::error(\"Delete Error\", \"Deletion halted: the user votes and share tracks could not be deleted properly.\");\n\t\t\treturn Database::endTransaction(false);\n\t\t}\n\t\t\n\t\t// Run any additional custom deletions\n\t\tif(method_exists($this, \"customDelete\") and !$this->customDelete())\n\t\t{\n\t\t\tAlert::error(\"Delete Error\", \"Deletion halted: the custom deletion process failed.\");\n\t\t\treturn Database::endTransaction(false);\n\t\t}\n\t\t\n\t\t// Finalize the deletion process\n\t\tDatabase::endTransaction();\n\t\t\n\t\t// Delete the thumbnail for the content entry, if applicable\n\t\tif(isset($this->contentData['thumbnail']))\n\t\t{\n\t\t\t$urlData = URL::parse($this->contentData['thumbnail']);\n\t\t\t\n\t\t\tif(isset($urlData['path']) and File::exists($urlData['path']))\n\t\t\t{\n\t\t\t\tFile::delete(CONF_PATH . '/' . trim($urlData['path'], \"/\"));\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn true;\n\t}",
"public function destroy($course_id,$id)\n {\n Lessons::where('id',$id)->delete();\n return redirect()->back();\n }",
"public function delete()\n\t{\n\t\tif (!$this->auth($_SESSION['leveluser'], 'component', 'delete')) {\n\t\t\techo $this->pohtml->error();\n\t\t\texit;\n\t\t}\n\t\tif (!empty($_POST)) {\n\t\t\t$component = $this->podb->from('component')->where('id_component', $this->postring->valid($_POST['id'], 'sql'))->limit(1)->fetch();\n\t\t\t$componentType = $component['type'];\n\t\t\tif ($componentType == 'component') {\n\t\t\t\t$folderinstall = 'component';\n\t\t\t} else {\n\t\t\t\t$folderinstall = 'widget';\n\t\t\t}\n\t\t\tif (file_exists('../'.DIR_CON.'/'.$folderinstall.'/'.$component['component'].'/uninstall.php')) {\n\t\t\t\theader('location:admin.php?mod=component&act=uninstall&folder='.$component['component']);\n\t\t\t} else {\n\t\t\t\t$delete_dir = new PoDirectory();\n\t\t\t\tif ($component['active'] == 'Y') {\n\t\t\t\t\t$delete_folder = $delete_dir->deleteDir('../'.DIR_CON.'/'.$folderinstall.'/'.$component['component']);\n\t\t\t\t} else {\n\t\t\t\t\t$delete_folder = $delete_dir->deleteDir('../'.DIR_CON.'/'.$folderinstall.'/_'.$component['component']);\n\t\t\t\t}\n\t\t\t\tif ($delete_folder) {\n\t\t\t\t\t$query = $this->podb->deleteFrom('component')->where('id_component', $this->postring->valid($_POST['id'], 'sql'));\n\t\t\t\t\t$query->execute();\n\t\t\t\t\t$this->poflash->success($GLOBALS['_']['component_message_2'], 'admin.php?mod=component');\n\t\t\t\t} else {\n\t\t\t\t\t$this->poflash->error($GLOBALS['_']['component_message_4'], 'admin.php?mod=component');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public function destroy(Courses $course)\n {\n $course->delete();\n return redirect('/teacher/courses');\n }",
"public function deleteComment ($comment_id, $course_id) {\n\n\t\t$comment = Comment::find($comment_id);\n\t\tif(Auth::user()->id == $comment->user_id || Auth::user()->checkAdmin()){\n\t\t\t$comment->deleteComment();\n\t\t}\n\t\t$course = Course::find($course_id);\n\t\t$comments = $course->getComments($course_id); //returns an array with all the comments\n\t\t$session = new Session();\n\t\t$sessions = $session->getSessions($course_id);\n\t\t//returns an array with all the comments\n\t\treturn view('courses.course', ['comments' => $comments])->with('course', $course)->with('sessions', $sessions);\n\t\t\n\t}",
"function courseprefs_cleanup($file='cleanup.php', $semester=0, $logger=null, $web_report=false) {\n global $CFG;\n\n if (!$logger) {\n $logger = new Logger(true);\n }\n\n $clean_children = array(\"block_courseprefs_teamteach\",\n \"block_courseprefs_crosslist\",\n \"block_courseprefs_split\",\n \"block_courseprefs_logs\",\n \"block_courseprefs_teachers\",\n \"block_courseprefs_students\");\n\n if ($semester == 0) {\n $sql = \"SELECT * FROM {$CFG->prefix}block_courseprefs_semesters \n WHERE grades_due < \" . time();\n } else {\n $sql = \"SELECT * FROM {$CFG->prefix}block_courseprefs_semesters\n WHERE id = {$semester}\";\n }\n\n require_once($CFG->dirroot . '/blocks/courseprefs/classes/CoursePrefsHook.php');\n\n $hooks = CoursePrefsHook::allHooks($logger);\n\n // Parent semesters to remove\n $semesters = get_records_sql($sql);\n\n // If the result from query is not null, iterate\n if ($semesters) {\n\n foreach ($semesters as $semester) {\n $hooks->execute('cleanup', $semester->id);\n \n // For processing time's sake, we remove enroll here\n delete_records('block_courseprefs_enroll', 'semestersid', $semester->id);\n \n $str = \"Removing {$semester->campus} {$semester->name} {$semester->year}\" . \n \" and all associated data.\";\n $logger->log($str);\n if ($web_report) {\n mtrace($str);\n }\n }\n $semesterids = implode(',', array_keys($semesters));\n $sql = \"SELECT * FROM {$CFG->prefix}block_courseprefs_sections\n WHERE semestersid IN ({$semesterids})\";\n\n $sections = get_records_sql($sql);\n \n foreach ($sections as $section) {\n\n // Blow away the 'normal' cases first\n foreach ($clean_children as $table) {\n delete_records($table, 'sectionsid', $section->id);\n }\n\n // Remove the section entry\n delete_records('block_courseprefs_sections', 'id', $section->id);\n $str = \"Removing section {$section->id} {$section->idnumber}\";\n $logger->log($str);\n }\n // Remove the semesters\n delete_records_select('block_courseprefs_semesters', \n 'id IN ('. $semesterids .')');\n } else {\n $str = \"There are no semesters to remove.\";\n $logger->log($str);\n if ($web_report) {\n mtrace($str);\n }\n }\n\n $header = get_string('cleanup_header', 'block_courseprefs'); \n $logger->reportErrors($file, $header, $header);\n}",
"public function delete($id){\n\t\t$sql = 'DELETE FROM course_modes_coursemode WHERE id = ?';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\t$sqlQuery->setNumber($id);\n\t\treturn $this->executeUpdate($sqlQuery);\n\t}",
"public function destroy(Module $module)\n {\n // file path\n $oldFile = \"uploads/$module->module_file\";\n\n $module->delete();\n\n // delete file from public\n if (File::exists(public_path($oldFile))) {\n File::delete(public_path($oldFile));\n }\n\n // message\n if (auth()->user()->role === 'admin') {\n if ($module) {\n return redirect(route(\"admin.module.index\"))->with('success', 'Module berhasil delete');\n } else {\n return redirect(route(\"admin.module.index\"))->with('danger', 'Module gagal delete!');\n }\n } elseif (auth()->user()->role === 'teacher') {\n if ($module) {\n return redirect(route(\"teacher.lesson.show\", $module->lesson))->with('success', 'Module berhasil delete');\n } else {\n return redirect(route(\"teacher.lesson.show\", $module->lesson))->with('danger', 'Module gagal delete!');\n }\n }\n }",
"public function destroy(Course $course)\n {\n flash('Se ha eliminado el curso')->success();\n $course->delete();\n return redirect()->route('admin.courses.index');\n }",
"function deleteuniversitycoursefees($id){\n\n\t\t$this->db->WHERE('feestitleid',$id);\n\t\t$this->db->DELETE('tbl_university_course_fees');\n\n\t\t$this->db->WHERE('id',$id);\n\t\t$this->db->DELETE('tbl_university_courses_fees_title');\n\t}",
"public function canvas_table_crud_destroy($cat, $canvas_block, $id)\n {\n // Удаляем элемент\n DB::table('firm_canvas')->where('id', $id)->delete();\n\n /* Перенаправляем на главную страницу с сообщением */\n return redirect()->route('canvas_table_edit', ['cat' => $cat, 'canvas_block' => $canvas_block])->with('success','Элемент удален');\n }",
"public function DeleteCourse($clusterID, $courseID){\n\t\t$clusterUpdates['editedUser'] = $user;\n\t\t$clusterUpdates['editedDate'] = date('Y-m-d H:i:s', time());\n\t\t$clusterResult = $this->Update('[STAGE CLUSTERS TABLE]', $clusterID, $clusterUpdates);\n\n\t\t$curCourses = $this->Read('[STAGE COURSES TABLE]', array('recordID' => $courseID));\n\t\t$curGroupID = $curCourses[0]['groupID'];\n\t\t$curCourseOrder = (int)$curCourses[0]['courseOrder'];\n\n\t\t$courseResult = $this->Delete('[STAGE COURSES TABLE]', $courseID);\n\n\t\t$courses = $this->Read('[STAGE COURSES TABLE]', array('groupID' => $curGroupID));\n\t\tforeach($courses as $course){\n\t\t\tif((int)$course['courseOrder'] > $curCourseOrder){\n\t\t\t\t$update = array('courseorder' => (int)$course['courseOrder'] - 1);\n\t\t\t\t$courseResult &= $this->Update('[STAGE COURSES TABLE]', $course['recordID'], $update);\n\t\t\t}\n\t\t}\n\n\t\treturn array(\"results\" => $clusterResult && $courseResult);\n }",
"function groups_delete_groupings($courseid, $showfeedback=false) {\n global $CFG;\n\n // delete any uses of groupings\n $sql = \"DELETE FROM {$CFG->prefix}groupings_groups\n WHERE groupingid in (SELECT id FROM {$CFG->prefix}groupings g WHERE g.courseid = $courseid)\";\n execute_sql($sql, false);\n\n // remove the default groupingid from course\n set_field('course', 'defaultgroupingid', 0, 'id', $courseid);\n // remove the groupingid from all course modules\n set_field('course_modules', 'groupingid', 0, 'course', $courseid);\n\n delete_records('groupings', 'courseid', $courseid);\n\n //trigger groups events\n events_trigger('groups_groupings_deleted', $courseid);\n\n if ($showfeedback) {\n notify(get_string('deleted').' groupings');\n }\n\n return true;\n}",
"function flashcard_delete_instance($id) {\n global $DB;\n\n if (!$flashcard = $DB->get_record('flashcard', array('id' => $id))) {\n return false;\n }\n if (!$cm = get_coursemodule_from_instance('flashcard', $flashcard->id)) {\n return false;\n }\n\n $context = context_module::instance($cm->id);\n\n $result = true;\n\n // Delete any dependent records here.\n $DB->delete_records('flashcard_deckdata', array('flashcardid' => $flashcard->id));\n $DB->delete_records('flashcard_card', array('flashcardid' => $flashcard->id));\n\n // Now get rid of all files.\n $fs = get_file_storage();\n $fs->delete_area_files($context->id);\n\n if (!$DB->delete_records('flashcard', array('id' => $flashcard->id))) {\n $result = false;\n }\n\n return $result;\n}",
"public function deleted(Chapter $chapter)\n {\n //\n }",
"public function delete(User $user, Course $course)\n {\n // return ($user->hasAccess(['course.delete']));\n if ($course->user_id === $user->id) {\n // This user is the creator of the course.\n return true;\n }\n }",
"function deleteuniversitylocation($id){\n\n\t\t// Delete University course all data start.....\n \n\t\t$datacourse = array();\n $Qcourse = $this->db->QUERY('SELECT id FROM tbl_university_courses WHERE locationid=\"'.$id.'\"');\n\t\tif ($Qcourse->num_rows() > 0)\n\t\t{\n\t\t\tforeach ($Qcourse->result_array() as $rowcourse)\n\t\t\t{\n\t\t\t\tif($rowcourse['id']!=\"\" || $rowcourse['id']!=NULL)\n\t\t\t\t{\n\t\t\t\t\t$this->db->WHERE('uni_courseid',$rowcourse['id']);\n\t\t\t\t\t$this->db->DELETE('tbl_university_course_eligibility');\n\n\t\t\t\t\t$this->db->WHERE('uni_courseid',$rowcourse['id']);\n\t\t\t\t\t$this->db->DELETE('tbl_university_course_process');\n\n\t\t\t\t\t$this->db->WHERE('uni_courseid',$rowcourse['id']);\n\t\t $this->db->DELETE('tbl_university_course_subjects');\n\n\t\t\t\t\t$this->db->WHERE('courseid',$rowcourse['id']);\n\t\t $this->db->DELETE('tbl_course_intakes');\n\n\t\t\t\t\t$datacourses_fees = array();\n\t\t\t\t\t$Qcourses_fees = $this->db->QUERY('SELECT id FROM tbl_university_courses_fees_title WHERE uni_courseid=\"'.$rowcourse['id'].'\"');\n\t\t\t\t\tif ($Qcourses_fees->num_rows() > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tforeach ($Qcourses_fees->result_array() as $rowcourses_fees)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif($rowcourses_fees['id']!=\"\" || $rowcourses_fees['id']!=NULL)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$this->db->WHERE('feestitleid',$rowcourses_fees['id']);\n\t\t\t\t\t\t\t\t$this->db->DELETE('tbl_university_course_fees');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t$this->db->WHERE('uni_courseid',$rowcourse['id']);\n\t\t\t\t\t$this->db->DELETE('tbl_university_courses_fees_title');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$this->db->WHERE('locationid',$id);\n\t\t$this->db->DELETE('tbl_university_courses');\n\n\n\t\t$this->db->WHERE('id',$id);\n\t\t$this->db->DELETE('tbl_university_location');\t\n\t}",
"public function removeAction()\n {\n $modules = $this->module->fetchAll(\" groupmodule_id = \".$this->_getParam('id'));\n foreach($modules as $key=>$row)\n { \n $this->module->removemodule(APPLICATION_PATH.\"/modules/\".$row->module_name);\n }\n \n $current = $this->gmodule->find($this->_getParam('id'))->current();\n $current->delete(); \n \n $message = \"Data Deleted Successfully\";\n \n $this->_helper->flashMessenger->addMessage($message);\n die;\n }",
"public function testDeleteStudentTakesCourse()\n {\n $response = $this->loginAsRole(Role::ADMIN)\n ->delete($this->url('student-courses/1'));\n\n $response->assertStatus(200);\n\n $response->assertJsonStructure([\n 'message'\n ]);\n }",
"public function destroy(Course $course)\n {\n if ($course->delete()) {\n alert()->success('Success', 'Course deleted');\n return redirect()->route('courses.index');\n }\n\n alert()->error('Error', 'There was an issue deleting the course');\n return redirect()->back();\n }",
"final public function delete() {\n $db = Database::getInstance();\n $mysqli = $db->getConnection();\n\t\n $sql_query = 'DELETE FROM fresco_costing_component_array WHERE component_id ='.$this->_component_id;\n \n $result = $mysqli->query($sql_query);\n if (!$result) {\n trigger_error('Unable to delete from database : SQL query : ' . $sql_query);\n }\n\treturn;\n }",
"private function user_enrolment_deleted($event) {\n global $DB;\n $courseid = $event->courseid;\n $coursecontext = context_course::instance($courseid);\n $userid = $event->relateduserid;\n $gmail = $this->get_google_authenticated_users_gmail($userid);\n $deletecalls = array();\n if ($gmail) {\n $filerecs = $DB->get_records('repository_gdrive_references', array('courseid' => $courseid), '', 'id, reference');\n if ($filerecs) {\n foreach ($filerecs as $filerec) {\n if (has_capability('moodle/course:view', $coursecontext, $userid)) {\n // Manager; do nothing.\n } else {\n // Unenrolled user; delete permission.\n try {\n $permissionid = $this->service->permissions->getIdForEmail($gmail);\n $permission = $this->service->permissions->get($filerec->reference, $permissionid->id);\n if ($permission->role != 'owner') {\n $call = new stdClass();\n $call->fileid = $filerec->reference;\n $call->permissionid = $permissionid->id;\n $deletecalls[] = $call;\n if (count($deletecalls) == 1000) {\n $this->batch_delete_permissions($deletecalls);\n $deletecalls = array();\n }\n }\n } catch (Exception $e) {\n debugging($e);\n }\n }\n }\n }\n }\n\n // Call any remaining batch requests.\n if (count($deletecalls) > 0) {\n $this->batch_delete_permissions($deletecalls);\n }\n }",
"public function delete(User $user, CourseClass $courseClass)\n {\n //\n }",
"public function sure_delete_block(){\r\n\t\tif($this->has_admin_panel()) return $this->module_sure_delete_block();\r\n return $this->module_no_permission();\r\n\t}",
"function admin_delete_cmspage($cms_id = null){\r\r\n\t\t\r\r\n\t\t$this->layout = \"\";\r\r\n\t\t$this->autoRender = false;\r\r\n\t\t$cms_id = DECRYPT_DATA($cms_id);\r\r\n\t\tif(isset($cms_id)){\r\r\n\t\t\tApp::import(\"Model\",\"CmsPage\");\r\r\n\t\t\t$this->CmsPage = new CmsPage();\r\r\n\t\t\t$this->CmsPage->updateAll(array(\"CmsPage.is_deleted\"=>\"'1'\"),array(\"CmsPage.id\"=>$cms_id));\r\r\n\t\t\t$this->Session->setFlash(RECORD_DELETED, 'message/green');\r\r\n\t\t}\r\r\n\t\t$this->redirect($this->referer());exit();\t\r\r\n\t}"
] | [
"0.7288933",
"0.6942202",
"0.6931206",
"0.6915351",
"0.68791866",
"0.6741476",
"0.6739733",
"0.67137927",
"0.6680284",
"0.66232497",
"0.64945877",
"0.6483116",
"0.6421858",
"0.642001",
"0.642001",
"0.6337263",
"0.6266",
"0.6248928",
"0.62185496",
"0.6170002",
"0.61595005",
"0.6122178",
"0.608361",
"0.6059958",
"0.6039138",
"0.6035345",
"0.60337734",
"0.601102",
"0.59226036",
"0.59199536",
"0.5897083",
"0.58872926",
"0.5879066",
"0.58759624",
"0.58695495",
"0.5851727",
"0.5827719",
"0.57807577",
"0.5773518",
"0.57703084",
"0.5758901",
"0.5749767",
"0.574026",
"0.57233906",
"0.57048273",
"0.56954944",
"0.56949246",
"0.5668357",
"0.56568176",
"0.56407243",
"0.5640711",
"0.5636853",
"0.5626612",
"0.5618038",
"0.56089586",
"0.55835634",
"0.5576918",
"0.5562341",
"0.5562284",
"0.55590457",
"0.5553801",
"0.5550831",
"0.5522532",
"0.55066174",
"0.5502087",
"0.54994386",
"0.54872173",
"0.5467884",
"0.5463282",
"0.5461715",
"0.5444627",
"0.5435178",
"0.5433888",
"0.54330134",
"0.5431176",
"0.5429464",
"0.54217327",
"0.5414317",
"0.5406203",
"0.5398233",
"0.5397185",
"0.5386438",
"0.5382765",
"0.5371253",
"0.53621596",
"0.5360321",
"0.5358244",
"0.53554183",
"0.53343457",
"0.5328561",
"0.5320388",
"0.5316706",
"0.5310254",
"0.5309898",
"0.5308931",
"0.5303323",
"0.5285618",
"0.52701056",
"0.52680504",
"0.5267214"
] | 0.63419294 | 15 |
Returns the static model of the specified AR class. | public static function model($className=__CLASS__)
{
return parent::model($className);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function model()\r\n {\r\n return static::class;\r\n }",
"public static function model() {\n return parent::model(get_called_class());\n }",
"public static function model($class = __CLASS__)\n {\n return parent::model($class);\n }",
"public static function model($class = __CLASS__)\n\t{\n\t\treturn parent::model(get_called_class());\n\t}",
"static public function model($className = __CLASS__)\r\n {\r\n return parent::model($className);\r\n }",
"public static function model($className=__CLASS__) { return parent::model($className); }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className=__CLASS__) {\n return parent::model($className);\n }",
"public static function model($className=__CLASS__)\n {\n return CActiveRecord::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className=__CLASS__)\n {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }",
"public static function model($className = __CLASS__) {\n return parent::model($className);\n }"
] | [
"0.74850124",
"0.73803526",
"0.7154113",
"0.71401674",
"0.70629025",
"0.703232",
"0.69285315",
"0.69285315",
"0.6925706",
"0.6902751",
"0.6894916",
"0.6894916",
"0.68900806",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424",
"0.68698424"
] | 0.0 | -1 |
Retrieves a list of models based on the current search/filter conditions. | public function search()
{
// Warning: Please modify the following code to remove attributes that
// should not be searched.
$criteria=new CDbCriteria;
$criteria->compare('nood_envelop_ID',$this->nood_envelop_ID);
$criteria->compare('nood_envelop_name',$this->nood_envelop_name,true);
$criteria->compare('event_ID',$this->event_ID);
$criteria->compare('route_ID',$this->route_ID);
$criteria->compare('nood_envelop_volgorde',$this->nood_envelop_volgorde);
$criteria->compare('coordinaat',$this->coordinaat,true);
$criteria->compare('opmerkingen',$this->opmerkingen,true);
$criteria->compare('score',$this->score);
$criteria->compare('create_time',$this->create_time,true);
$criteria->compare('create_user_ID',$this->create_user_ID);
$criteria->compare('update_time',$this->update_time,true);
$criteria->compare('update_user_ID',$this->update_user_ID);
return new CActiveDataProvider($this, array(
'criteria'=>$criteria,
));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getModels();",
"public function getModels();",
"public function findAll($model);",
"public function getListSearch()\n {\n //set warehouse and client id\n $warehouse_id = ( !is_numeric(request()->get('warehouse_id')) ) ? auth()->user()->current_warehouse_id : request()->get('warehouse_id');\n $client_id = ( !is_numeric(request()->get('client_id')) ) ? auth()->user()->current_client_id : request()->get('client_id');\n\n //instantiate model and run search\n $product_model = new Product();\n return $product_model->getListSearch(request()->get('search_term'), $warehouse_id, $client_id);\n }",
"public function getModels()\n\t{\n\t\t$scope = $this->scopeName;\n\t\treturn CActiveRecord::model($this->baseModel)->$scope()->findAll();\n\t}",
"protected function findModel()\n {\n $class = $this->model;\n $query = $class::query();\n\n foreach ($this->input as $key => $value) {\n $where = is_array($value) ? 'whereIn' : 'where';\n $query->$where($key, $value);\n }\n\n return $query->get();\n }",
"public function modelScans()\n {\n if ($this->scanEverything) {\n return $this->getAllClasses();\n }\n\n return $this->scanModels;\n }",
"public function listModels() {\n\n $config = $this->initConfig($version = AnalyzeModel::VERSION);\n\n $config->setQuery( [ 'version' => $version ] );\n\n $config->setMethod(HttpClientConfiguration::METHOD_GET);\n $config->setType(HttpClientConfiguration::DATA_TYPE_JSON);\n $config->setURL(self::BASE_URL.\"/models\");\n\n return $this->sendRequest($config);\n }",
"public function getModelsForIndex()\n {\n $models = [];\n $all_models = $this->getAllModels();\n\n foreach ($all_models as $model) {\n //parse model\n $pieces = explode('.', $model);\n if (count($pieces) != 2) {\n throw new Exception('Parse error in AppModelList');\n }\n //check form match\n $app_model = $pieces[1];\n $link = $this->convertModelToLink($app_model);\n\n // add to actions\n $models[$app_model]['GET'] = [\n [\n 'action' => 'index',\n 'description' => 'List & filter all ' . $app_model . ' resources.',\n 'route' => '/' . env('EASY_API_BASE_URL', 'easy-api') . '/' . $link\n ],\n [\n 'action' => 'show',\n 'description' => 'Show the ' . $app_model . ' that has the matching {id} from the route.',\n 'route' => '/' . env('EASY_API_BASE_URL', 'easy-api') . '/' . $link . '/{id}'\n ]\n ];\n }\n return $models;\n }",
"public function getModels()\n {\n $this->prepare();\n\n return $this->_models;\n }",
"public function getModels()\n {\n $this->prepare();\n\n return $this->_models;\n }",
"public function searchableBy()\n {\n return [];\n }",
"public function all($model){\n\n if(!class_exists($model)){\n return new $model;\n }\n\n $table = $this->getTableName($model);\n $stmt = $this->pdo->prepare('select * from ' . $table);\n $stmt->execute();\n\n return $stmt->fetchAll(\\PDO::FETCH_CLASS, $model);\n }",
"public static function find($model, $conditions = null, $orderby = null){\n\t\t$sql = \"SELECT * FROM \" . self::table_for($model);\n\t\tif ($conditions) $sql .= \" WHERE \" . self::make_conditions($conditions);\n\t\tif ($orderby)\t$sql .= \" ORDER BY \" . $orderby;\n\t\t\n\t\t$resultset = self::do_query($sql);\n\t\treturn self::get_results($resultset, $model);\n\t}",
"function get_model_list($where=\"1\",$where_array,$sort_by=\"\"){\n\t\t$data= $this->select_query(\"make_model\",\"id,name,del_status\",$where,$where_array,$sort_by);\n\t\treturn $data;\n\t}",
"public static function search()\n {\n return self::filterSearch([\n 'plot_ref' => 'string',\n 'plot_name' => 'string',\n 'plot_start_date' => 'string',\n 'user.name' => self::filterOption([\n 'select' => 'id',\n 'label' => trans_title('users', 'plural'),\n 'fields' => ['id', 'name'],\n //ComboBox user list base on the current client\n //See in App\\Models\\Users\\UsersScopes\n 'model' => app(User::class)->bySearch(),\n ]),\n 'client.client_name' => self::filterOption([\n 'conditional' => Credentials::hasRoles(['admin', 'admin-gv']),\n 'select' => 'client_id',\n 'label' => trans_title('clients', 'plural'),\n 'model' => Client::class,\n 'fields' => ['id', 'client_name']\n ])\n ]);\n }",
"public function getList()\n {\n \treturn $this->model->where('is_base', '=', 0)->get();\n }",
"public function getList()\n {\n $this->db->order_by(\"id\", 'desc');\n $this->db->where('status', 1);\n return $this->db->get($this->model);\n }",
"public function findAll()\n {\n $fields = $options = [];\n //$options['debug'] = 1;\n $options['enablefieldsfe'] = 1;\n\n return $this->search($fields, $options);\n }",
"public function findAll()\n {\n return $this->model->all();\n }",
"public function get_multiple()\n\t{\n\t\t$options = array_merge(array(\n\t\t\t'offset' => 0,\n\t\t\t'limit' => 20,\n\t\t\t'sort_by' => 'name',\n\t\t\t'order' => 'ASC'\n\t\t), Input::all(), $this->options);\n\n\t\t// Preparing our query\n\t\t$results = $this->model->with($this->includes);\n\n\t\tif(count($this->join) > 0)\n\t\t{\n\t\t\tforeach ($this->join as $table => $settings) {\n\t\t\t\t$results = $results->join($table, $settings['join'][0], $settings['join'][1], $settings['join'][2]);\n\t\t\t\tif($settings['columns'])\n\t\t\t\t{\n\t\t\t\t\t$options['sort_by'] = (in_array($options['sort_by'], $settings['columns']) ? $table : $this->model->table()).'.'.$options['sort_by'];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(stripos($options['sort_by'], '.') === 0)\n\t\t{\n\t\t\t$options['sort_by'] = $this->model->table().'.' . $options['sort_by'];\n\t\t}\n\t\t\n\t\t// Add where's to our query\n\t\tif(array_key_exists('search', $options))\n\t\t{\n\t\t\tforeach($options['search']['columns'] as $column)\n\t\t\t{\n\t\t\t\t$results = $results->or_where($column, '~*', $options['search']['string']);\n\t\t\t}\n\t\t}\n\n\t\t$total = (int) $results->count();\n\n\t\t// Add order_by, skip & take to our results query\n\t\t$results = $results->order_by($options['sort_by'], $options['order'])->skip($options['offset'])->take($options['limit'])->get();\n\n\t\t$response = array(\n\t\t\t'results' => to_array($results),\n\t\t\t'total' => $total,\n\t\t\t'pages' => ceil($total / $options['limit'])\n\t\t);\n\n\t\treturn Response::json($response);\n\t}",
"public function getAll()\n {\n return DB::table('product_models')->get()->all();\n }",
"public function filter($params) {\n $model = $this->model;\n $keyword = isset($params['keyword'])?$params['keyword']:'';\n $sort = isset($params['sort'])?$params['sort']:''; \n if ($sort == 'name') {\n $query = $model->where('name','LIKE','%'.$keyword.'%')->orderBy('name'); \n }\n else if ($sort == 'newest') {\n $query = $model->where('name','LIKE','%'.$keyword.'%')->orderBy('updated_at','desc'); \n }\n else {\n $query = $model->where('name','LIKE','%'.$keyword.'%'); \n }\n /** filter by class_id */ \n if (isset($params['byclass']) && isset($params['bysubject'])) {\n $query = $model->listClass($params['byclass'], $params['bysubject']);\n return $query; \n }\n else if (isset($params['byclass'])) { \n $query = $model->listClass($params['byclass']);\n return $query;\n }\n else if (isset($params['bysubject'])) {\n $query = $model->listClass(0,$params['bysubject']);\n return $query;\n }\n /** filter by course status */\n if (isset($params['incomming'])) {\n $query = $model->listCourse('incomming');\n return $query;\n }\n else if (isset($params['upcomming'])) {\n $query = $model->listCourse('upcomming');\n return $query;\n }\n $result = $query->paginate(10); \n return $result; \n }",
"public function getAll($model, $filters = array())\n {\n $repo = $this->getRepository($model);\n\n return $repo->getAll($filters);\n }",
"public function filters(Model $model): array\n {\n return [];\n }",
"public function getResults()\n {\n if($this->search) {\n foreach ($this->filters as $field) {\n $field = array_filter(explode('.', $field));\n if(count($field) == 2) {\n $this->query->whereHas($field[0], function ($q) use ($field) {\n $q->where($field[1], 'ilike', \"%{$this->search}%\");\n });\n }\n if(count($field) == 1) {\n $this->query->orWhere($field[0], 'ilike', \"%{$this->search}%\");\n }\n }\n }\n\n if($this->where) {\n foreach ($this->where as $field => $value) {\n $this->query->where($field, $value);\n }\n }\n\n if ($this->whereBetween) {\n foreach ($this->whereBetween as $field => $value)\n $this->query->whereBetween($field, $value);\n }\n// dd($this->query->toSql());\n return $this->query->paginate($this->per_page);\n }",
"protected function _searchInModel(Model $model, Builder $items){\n foreach($model->searchable as $param){\n if($param != 'id'){\n if(isset($this->request[$param]))\n $items = $items->where($param, $this->request[$param]);\n if(isset($this->request[$param.'_like']))\n $items = $items->where($param, 'like', '%'.$this->request[$param.'_like'].'%');\n }else{\n if(isset($this->request['id'])){\n $ids = explode(',', $this->request['id']);\n $items = $items->whereIn('id', $ids);\n }\n }\n }\n\n return $items;\n }",
"public function getAll($model)\n {\n $sql = \"SELECT * FROM {$this->table}\";\n $req = Database::getBdd()->prepare($sql);\n $req->execute();\n return $req->fetchAll(PDO::FETCH_CLASS,get_class($this->model));\n }",
"private function getAllModels()\n {\n return (object)ModelRegistry::getAllObjects();\n }",
"public function findAll()\n {\n return $this->driver->findAll($this->model);\n }",
"public function getAllFilters();",
"public function GetAll()\n {\n return $this->model->all();\n }",
"public function fetch_all_models() {\n global $pdo;\n\n $query = $pdo->prepare(\"SELECT * FROM talents\");\n $query -> execute();\n return $query->fetchAll(\\PDO::FETCH_ASSOC);\n }",
"public function findWhere($model, $conditions, $limit = 0){\n\n if(!class_exists($model)){\n return new $model;\n }\n\n $table = $this->getTableName($model);\n\n $sql = 'select * from ' . $table . ' where ';\n $values = [];\n $counter = 1;\n\n foreach ($conditions as $key => $value) {\n if($counter > 1)\n $sql .= ' AND ';\n\n $sql .= $key . '=?';\n $values[] = $value; \n $counter++;\n }\n\n if($limit > 0)\n $sql .= ' LIMIT ' . $limit;\n \n $stmt = $this->pdo->prepare($sql);\n $stmt->execute($values);\n\n return $stmt->fetchAll(\\PDO::FETCH_CLASS, $model);\n }",
"public function search() {\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('type', $this->type);\n\n return $criteria;\n }",
"public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t//$criteria->compare('object_id',$this->object_id);\n\t\t$criteria->compare('object_type_id',$this->object_type_id);\n\t\t$criteria->compare('data_type_id',$this->data_type_id);\n\t\t$criteria->compare('create_date',$this->create_date,true);\n\t\t$criteria->compare('client_ip',$this->client_ip,true);\n\t\t$criteria->compare('url',$this->url,true);\n\t\t$criteria->compare('url_origin',$this->url_origin,true);\n\t\t$criteria->compare('device',$this->device,true);\n\t\t$criteria->compare('country_name',$this->country_name,true);\n\t\t$criteria->compare('country_code',$this->country_code,true);\n\t\t$criteria->compare('regionName',$this->regionName,true);\n\t\t$criteria->compare('cityName',$this->cityName,true);\n\t\t$criteria->compare('browser',$this->browser,true);\n\t\t$criteria->compare('os',$this->os,true);\n\t\t\t// se agrego el filtro por el usuario actual\n\t\t$idUsuario=Yii::app()->user->getId();\n\t\t$model = Listings::model()->finbyAttributes(array('user_id'=>$idUsuario));\n\t\tif($model->id!=\"\"){\n\t\t\t$criteria->compare('object_id',$model->id);\t\n\t\t}else{\n\t\t\t$criteria->compare('object_id',\"Null\");\t\n\t\t}\n\t\t\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"public function getModels()\n {\n return $this->_models;\n }",
"public function getSearchFields();",
"public function all()\n {\n return $this->model->get();\n }",
"public function getAllModels()\n {\n try {\n return AppModelList::models();\n }\n catch (Throwable $t) {\n throw new Exception('Parse Error: AppModelList.php has been corrupted.');\n }\n }",
"protected function _list_items_query()\n\t{\n\t\t$this->filters = (array) $this->filters;\n\t\t$where_or = array();\n\t\t$where_and = array();\n\t\tforeach($this->filters as $key => $val)\n\t\t{\n\t\t\tif (is_int($key))\n\t\t\t{\n\t\t\t\tif (isset($this->filters[$val])) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$key = $val;\n\t\t\t\t$val = $this->filter_value;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// used for separating table names and fields since periods get translated to underscores\n\t\t\t\t$key = str_replace(':', '.', $key);\n\t\t\t}\n\t\t\t\n\t\t\t$joiner = $this->filter_join;\n\t\t\t\n\t\t\tif (is_array($joiner))\n\t\t\t{\n\t\t\t\tif (isset($joiner[$key]))\n\t\t\t\t{\n\t\t\t\t\t$joiner = $joiner[$key];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$joiner = 'or';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!empty($val)) \n\t\t\t{\n\t\t\t\t$joiner_arr = 'where_'.$joiner;\n\t\t\t\t\n\t\t\t\tif (strpos($key, '.') === FALSE AND strpos($key, '(') === FALSE) $key = $this->table_name.'.'.$key;\n\t\t\t\t\n\t\t\t\t//$method = ($joiner == 'or') ? 'or_where' : 'where';\n\t\t\t\t\n\t\t\t\t// do a direct match if the values are integers and have _id in them\n\t\t\t\tif (preg_match('#_id$#', $key) AND is_numeric($val))\n\t\t\t\t{\n\t\t\t\t\t//$this->db->where(array($key => $val));\n\t\t\t\t\tarray_push($$joiner_arr, $key.'='.$val);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// from imknight https://github.com/daylightstudio/FUEL-CMS/pull/113#commits-pushed-57c156f\n\t\t\t\t//else if (preg_match('#_from#', $key) OR preg_match('#_to#', $key))\n\t\t\t\telse if (preg_match('#_from$#', $key) OR preg_match('#_fromequal$#', $key) OR preg_match('#_to$#', $key) OR preg_match('#_toequal$#', $key) OR preg_match('#_equal$#', $key))\n\t\t\t\t{\n\t\t\t\t\t//$key = strtr($key, array('_from' => ' >', '_fromequal' => ' >=', '_to' => ' <', '_toequal' => ' <='));\n\t\t\t\t\t$key_with_comparison_operator = preg_replace(array('#_from$#', '#_fromequal$#', '#_to$#', '#_toequal$#', '#_equal$#'), array(' >', ' >=', ' <', ' <=', ' ='), $key);\n\t\t\t\t\t//$this->db->where(array($key => $val));\n\t\t\t\t\t//$where_or[] = $key.'='.$this->db->escape($val);\n\t\t\t\t\tarray_push($$joiner_arr, $key_with_comparison_operator.$this->db->escape($val));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//$method = ($joiner == 'or') ? 'or_like' : 'like';\n\t\t\t\t\t//$this->db->$method('LOWER('.$key.')', strtolower($val), 'both');\n\t\t\t\t\tarray_push($$joiner_arr, 'LOWER('.$key.') LIKE \"%'.strtolower($val).'%\"');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// here we will group the AND and OR separately which should handle most cases me thinks... but if not, you can always overwrite\n\t\t$where = array();\n\t\tif (!empty($where_or))\n\t\t{\n\t\t\t$where[] = '('.implode(' OR ', $where_or).')';\n\t\t}\n\t\tif (!empty($where_and))\n\t\t{\n\t\t\t$where[] = '('.implode(' AND ', $where_and).')';\n\t\t}\n\t\tif (!empty($where))\n\t\t{\n\t\t\t$where_sql = implode(' AND ', $where);\n\t\t\t$this->db->where($where_sql);\n\t\t}\n\t\t\n\t\t\n\t\t// set the table here so that items total will work\n\t\t$this->db->from($this->table_name);\n\t}",
"public function getAll()\n {\n return $this->fetchAll($this->searchQuery(0));\n }",
"public function listAction() {\n\t\t$this->view->config = Marcel_Backoffice_Config::getInstance()->getConfig();\n\t\t$modelName = $this->_getParam('model');\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$this->view->cols = $model->info('cols');\n\t\t$select = null;\n\t\t\n\t\tif ($this->_request->getParam('data')) {\n\t\t\t\n\t\t\t$data = unserialize($this->_request->getParam('data'));\n\t\t\t$aWhere = array();\n\t\t\t$searchText = array();\n\t\t\t\n\t\t\tforeach ($data['query'] as $key => $q) {\n\t\t\t\n\t\t\t\tif (isset($data['fields'][$key]) && !empty($data['fields'][$key])) {\n\t\t\t\t\n\t\t\t\t\t$func = addslashes($data['func'][$key]);\n\t\t\t\t\t$q =\taddslashes($q);\n\t\t\t\t\t$tmpWhere = array();\n\t\t\t\t\t$searchText[] = implode(' OU ', $data['fields'][$key]) . ' ' . $this->view->func[$func] . ' \"' . stripslashes($q) . '\"';\n\t\t\t\t\t\n\t\t\t\t\tforeach ($data['fields'][$key] as $field) {\n\t\t\t\t\t\n\t\t\t\t\t\t$field\t=\taddslashes($field);\n\t\t\t\t\t\tswitch ($func) {\n\t\t\t\t\t\t\tcase 'LIKE':\n\t\t\t\t\t\t\tcase 'NOT LIKE':\n\t\t\t\t\t\t\tcase '=':\n\t\t\t\t\t\t\tcase '!=':\n\t\t\t\t\t\t\tcase '>':\n\t\t\t\t\t\t\tcase '>=':\n\t\t\t\t\t\t\tcase '<':\n\t\t\t\t\t\t\tcase '<=':\n\t\t\t\t\t\t\t\tif (trim($q) != '') { $tmpWhere[] = $field . ' ' . $func . ' \\'' . $q . '\\''; }\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"= ''\":\n\t\t\t\t\t\t\tcase \"!= ''\":\n\t\t\t\t\t\t\tcase 'IS NULL':\n\t\t\t\t\t\t\tcase 'IS NOT NULL':\n\t\t\t\t\t\t\t\t$tmpWhere[] = $field . ' ' . stripslashes($func);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\tif (trim($q) != '') { $tmpWhere[] = $field . ' LIKE \\'%' . $q . '%\\''; }\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$aWhere[] = '(' . implode(' OR ', $tmpWhere) . ')';\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!empty($aWhere)) { $select = $model->select()->where(implode(' AND ', $aWhere)); }\n\t\t\t$this->view->searchText = $searchText;\n\t\t}\n\t\t$this->view->model = $modelName;\n\t\t$this->view->allData = $model->fetchAll($select);\n\t\t$this->view->data = Zend_Paginator::factory($this->view->allData)\n\t\t\t\t\t\t\t->setCurrentPageNumber($this->_getParam('page', 1));\n\t}",
"public function index(Request $request)\n {\n $this->validate($request, [\n 'type' => 'required',\n 'searched' => 'required',\n ]);\n\n try {\n if ($request->type == 'Categories') {\n return Category::search($request->searched)->take(20)->get();\n }\n\n if ($request->type == 'Submissions') {\n return $this->sugarFilter(Submission::search($request->searched)->take(20)->get());\n }\n\n if ($request->type == 'Comments') {\n return $this->withoutChildren(Comment::search($request->searched)->take(20)->get());\n }\n\n if ($request->type == 'Users') {\n return User::search($request->searched)->take(20)->get();\n }\n } catch (\\Exception $exception) {\n app('sentry')->captureException($exception);\n\n return [];\n }\n }",
"public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\n\t\t$criteria->compare('type_key',$this->type_key,true);\n\n\t\t$criteria->compare('type_name',$this->type_name,true);\n\n\t\t$criteria->compare('model',$this->model,true);\n\n\t\t$criteria->compare('status',$this->status,true);\n\t\t\n\t\t$criteria->compare('seo_title',$this->seo_title,true);\n\t\t\n\t\t$criteria->compare('seo_keywords',$this->seo_keywords,true);\n\t\t\n\t\t$criteria->compare('seo_description',$this->seo_description,true);\n\n\t\treturn new CActiveDataProvider('ModelType', array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"public function getReturnModels(){\r\n return array_values($this->models);\r\n }",
"public function findAll()\n {\n $models = $this->getDoctrineRepository()->findAll();\n $this->events()->trigger(__FUNCTION__ . '.post', $this, array(\n 'model' => $models,\n 'om' => $this->getObjectManager())\n );\n return $models;\n }",
"public function models();",
"public function search($conditions)\n\t{\n\t\t$limit = (isset($conditions['limit']) && $conditions['limit'] !== null ? $conditions['limit'] : 10);\n\t\t$result = array();\n\t\t$alphabets = [];\n\n\t\tDB::enableQueryLog();\n\n\t\t$mem = new Memcached();\n\t\t$mem->addServer(env('memcached_server'), env('memcached_port'));\n\n\t\t/* Get Default Logo Link on setting_object table */\n\t\t$logoMem = $mem->get('logo_course');\n\n\t\tif ($logoMem)\n\t\t{\n\t\t\t$default_logo = $logoMem;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$default_logo = $this->getDefaultLogo();\n\t\t\t$mem->set('logo_course', $default_logo);\n\t\t}\n\n\t\tif (isset($conditions['alphabet']) && $conditions['alphabet'] !== null && sizeof($conditions['alphabet']) > 0) {\n\t\t\tforeach ($conditions['alphabet'] as $item) {\n\t\t\t\t$alphabets[] = \"lower(entity.name) like \" . DB::Raw(\"'\" . strtolower($item) . \"%'\");\n\t\t\t\t$alphabets[] = \"lower(curriculum.name) like \" . DB::Raw(\"'\" . strtolower($item) . \"%'\");\n\t\t\t}\n\t\t}\n\n\t\t$extraGroup = (isset($conditions['sort']) && $conditions['sort'] !== null ? $conditions['sort'] : '' );\n\t\t$extraGroup = str_replace(' ASC', '',$extraGroup);\n\t\t$extraGroup = str_replace(' DESC', '',$extraGroup);\n\n\t\t$searchData = DB::table('course')\n\t\t\t->select('curriculum.curriculum_id','course.course_id', DB::raw('entity.logo entity_logo'), 'course.day_of_week',\n\t\t\t\tDB::raw('entity.name entity_name, curriculum.name curriculum_name'), 'course.time_start', 'course.time_end')\n\t\t\t->whereRaw(\n\t\t\t\t(isset($conditions['is_free_trial'])&& sizeof($conditions['is_free_trial']) > 0 ? \"course.is_free_trial in (\" . implode(\",\", $conditions['is_free_trial']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['country_id']) && $conditions['country_id'] !== null ? \"campus.country_id in (\" . implode(\",\",$conditions['country_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['city_id']) && $conditions['city_id'] !== null ? \"campus.city_id in (\" . implode(\",\",$conditions['city_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['location_id']) && $conditions['location_id'] !== null ? \"campus.location_id in (\" . implode(\",\",$conditions['location_id']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['activity_id']) && $conditions['activity_id'] !== null ? \"program.activity_id in (\" . implode(\",\",$conditions['activity_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['activity_classification_id']) && $conditions['activity_classification_id'] !== null ? \"activity.activity_classification_id in (\" . implode(\",\",$conditions['activity_classification_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['activity_type_id']) && $conditions['activity_type_id'] !== null ? \"activity_classification.activity_type_id in (\" . implode(\",\",$conditions['activity_type_id']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['event_type_id']) && $conditions['event_type_id'] !== null ? \"program.event_type_id in (\" . implode(\",\",$conditions['event_type_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['facility_id']) && $conditions['facility_id'] !== null ? \"campus.facility_id in (\" . implode(\",\",$conditions['facility_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['campus_id']) && $conditions['campus_id'] !== null ? \"campus_arena.campus_id in (\" . implode(\",\",$conditions['campus_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['program_id']) && $conditions['program_id'] !== null ? \"curriculum.program_id in (\" . implode(\",\",$conditions['program_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['arena_id']) && $conditions['arena_id'] !== null ? \"campus_arena.arena_id in (\" . implode(\",\",$conditions['arena_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['provider_id']) && $conditions['provider_id'] !== null ? \"program.provider_id in (\" . implode(\",\",$conditions['provider_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['user_id']) && $conditions['user_id'] !== null ? \"schedule.instructor_id in (\" . implode(\",\",$conditions['user_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['day_of_week']) && $conditions['day_of_week'] !== null ? \"course.day_of_week in (\" . implode(\",\",$conditions['day_of_week']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['time_start']) && $conditions['time_start'] !== null ? \"time(course.time_start) = time('\" . $conditions['time_start'] . \"') AND \" : '') .\n\t\t\t\t(isset($conditions['time_end']) && $conditions['time_end'] !== null ? \"time(course.time_end) = time('\" . $conditions['time_end'] . \"') AND \" : '') .\n\n\t\t\t\t(isset($conditions['audience_gender_id']) && $conditions['audience_gender_id'] !== null ? \"course.audience_gender_id in (\" . implode(\",\",$conditions['audience_gender_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['audience_generation_id']) && $conditions['audience_generation_id'] !== null ? \"course.audience_generation_id in (\" . implode(\",\",$conditions['audience_generation_id']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['age_range_top']) && $conditions['age_range_top'] !== null ? \"course.age_range_top >= \" . $conditions['age_range_top'] . \" AND \" : '') .\n\t\t\t\t(isset($conditions['age_range_bottom']) && $conditions['age_range_bottom'] !== null ? \"course.age_range_bottom <= \" . $conditions['age_range_bottom'] . \" AND \" : '') .\n\n\t\t\t\t(isset($conditions['keyword']) && sizeof($conditions['keyword']) > 0 ? \"(\" . implode(\" OR \", $conditions['keyword']) . \") AND \" : '') .\n\t\t\t\t(isset($alphabets) && sizeof($alphabets) > 0 ? \"(\" . join(\" OR \", $alphabets) . \") AND \" : '') .\n\t\t\t\t('course.status = 0')\n\t\t\t)\n\t\t\t->join('campus_arena', function($join){\n\t\t\t\t$join->on('course.campus_arena_id','campus_arena.campus_arena_id');\n\t\t\t\t//$join->on('course.arena_id', 'campus_arena.arena_id');\n\t\t\t})\n\t\t\t->leftjoin('campus', 'campus_arena.campus_id', 'campus.campus_id')\n\t\t\t->leftjoin('location', 'campus.location_id', 'location.location_id')\n\n\t\t\t->leftjoin('facility', function ($join) {\n\t\t\t\t$join->on('campus.facility_id','facility.facility_id');\n\t\t\t\t$join->on('campus.country_id','facility.country_id');\n\t\t\t})\n\n\t\t\t->leftjoin('curriculum', 'course.curriculum_id', 'curriculum.curriculum_id')\n\n\t\t\t->leftjoin('program','program.program_id','curriculum.program_id')\n\t\t\t->leftjoin('provider', 'program.provider_id', 'provider.provider_id')\n\t\t\t->leftjoin('entity','provider.entity_id','entity.entity_id')\n\t\t\t->leftjoin('event_type', 'program.event_type_id', 'event_type.event_type_id')\n\t\t\t/*->join('entity', 'provider.entity_id', 'entity.entity_id')*/\n\n\t\t\t->leftjoin('schedule', 'course.course_id', 'schedule.course_id')\n\t\t\t->leftjoin('user', 'schedule.instructor_id', 'user.user_id')\n\t\t\t->leftjoin('activity', 'program.activity_id', 'activity.activity_id')\n\t\t\t->leftjoin('activity_classification', 'activity_classification.activity_classification_id', 'activity.activity_classification_id')\n\t\t\t->groupBy(\n\t\t\t\tDB::raw('curriculum.curriculum_id, course.course_id, entity.logo, course.day_of_week, entity.name, curriculum.name, course.time_start, course.time_end' .\n\t\t\t\t\t(isset($conditions['sort']) && $conditions['sort'] !== null ? \", \" . $extraGroup : '' )\n\t\t\t\t)\n\t\t\t)\n\t\t\t->orderByRaw(isset($conditions['sort']) && $conditions['sort'] !== null ? $conditions['sort'] : 'course.day_of_week ASC, course.course_id DESC')\n\t\t\t->limit($limit)\n\t\t\t->offset(isset($conditions['page']) && $conditions['page'] !== null ? ($conditions['page']-1) * $limit : 0)\n\t\t\t->get();\n\n\t\t$searchAll = DB::table('course')\n\t\t\t->select('curriculum.curriculum_id','course.course_id', DB::raw('entity.logo entity_logo'), 'course.day_of_week',\n\t\t\t\tDB::raw('entity.name entity_name, curriculum.name curriculum_name'), 'course.time_start', 'course.time_end')\n\t\t\t->whereRaw(\n\t\t\t\t(isset($conditions['is_free_trial'])&& sizeof($conditions['is_free_trial']) > 0 ? \"course.is_free_trial in (\" . implode(\",\", $conditions['is_free_trial']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['country_id']) && $conditions['country_id'] !== null ? \"campus.country_id in (\" . implode(\",\",$conditions['country_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['city_id']) && $conditions['city_id'] !== null ? \"campus.city_id in (\" . implode(\",\",$conditions['city_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['location_id']) && $conditions['location_id'] !== null ? \"campus.location_id in (\" . implode(\",\",$conditions['location_id']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['activity_id']) && $conditions['activity_id'] !== null ? \"program.activity_id in (\" . implode(\",\",$conditions['activity_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['activity_classification_id']) && $conditions['activity_classification_id'] !== null ? \"activity.activity_classification_id in (\" . implode(\",\",$conditions['activity_classification_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['activity_type_id']) && $conditions['activity_type_id'] !== null ? \"activity_classification.activity_type_id in (\" . implode(\",\",$conditions['activity_type_id']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['event_type_id']) && $conditions['event_type_id'] !== null ? \"program.event_type_id in (\" . implode(\",\",$conditions['event_type_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['facility_id']) && $conditions['facility_id'] !== null ? \"campus.facility_id in (\" . implode(\",\",$conditions['facility_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['campus_id']) && $conditions['campus_id'] !== null ? \"campus_arena.campus_id in (\" . implode(\",\",$conditions['campus_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['program_id']) && $conditions['program_id'] !== null ? \"curriculum.program_id in (\" . implode(\",\",$conditions['program_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['arena_id']) && $conditions['arena_id'] !== null ? \"campus_arena.arena_id in (\" . implode(\",\",$conditions['arena_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['provider_id']) && $conditions['provider_id'] !== null ? \"program.provider_id in (\" . implode(\",\",$conditions['provider_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['user_id']) && $conditions['user_id'] !== null ? \"schedule.instructor_id in (\" . implode(\",\",$conditions['user_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['day_of_week']) && $conditions['day_of_week'] !== null ? \"course.day_of_week in (\" . implode(\",\",$conditions['day_of_week']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['time_start']) && $conditions['time_start'] !== null ? \"time(course.time_start) = time('\" . $conditions['time_start'] . \"') AND \" : '') .\n\t\t\t\t(isset($conditions['time_end']) && $conditions['time_end'] !== null ? \"time(course.time_end) = time('\" . $conditions['time_end'] . \"') AND \" : '') .\n\n\t\t\t\t(isset($conditions['audience_gender_id']) && $conditions['audience_gender_id'] !== null ? \"course.audience_gender_id in (\" . implode(\",\",$conditions['audience_gender_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['audience_generation_id']) && $conditions['audience_generation_id'] !== null ? \"course.audience_generation_id in (\" . implode(\",\",$conditions['audience_generation_id']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['age_range_top']) && $conditions['age_range_top'] !== null ? \"course.age_range_top >= \" . $conditions['age_range_top'] . \" AND \" : '') .\n\t\t\t\t(isset($conditions['age_range_bottom']) && $conditions['age_range_bottom'] !== null ? \"course.age_range_bottom <= \" . $conditions['age_range_bottom'] . \" AND \" : '') .\n\n\t\t\t\t(isset($conditions['keyword']) && sizeof($conditions['keyword']) > 0 ? \"(\" . implode(\" OR \", $conditions['keyword']) . \") AND \" : '') .\n\t\t\t\t(isset($alphabets) && sizeof($alphabets) > 0 ? \"(\" . join(\" OR \", $alphabets) . \") AND \" : '') .\n\t\t\t\t('course.status = 0')\n\t\t\t)\n\t\t\t->join('campus_arena', function($join){\n\t\t\t\t$join->on('course.campus_arena_id','campus_arena.campus_arena_id');\n\t\t\t\t//$join->on('course.arena_id', 'campus_arena.arena_id');\n\t\t\t})\n\t\t\t->leftjoin('campus', 'campus_arena.campus_id', 'campus.campus_id')\n\t\t\t->leftjoin('location', 'campus.location_id', 'location.location_id')\n\n\t\t\t->leftjoin('facility', function ($join) {\n\t\t\t\t$join->on('campus.facility_id','facility.facility_id');\n\t\t\t\t$join->on('campus.country_id','facility.country_id');\n\t\t\t})\n\n\t\t\t->leftjoin('curriculum', 'course.curriculum_id', 'curriculum.curriculum_id')\n\n\t\t\t->leftjoin('program','program.program_id','curriculum.program_id')\n\t\t\t->leftjoin('provider', 'program.provider_id', 'provider.provider_id')\n\t\t\t->leftjoin('entity','provider.entity_id','entity.entity_id')\n\t\t\t->leftjoin('event_type', 'program.event_type_id', 'event_type.event_type_id')\n\t\t\t/*->join('entity', 'provider.entity_id', 'entity.entity_id')*/\n\n\t\t\t->leftjoin('schedule', 'course.course_id', 'schedule.course_id')\n\t\t\t->leftjoin('user', 'schedule.instructor_id', 'user.user_id')\n\t\t\t->leftjoin('activity', 'program.activity_id', 'activity.activity_id')\n\t\t\t->leftjoin('activity_classification', 'activity_classification.activity_classification_id', 'activity.activity_classification_id')\n\t\t\t//->groupBy('course.course_id','schedule.instructor_id','curriculum.curriculum_id','entity.logo', 'course.day_of_week','entity.name','curriculum.name','course.time_start', 'course.time_end','event_type.name')\n\t\t\t->groupBy(\n\t\t\t\tDB::raw('curriculum.curriculum_id, course.course_id, entity.logo, course.day_of_week, entity.name, curriculum.name, course.time_start, course.time_end' .\n\t\t\t\t\t(isset($conditions['sort']) && $conditions['sort'] !== null ? \", \" . $extraGroup : '' )\n\t\t\t\t)\n\t\t\t)\n\t\t\t->orderByRaw(isset($conditions['sort']) && $conditions['sort'] !== null ? $conditions['sort'] : 'course.day_of_week ASC, course.course_id DESC')\n\t\t\t->get();\n\n\t\t//echo(\"<br>Total : \" . sizeof($searchData) . \" records\");\n\t\tforeach ($searchData as $data) {\n\t\t\t/*echo('<br>' . $data->program_id . '|' . $data->program_name . '|'. $data->activity_id . '|' . $data->provider_name . '|' . $data->location_name);*/\n\t\t\t//echo('<br>' . $data->provider_id . '|' . $data->provider_name . '|' . $data->location_name);\n\n\n\t\t\t$day = DB::table('day_of_week')->where('day_of_week.day_of_week_id',$data->day_of_week)->first();\n\t\t\t$day = DB::table('day_of_week')->where('day_of_week.day_of_week_id',$data->day_of_week)->first();\n\n\n\t\t\t//echo('<br>' . $data->course_id . \"~\" . $data->program_name . '#'.$day->name. \"|\". date('h:i',strtotime($data->time_start)) . '-' .date('h:i',strtotime($data->time_end)));\n\t\t\t$item = ['course_id' => $data->course_id,\n\t\t\t\t'entity_logo' => ($data->entity_logo ? $data->entity_logo : $default_logo),\n\t\t\t\t'entity_name' => $data->entity_name,\n\t\t\t\t'curriculum_name' => $data->curriculum_name,\n\t\t\t\t'day_name' => $day->name,\n\t\t\t\t'time_start' => date('H:i',strtotime($data->time_start)),\n\t\t\t\t'time_end' => date('H:i',strtotime($data->time_end))];\n\n\t\t\t/*$schedules = DB::table('schedule')\n\t\t\t\t->select('schedule.schedule_id', 'program.name')\n\t\t\t\t->join('program', 'program.program_id', 'curriculum.program_id')\n\t\t\t\t->where('curriculum.curriculum_id', $data->curriculum_id)\n\t\t\t\t->orderBy('program.activity_id', 'DESC')\n\t\t\t\t->get();\n\n\t\t\tforeach ($schedules as $schedule) {\n\t\t\t\t//echo($program->program_id . '|' . $program->name );\n\t\t\t}*/\n\n\t\t\t$programs = DB::table('curriculum')\n\t\t\t\t->select('program.program_id', 'program.name')\n\t\t\t\t->join('program', 'program.program_id', 'curriculum.program_id')\n\t\t\t\t->where('curriculum.curriculum_id', $data->curriculum_id)\n\t\t\t\t->orderBy('program.activity_id', 'DESC')\n\t\t\t\t->get();\n\n\t\t\t$searchActivities = [];\n\t\t\tforeach ($programs as $program) {\n\t\t\t\t//echo($program->program_id . '|' . $program->name );\n\t\t\t\t$activities = DB::table('program')\n\t\t\t\t\t->select('activity.logo', 'program.provider_id', DB::raw('program.name program_name'))\n\t\t\t\t\t->join('activity', 'program.activity_id', 'activity.activity_id')\n\t\t\t\t\t->leftjoin('activity_classification', 'activity.activity_classification_id', 'activity_classification.activity_classification_id')\n\t\t\t\t\t->where('program.program_id', $program->program_id)\n\t\t\t\t\t->whereRaw(\n\t\t\t\t\t\t(isset($conditions['activity_id']) && $conditions['activity_id'] !== null ? \"program.activity_id in (\" . implode(\",\",$conditions['activity_id']) . \") AND \" : '') .\n\t\t\t\t\t\t(isset($conditions['activity_classification_id']) && $conditions['activity_classification_id'] !== null ? \"activity.activity_classification_id in (\" . implode(\",\",$conditions['activity_classification_id']) . \") AND \" : '') .\n\t\t\t\t\t\t(isset($conditions['activity_type_id']) && $conditions['activity_type_id'] !== null ? \"activity_classification.activity_type_id in (\" . implode(\",\",$conditions['activity_type_id']) . \") AND \" : '') .\n\t\t\t\t\t\t('program.status = 0')\n\t\t\t\t\t)\n\t\t\t\t\t//->groupBy('activity.logo')\n\t\t\t\t\t->get();\n\n\t\t\t\tforeach ($activities as $activity) {\n\t\t\t\t\t//echo('<img src=\"' . $activity->logo . '\" style=\"width:2%;\" alt=\"' . $activity->program_name . '\" title=\"' . $activity->program_name . '\">');\n\t\t\t\t\t$searchActivity = [\n\t\t\t\t\t\t'logo' => $activity->logo,\n\t\t\t\t\t\t'name' => $activity->program_name,\n\t\t\t\t\t];\n\t\t\t\t\tarray_push($searchActivities, $searchActivity);\n\t\t\t\t}\n\t\t\t}\n\t\t\tarray_push($result, array('item' => $item, 'activity' => $searchActivities));\n\t\t}\n\n\t\t$final = array('totalPage' => ceil(sizeof($searchAll)/$limit), 'total' => ( sizeof($searchAll) > 0 ? sizeof($searchAll) : 0), 'result' => $result, 'debug' => DB::getQueryLog()[0]['query']);\n\t\treturn $final;\n\t}",
"public function searchAction() {\n\t\t$modelName = $this->_getParam('model');\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$this->view->cols = $model->info('cols');\n\t\t$this->view->model = $this->_getParam('model');\n\t\t$this->view->config = Marcel_Backoffice_Config::getInstance()->getConfig();\n\t\t\n\t\tif ($this->_request->isPost()) {\n\t\t\t$fields = array();\n\t\t\t$func \t= array();\n\t\t\t$query \t= array();\n\t\t\tforeach ($_POST['query'] as $key => $q) {\n\t\t\t\tif (isset($_POST['fields'][$key]) && !empty($_POST['fields'][$key])) {\n\t\t\t\t\t$fields[$key] = $_POST['fields'][$key];\n\t\t\t\t\t$func[$key] \t= $_POST['func'][$key];\n\t\t\t\t\t$query[$key] \t= $_POST['query'][$key];\n\t\t\t\t}\n\t\t\t}\n\t\t\t$data = array('fields' => $fields, 'func' => $func, 'query' => $query);\n\t\t\t$data = serialize($data);\n\t\t\t$this->_helper->redirector('list', null, null, array('model' => $modelName, 'data' => $data));\n\t\t}\n\t}",
"public function all()\n {\n return $this->model->get();\n }",
"public function master_search() {\r\n $this->db->join(\r\n '__Vehicles', \r\n '__Vehicles.__ContactId = ' . $this->table_name. '.' . $this->contactId_fieldname ,\r\n 'left outer'\r\n ); \r\n return $this->get();\r\n }",
"public function getList()\n {\n return $this->model->getList();\n }",
"public function getItemsBy($params = false)\n {\n $query = $this->model->query();\n\n /*== RELATIONSHIPS ==*/\n if (in_array('*', $params->include)) {//If Request all relationships\n $query->with([]);\n } else {//Especific relationships\n $includeDefault = [];//Default relationships\n if (isset($params->include))//merge relations with default relationships\n $includeDefault = array_merge($includeDefault, $params->include);\n $query->with($includeDefault);//Add Relationships to query\n }\n\n /*== FILTERS ==*/\n if (isset($params->filter)) {\n $filter = $params->filter;//Short filter\n\n //Filter by date\n if (isset($filter->date)) {\n $date = $filter->date;//Short filter date\n $date->field = $date->field ?? 'created_at';\n if (isset($date->from))//From a date\n $query->whereDate($date->field, '>=', $date->from);\n if (isset($date->to))//to a date\n $query->whereDate($date->field, '<=', $date->to);\n }\n\n //Order by\n if (isset($filter->order)) {\n $orderByField = $filter->order->field ?? 'position';//Default field\n $orderWay = $filter->order->way ?? 'desc';//Default way\n $query->orderBy($orderByField, $orderWay);//Add order to query\n }\n\n // Filter By Menu\n if (isset($filter->menu)) {\n $query->where('menu_id', $filter->menu);\n }\n\n //add filter by search\n if (isset($filter->search)) {\n //find search in columns\n $query->where(function ($query) use ($filter) {\n $query->whereHas('translations', function ($query) use ($filter) {\n $query->where('locale', $filter->locale)\n ->where('title', 'like', '%' . $filter->search . '%');\n })->orWhere('id', 'like', '%' . $filter->search . '%')\n ->orWhere('updated_at', 'like', '%' . $filter->search . '%')\n ->orWhere('created_at', 'like', '%' . $filter->search . '%');\n });\n }\n\n }\n\n /*== FIELDS ==*/\n if (isset($params->fields) && count($params->fields))\n $query->select($params->fields);\n\n /*== REQUEST ==*/\n if (isset($params->page) && $params->page) {\n return $query->paginate($params->take);\n } else {\n $params->take ? $query->take($params->take) : false;//Take\n return $query->get();\n }\n }",
"public function getAll()\n {\n return $this->model->all();\n }",
"public function getAll()\n {\n return $this->model->all();\n }",
"public function getAll()\n {\n return $this->model->all();\n }",
"public function findBy(array $filters);",
"public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('model',$this->model,true);\n\t\t$criteria->compare('brand',$this->brand,true);\n\t\t$criteria->compare('status',$this->status,true);\n\t\t$criteria->compare('width',$this->width);\n\t\t$criteria->compare('height',$this->height);\n\t\t$criteria->compare('goods_thumb',$this->goods_thumb,true);\n\t\t$criteria->compare('goods_img',$this->goods_img,true);\n\t\t$criteria->compare('model_search',$this->model_search,true);\n\t\t$criteria->compare('brand_search',$this->brand_search,true);\n\t\t$criteria->compare('brand2',$this->brand2,true);\n\t\t$criteria->compare('brand2_search',$this->brand2_search,true);\n\t\t$criteria->compare('brand3',$this->brand3,true);\n\t\t$criteria->compare('brand3_search',$this->brand3_search,true);\n\t\t$criteria->compare('brand4',$this->brand4,true);\n\t\t$criteria->compare('brand4_search',$this->brand4_search,true);\n\t\t$criteria->compare('model2',$this->model2,true);\n\t\t$criteria->compare('model2_search',$this->model2_search,true);\n\t\t$criteria->compare('model3',$this->model3,true);\n\t\t$criteria->compare('model3_search',$this->model3_search,true);\n\t\t$criteria->compare('model4',$this->model4,true);\n\t\t$criteria->compare('model4_search',$this->model4_search,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"public function getList($params = [])\n {\n $model = $this->prepareModel();\n return $model::all();\n }",
"abstract protected function getSearchModelName(): string;",
"public function getItemsCriteria() {}",
"public function getItemsCriteria() {}",
"public function getFilters();",
"public static function getList(array $filters){\n return self::model()->findAllByAttributes($filters);\n }",
"public function getSearch();",
"public function search()\n {\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('url', $this->url);\n $criteria->compare('type', $this->type);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n 'pagination' => array('pageSize' => 100),\n ));\n }",
"public function actionList() {\n switch ($_GET['model']) {\n case 'Product':\n $models = Product::model()->findAll();\n break;\n case 'Vendor':\n $models = Vendor::model()->findAll();\n break;\n case 'FavoriteProduct':\n $models = FavoriteProduct::model()->findAll();\n break;\n case 'Order':\n $models = Order::model()->findAll();\n break;\n case 'Rating':\n $models = Rating::model()->findAll();\n break;\n case 'Review':\n $models = Review::model()->findAll();\n break;\n case 'UserAddress':\n $models = UserAddress::model()->findAll();\n break;\n case 'OrderDetail':\n $models = OrderDetail::model()->findAll();\n break;\n default:\n $this->_sendResponse(0, 'You have pass invalid modal name');\n Yii::app()->end();\n }\n // Did we get some results?\n if (empty($models)) {\n // No\n $this->_sendResponse(0, 'No Record found ');\n } else {\n // Prepare response\n $rows = array();\n $i = 0;\n foreach ($models as $model) {\n $rows[] = $model->attributes;\n if ($_GET['model'] == 'Order') {\n $rows[$i]['cart_items'] = Product::model()->getProducts($model->product_id);\n $rows[$i]['order_detail'] = OrderDetail::model()->findAll(array('condition' => 'order_id ='.$model->id));\n }\n $i = $i + 1;\n }\n // Send the response\n $this->_sendResponse(1, '', $rows);\n }\n }",
"static public function filterData($model_name)\n {\n $query = \"{$model_name}Query\";\n $objects = $query::create()->find();\n \n if ($objects != null) {\n\n $array = array();\n foreach ($objects as $object) {\n $array[$object->getId()] = $object->__toString();\n }\n\n return $array;\n } else {\n return array();\n }\n }",
"public static function getList(string $filter='')\n {\n $query = self::with(['product','insuredPerson','agency'])->whereNotNull('n_OwnerId_FK');\n\n $filterArray = json_decode(request('filter'));\n\n if (is_object($filterArray)) {\n foreach($filterArray as $key=>$value) {\n if (empty($value)) {\n continue;\n }\n if (is_array($value)) {\n $query->whereIn($key, $value);\n continue;\n }\n $query->where($key, 'like', \"%$value%\");\n }\n }\n return $query;\n }",
"public function getCriteria();",
"public static function getSearchable()\n {\n return [\n 'columns' => [],\n 'joins' => [\n \n ]\n ];\n }",
"static function filter($model) {\n $cond = Session::get('filter', strtolower($model->source));\n $param = array(\n /* Relaciones */\n 'rel' => array(\n '=' => 'Igual',\n 'LIKE' => 'Parecido',\n '<>' => 'Diferente',\n '<' => 'Menor',\n '>' => 'Mayor'\n ),\n 'col' => array_diff($model->fields, $model->_at, $model->_in, $model->primary_key),\n 'model' => $model,\n 'cond' => $cond\n );\n ob_start();\n View::partial('backend/filter', false, $param);\n return ob_get_clean();\n }",
"public function findByModelName($model_name);",
"abstract public function getFieldsSearchable();",
"function _get_by_related($model, $arguments = array())\r\n\t{\r\n\t\tif ( ! empty($model))\r\n\t\t{\r\n\t\t\t// Add model to start of arguments\r\n\t\t\t$arguments = array_merge(array($model), $arguments);\r\n\t\t}\r\n\r\n\t\t$this->_related('where', $arguments);\r\n\r\n\t\treturn $this->get();\r\n\t}",
"public static function getModels()\n\t{\n\t\t$result = [];\n\t\t$path = __DIR__ . DIRECTORY_SEPARATOR . 'model' . DIRECTORY_SEPARATOR;\n\t\t$Iterator = new RecursiveDirectoryIterator($path);\n\t\t$objects = new RecursiveIteratorIterator($Iterator, RecursiveIteratorIterator::SELF_FIRST);\n\t\tforeach ($objects as $name => $object)\n\t\t{\n\t\t\tif (strtolower(substr($name, -4) != '.php'))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$name = strtolower(str_replace($path, '', substr($name, 0, strlen($name) - 4)));\n\t\t\t$name = str_replace(DIRECTORY_SEPARATOR, '\\\\', $name);\n\t\t\t$name = 'Model\\\\' . ucwords($name, '\\\\');\n\t\t\tif (class_exists($name))\n\t\t\t{\n\t\t\t\t$result[]= $name;\n\t\t\t}\n\t\t}\n\t\treturn $result;\n\t}",
"public function autocomplete_search() {\n\tif (!empty($this->request->query['term'])) {\n\t $model = Inflector::camelize(Inflector::singularize($this->request->params['controller']));\n\t $my_models = $this->$model->find('all', array(\n\t\t 'conditions' => array($model . '.name LIKE' => $this->request->query['term'] . '%'),\n\t\t 'limit' => 10,\n\t\t 'contain' => false,\n\t\t\t ));\n\t $json_array = array();\n\t foreach ($my_models as $my_model) {\n\t\t$json_array[] = $my_model[$model];\n\t }\n\t $json_str = json_encode($json_array);\n\t $this->autoRender = false;\n\t return $json_str;\n\t}\n }",
"public function getListQuery();",
"public function search($model, $request)\n {\n $search = filter_var($request->get('search'), FILTER_SANITIZE_STRING);\n\n // Get optional filters\n // FILTER: GEOLOCATION\n if($request->input('location')) {\n $location = filter_var($request->get('location'), FILTER_SANITIZE_STRING);\n }\n if($request->input('geo_lat')) {\n $geo_lat = filter_var($request->get('geo_lat'), FILTER_SANITIZE_STRING);\n $geo_lng = filter_var($request->get('geo_lng'), FILTER_SANITIZE_STRING);\n }\n\n /**\n * Get current page number for location manual Pagination\n */\n $page = $request->get('page') ? $request->get('page') : 1;\n\n\n // Location first, since it's a special query\n if(isset($geo_lat) && isset($geo_lng)) {\n \n $location_data = Posts::location($geo_lat, $geo_lng, $search, 25, 100); \n\n // Hard and dirty search function through collection\n // since search with location method doesn't work still\n if($search !== '') {\n $location_data = $location_data->filter(function ($item) use ($search) {\n return stripos($item->name, $search) !== false;\n });\n }\n\n // Paginate results because location method can't\n $paginate = new Paginate;\n return $paginate->paginate($location_data, 15, $page, [\n 'path' => '/search/'\n ]);\n\n } \n // Section selection handler (brands/shops/prods/strains)\n elseif($search)\n {\n return $model->where('name', 'like', \"%$search%\");\n }\n\n }",
"public function getWorkFlowModels()\n {\n return $this->postRequest('GetWorkFlowModels');\n }",
"public function getList()\n {\n $filter = $this->getEvent()->getRouteMatch()->getParam('filter', null);\n return $this->getService()\n ->getList($filter);\n }",
"private function _getAllModels(): array {\n\t\t$models = Array();\n\t\t$folder = Environment::$dirs->models;\n\t\t$files = array_diff(scandir($folder), array('.', '..'));\n\t\tforeach ($files as $fileName) {\n\t\t\tinclude_once($folder.DIRECTORY_SEPARATOR.$fileName);\n\t\t\t$className = basename($fileName, \".php\");\n\t\t\t$classNameNamespaced = \"\\\\Jeff\\\\Api\\\\Models\\\\\" . ucfirst($className);\n\t\t\t$model = new $classNameNamespaced($this->db, $this->account);\n\t\t\t$models[$model->modelNamePlural] = $model;\n\t\t}\n\t\treturn $models;\n\t}",
"function getAll(){\n\n\t\t\t$this->db->order_by(\"status\", \"asc\");\n\t\t\t$query = $this->db->get_where($this->table);\n\t\t\treturn $query;\n\t\t}",
"public function actionViewModelList($modelName)\n\t{\n\t\t$pageSize = BaseModel::PAGE_SIZE;\n\t\tif ($_POST[\"sortBy\"]) {\n\t\t\t$order = $_POST[\"sortBy\"];\n\t\t}\n\t\t//echo $order;\n\t\t/*if (!$modelName) {\n\t\t\t\n\t\t}*/\n\t\t$sess_data = Yii::app()->session->get($modelName.'search');\n\t\t$searchId = $_GET[\"search_id\"];\n\t\t$fromSearchId = TriggerValues::model() -> decodeSearchId($searchId);\n\t\t//print_r($fromSearchId);\n\t\t//echo \"<br/>\";\n\t\t//Если задан $_POST/GET с формы, то сливаем его с массивом из searchId с приоритетом у searchId\n\t\tif ($_POST[$modelName.'SearchForm'])\n\t\t{\n\t\t\t$fromPage = array_merge($_POST[$modelName.'SearchForm'], $fromSearchId);\n\t\t} else {\n\t\t\t//Если же он не задан, то все данные берем из searchId\n\t\t\t$fromPage = $fromSearchId;\n\t\t}\n\t\t//print_r($fromPage);\n\t\tif ((!$fromPage)&&(!$sess_data))\n\t\t{\n\t\t\t//Если никаких критереев не задано, то выдаем все модели.\n\t\t\t$searched = $modelName::model() -> userSearch(array(),$order);\n\t\t} else {\n\t\t\tif ($_GET[\"clear\"]==1)\n\t\t\t{\n\t\t\t\t//Если критерии заданы, но мы хотим их сбросить, то снова выдаем все и обнуляем нужную сессию\n\t\t\t\tYii::app()->session->remove($modelName.'search');\n\t\t\t\t$page = 1;\n\t\t\t\t//was://$searched = $modelName::model() -> userSearch(array(),$order);\n\t\t\t\t$searched = $modelName::model() -> userSearch($fromSearchId,$order);\n\t\t\t} else {\n\t\t\t\t//Если же заданы какие-то критерии, но не со страницы, то вместо них подаем данные из сессии\n\t\t\t\tif (!$fromPage)\n\t\t\t\t{\n\t\t\t\t\t$fromPage = $sess_data;\n\t\t\t\t\t//echo \"from session\";\n\t\t\t\t}\n\t\t\t\t//Адаптируем критерии под специализацию. Если для данной специализации нет какого-то критерия, а он где-то сохранен, то убираем его.\n\t\t\t\t$fromPage = Filters::model() -> FilterSearchCriteria($fromPage, $modelName);\n\t\t\t\t//Если критерии заданы и обнулять их не нужно, то запускаем поиск и сохраняем его критерии в сессию.\n\t\t\t\tYii::app()->session->add($modelName.'search',$fromPage);\n\t\t\t\t$searched = $modelName::model() -> userSearch($fromPage,$order);\n\t\t\t}\n\t\t}\n\t\t//делаем из массива объектов dataProvider\n $dataProvider = new CArrayDataProvider($searched['objects'],\n array( 'keyField' =>'id'\n ));\n\t\t$this -> layout = 'layoutNoForm';\n\t\t//Определяем страницу.\n\t\t$maxPage = ceil(count($searched['objects'])/$pageSize);\n\t\tif ($_GET[\"page\"]) {\n\t\t\t$_POST[\"page\"] = $_GET[\"page\"];\n\t\t}\n\t\t$page = $_POST[\"page\"] ? $_POST[\"page\"] : 1;\n\t\t$page = (($page >= 1)&&($page <= $maxPage)) ? $page : 1;\n\t\t$_POST[$modelName.'SearchForm'] = $fromPage;\n\t\t$this->render('show_list', array(\n\t\t\t'objects' => array_slice($searched['objects'],($page - 1) * $pageSize, $pageSize),\n\t\t\t'modelName' => $modelName,\n\t\t\t'filterForm' => $modelName::model() -> giveFilterForm($fromPage),\n\t\t\t'fromPage' => $fromPage,\n\t\t\t'description' => $searched['description'],\n\t\t\t'specialities' => Filters::model() -> giveSpecialities(),\n\t\t\t'page' => $page,\n\t\t\t'maxPage' => $maxPage,\n\t\t\t'total' => count($searched['objects'])\n\t\t));\n\t\t\n\t}",
"public function search_through(Request $request)\n {\n $reports = Payment::query();\n\n if (!empty($request->query())) {\n foreach ($request->query() as $key => $value) {\n if ($key == 'date') {\n $reports->whereDate('created_at', '>=', $value);\n } else {\n $reports->where($key, $value);\n }\n }\n }\n\n return $reports->get();\n }",
"public function models($query, array $options = [])\n {\n $hits = $this->run($query);\n list($models, $totalCount) = $this->search->config()->models($hits, $options);\n // Remember total number of results.\n $this->setCachedCount($query, $totalCount);\n\n return Collection::make($models);\n }",
"public function index()\n {\n $this->repository->pushCriteria(app('Prettus\\Repository\\Criteria\\RequestCriteria'));\n return $this->repository->all();\n }",
"public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n \n $criteria->with=array('c','b');\n\t\t$criteria->compare('pid',$this->pid,true);\n\t\t$criteria->compare('t.cid',$this->cid,true);\n\t\t$criteria->compare('t.bid',$this->bid,true);\n\n $criteria->compare('c.classify_name',$this->classify,true);\n\t\t$criteria->compare('b.brand_name',$this->brand,true);\n \n $criteria->addCondition('model LIKE :i and model REGEXP :j');\n $criteria->params[':i'] = \"%\".$this->index_search.\"%\";\n $criteria->params[':j'] = \"^\".$this->index_search;\n\n \n\t\t$criteria->compare('model',$this->model,true);\n\t\t$criteria->compare('package',$this->package,true);\n\t\t$criteria->compare('RoHS',$this->RoHS,true);\n\t\t$criteria->compare('datecode',$this->datecode,true);\n\t\t$criteria->compare('quantity',$this->quantity);\n\t\t$criteria->compare('direction',$this->direction,true);\n $criteria->compare('image_url',$this->image_url,true);\n\t\t$criteria->compare('create_time',$this->create_time,true);\n\t\t$criteria->compare('status',$this->status);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"public function queryset(){\n return $this->_get_queryset();\n }",
"public function index(Request $request)\n {\n $keyword = $request->get('search');\n $perPage = $request->get('limit');\n $perPage = empty($perPage) ? 25 : $perPage;\n\n if (!empty($keyword)) {\n $filters = Filter::where('sl_gender', 'LIKE', \"%$keyword%\")\n ->orWhere('sl_min_price', 'LIKE', \"%$keyword%\")\n ->orWhere('sl_max_price', 'LIKE', \"%$keyword%\")\n ->orWhere('sl_color', 'LIKE', \"%$keyword%\")\n ->orWhere('sl_occasion', 'LIKE', \"%$keyword%\")\n ->orWhere('sl_style', 'LIKE', \"%$keyword%\")\n ->orWhere('wg_age', 'LIKE', \"%$keyword%\")\n ->orWhere('wg_min_price', 'LIKE', \"%$keyword%\")\n ->orWhere('wg_max_price', 'LIKE', \"%$keyword%\")\n ->orWhere('wg_date_from', 'LIKE', \"%$keyword%\")\n ->orWhere('wg_date_to', 'LIKE', \"%$keyword%\")\n ->orWhere('wg_city_id', 'LIKE', \"%$keyword%\")\n ->orWhere('user_id', 'LIKE', \"%$keyword%\")\n ->paginate($perPage);\n } else {\n $filters = Filter::paginate($perPage);\n }\n\n return $filters;\n }",
"public function getList(\\Magento\\Framework\\Api\\SearchCriteriaInterface $searchCriteria);",
"public function getList(\\Magento\\Framework\\Api\\SearchCriteriaInterface $searchCriteria);",
"public function getList(\\Magento\\Framework\\Api\\SearchCriteriaInterface $searchCriteria);",
"public function getSearchCriterias()\n {\n return $this->_searchCriterias;\n }",
"private function getSearchConditions()\n {\n $searchConditions = [];\n\n $userIds = $this->request->get('ids') ?? [];\n if ($userIds) {\n $searchConditions['id'] = $userIds;\n }\n\n $email = $this->request->get('email') ?? '';\n if ($email) {\n $searchConditions['email'] = $email;\n }\n\n return $searchConditions;\n }",
"public function findAllAction();",
"public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('entity_id', $this->entity_id);\n $criteria->compare('dbname', $this->dbname, true);\n $criteria->compare('isfiltered', $this->isfiltered);\n $criteria->compare('filtertype', $this->filtertype);\n $criteria->compare('alias', $this->alias, true);\n $criteria->compare('enabled', $this->enabled);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n 'pagination' => false,\n ));\n }",
"function GetFilterList() {\n\t\tglobal $UserProfile;\n\n\t\t// Initialize\n\t\t$sFilterList = \"\";\n\t\t$sSavedFilterList = \"\";\n\n\t\t// Load server side filters\n\t\tif (EW_SEARCH_FILTER_OPTION == \"Server\" && isset($UserProfile))\n\t\t\t$sSavedFilterList = $UserProfile->GetSearchFilters(CurrentUserName(), \"fsolicitudlistsrch\");\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id->AdvancedSearch->ToJson(), \",\"); // Field id\n\t\t$sFilterList = ew_Concat($sFilterList, $this->nombre_contacto->AdvancedSearch->ToJson(), \",\"); // Field nombre_contacto\n\t\t$sFilterList = ew_Concat($sFilterList, $this->name->AdvancedSearch->ToJson(), \",\"); // Field name\n\t\t$sFilterList = ew_Concat($sFilterList, $this->lastname->AdvancedSearch->ToJson(), \",\"); // Field lastname\n\t\t$sFilterList = ew_Concat($sFilterList, $this->_email->AdvancedSearch->ToJson(), \",\"); // Field email\n\t\t$sFilterList = ew_Concat($sFilterList, $this->address->AdvancedSearch->ToJson(), \",\"); // Field address\n\t\t$sFilterList = ew_Concat($sFilterList, $this->phone->AdvancedSearch->ToJson(), \",\"); // Field phone\n\t\t$sFilterList = ew_Concat($sFilterList, $this->cell->AdvancedSearch->ToJson(), \",\"); // Field cell\n\t\t$sFilterList = ew_Concat($sFilterList, $this->created_at->AdvancedSearch->ToJson(), \",\"); // Field created_at\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id_sucursal->AdvancedSearch->ToJson(), \",\"); // Field id_sucursal\n\t\t$sFilterList = ew_Concat($sFilterList, $this->tipoinmueble->AdvancedSearch->ToJson(), \",\"); // Field tipoinmueble\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id_ciudad_inmueble->AdvancedSearch->ToJson(), \",\"); // Field id_ciudad_inmueble\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id_provincia_inmueble->AdvancedSearch->ToJson(), \",\"); // Field id_provincia_inmueble\n\t\t$sFilterList = ew_Concat($sFilterList, $this->tipovehiculo->AdvancedSearch->ToJson(), \",\"); // Field tipovehiculo\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id_ciudad_vehiculo->AdvancedSearch->ToJson(), \",\"); // Field id_ciudad_vehiculo\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id_provincia_vehiculo->AdvancedSearch->ToJson(), \",\"); // Field id_provincia_vehiculo\n\t\t$sFilterList = ew_Concat($sFilterList, $this->tipomaquinaria->AdvancedSearch->ToJson(), \",\"); // Field tipomaquinaria\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id_ciudad_maquinaria->AdvancedSearch->ToJson(), \",\"); // Field id_ciudad_maquinaria\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id_provincia_maquinaria->AdvancedSearch->ToJson(), \",\"); // Field id_provincia_maquinaria\n\t\t$sFilterList = ew_Concat($sFilterList, $this->tipomercaderia->AdvancedSearch->ToJson(), \",\"); // Field tipomercaderia\n\t\t$sFilterList = ew_Concat($sFilterList, $this->documento_mercaderia->AdvancedSearch->ToJson(), \",\"); // Field documento_mercaderia\n\t\t$sFilterList = ew_Concat($sFilterList, $this->tipoespecial->AdvancedSearch->ToJson(), \",\"); // Field tipoespecial\n\t\t$sFilterList = ew_Concat($sFilterList, $this->email_contacto->AdvancedSearch->ToJson(), \",\"); // Field email_contacto\n\t\tif ($this->BasicSearch->Keyword <> \"\") {\n\t\t\t$sWrk = \"\\\"\" . EW_TABLE_BASIC_SEARCH . \"\\\":\\\"\" . ew_JsEncode2($this->BasicSearch->Keyword) . \"\\\",\\\"\" . EW_TABLE_BASIC_SEARCH_TYPE . \"\\\":\\\"\" . ew_JsEncode2($this->BasicSearch->Type) . \"\\\"\";\n\t\t\t$sFilterList = ew_Concat($sFilterList, $sWrk, \",\");\n\t\t}\n\t\t$sFilterList = preg_replace('/,$/', \"\", $sFilterList);\n\n\t\t// Return filter list in json\n\t\tif ($sFilterList <> \"\")\n\t\t\t$sFilterList = \"\\\"data\\\":{\" . $sFilterList . \"}\";\n\t\tif ($sSavedFilterList <> \"\") {\n\t\t\tif ($sFilterList <> \"\")\n\t\t\t\t$sFilterList .= \",\";\n\t\t\t$sFilterList .= \"\\\"filters\\\":\" . $sSavedFilterList;\n\t\t}\n\t\treturn ($sFilterList <> \"\") ? \"{\" . $sFilterList . \"}\" : \"null\";\n\t}",
"public function search(Request $request)\n {\n if(!$request->has('query')) {\n return response()->json(['message' => 'Please type a keyword.']);\n }\n\n $userTenant = Auth::userTenant();\n $user = Auth::user();\n\n $searchableModelNameSpace = 'App\\\\Models\\\\';\n $result = [];\n // Loop through the searchable models.\n foreach (config('scout.searchableModels') as $model) {\n $modelClass = $searchableModelNameSpace.$model;\n $modelService = app($model.'Ser');\n\n if($model == 'Task') {\n $allowedModels = $modelService->searchForUserTenant($userTenant, $request->get('query'))->get();\n } else {\n $foundModels = $modelClass::search($request->get('query'))->get();\n if ($model === 'Comment') {\n $foundModels->where('groupId', '!=', null)->toArray();\n }\n $policy = app()->make('App\\Policies\\V2\\\\' . $model . 'Policy');\n $allowedModels = $foundModels->filter(function(BaseModel $foundModel) use($user, $policy) {\n return $policy->getAccess($user, $foundModel);\n });\n }\n\n $result[Str::lower($model) . 's'] = $allowedModels;\n }\n\n $responseData = ['message' => 'Keyword(s) matched!', 'results' => $result, 'pagination' => ['more' => false]];\n $responseHeader = Response::HTTP_OK;\n if (!count($result)) {\n $responseData = ['message' => 'No results found, please try with different keywords.'];\n $responseHeader = Response::HTTP_NOT_FOUND;\n }\n\n return response()->json($responseData, $responseHeader);\n }",
"public function getAndFilter() {\n\t\treturn $this->db->getAndFilter();\n\t}"
] | [
"0.6745192",
"0.6745192",
"0.6607936",
"0.6480248",
"0.6380478",
"0.6346251",
"0.6309924",
"0.6302481",
"0.62549895",
"0.62511677",
"0.62511677",
"0.6111791",
"0.60769993",
"0.60728127",
"0.60465515",
"0.60351735",
"0.6033834",
"0.601554",
"0.5982608",
"0.59806865",
"0.5979308",
"0.5970091",
"0.59315383",
"0.5928182",
"0.59239197",
"0.5891605",
"0.588925",
"0.5849558",
"0.58478904",
"0.58265656",
"0.5818011",
"0.5813345",
"0.5808009",
"0.5790819",
"0.57766616",
"0.57694167",
"0.5765023",
"0.57642305",
"0.57522315",
"0.5740738",
"0.5738047",
"0.5727545",
"0.5724201",
"0.5723084",
"0.57225823",
"0.5721401",
"0.5718913",
"0.5714439",
"0.5712011",
"0.5707315",
"0.5694636",
"0.5680138",
"0.56711453",
"0.5670484",
"0.56703377",
"0.56703377",
"0.56703377",
"0.5669673",
"0.56673825",
"0.56659126",
"0.5656451",
"0.5651109",
"0.56498116",
"0.564325",
"0.5635642",
"0.5633513",
"0.56310356",
"0.56235486",
"0.56176996",
"0.5612909",
"0.560956",
"0.5595046",
"0.5579938",
"0.557241",
"0.5556209",
"0.5550101",
"0.55487776",
"0.5547998",
"0.5547349",
"0.5535324",
"0.5534813",
"0.55342954",
"0.55319065",
"0.5525128",
"0.55199116",
"0.5518253",
"0.55144674",
"0.5509604",
"0.55057275",
"0.550087",
"0.550019",
"0.54966915",
"0.54966915",
"0.54966915",
"0.54954666",
"0.54937917",
"0.5492664",
"0.5492298",
"0.5490264",
"0.5489261",
"0.54850507"
] | 0.0 | -1 |
Warning: Please modify the following code to remove attributes that | public function searchHints($event_id)
{
// should not be searched.
$criteria=new CDbCriteria;
$criteria->compare('nood_envelop_ID',$this->nood_envelop_ID);
$criteria->compare('nood_envelop_name',$this->nood_envelop_name,true);
$criteria->compare('event_ID',$this->event_ID);
$criteria->condition = 'event_ID=:event_id';
$criteria->params=array(':event_id'=>$event_id);
$criteria->order= 'route_ID ASC, nood_envelop_volgorde ASC';
$criteria->compare('route_ID',$this->route_ID);
$criteria->compare('nood_envelop_volgorde',$this->nood_envelop_volgorde);
$criteria->compare('coordinaat',$this->coordinaat,true);
$criteria->compare('opmerkingen',$this->opmerkingen,true);
$criteria->compare('score',$this->score);
$criteria->compare('create_time',$this->create_time,true);
$criteria->compare('create_user_ID',$this->create_user_ID);
$criteria->compare('update_time',$this->update_time,true);
$criteria->compare('update_user_ID',$this->update_user_ID);
return new CActiveDataProvider($this, array(
'criteria'=>$criteria,
));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function removeBlacklistedAttributes($attribs) \n { \n $this->_html = preg_replace('/[\\s]+('.$attribs.')=[\\s]*(\"[^\"]*\"|\\'[^\\']*\\')/i',\"\",$this->_html); \n $this->_html = preg_replace('/[\\s]+('.$attribs.')=[\\s]*[^ |^>]*/i',\"\",$this->_html); \n }",
"public function removeAttributes()\n\t{\n\t\tforeach ($this->argsArray(func_get_args()) as $a) {\n\t\t\t$this->removed_attrs[] = $a;\n\t\t}\n\t}",
"abstract protected function attributes();",
"public function removeAllAttributes()\n {\n $this->attr = [];\n }",
"private function function_die(){\n\t\tunset($this->attributes);\n\t}",
"public function clearAttributes ()\n {\n\n $this->attributes = null;\n $this->attributes = array();\n\n }",
"public function __unset($name)\n {\n // Dont' allow to unset attributes Ruts\n }",
"function DOM_delete_empty_attributes() {\r\n\t\t$query = '//' . ReTidy::get_html_namespace() . '*[@*=\"\"]';\r\n\t\t$tags_with_empty_attribute = $this->xpath->query($query);\r\n\t\tforeach($tags_with_empty_attribute as $tag) {\r\n\t\t\t$tagName = $tag->nodeName;\r\n\t\t\t$array_attributes = DTD::getAttributesForElementByType($tagName, \"#IMPLIED\");\r\n\t\t\tforeach($tag->attributes as $attribute) {\r\n\t\t\t\tif(strlen($attribute->nodeValue) === 0) {\r\n\t\t\t\t\tforeach($array_attributes as $attribute2){\r\n\t\t\t\t\t\tif($attribute->nodeName === $attribute2) {\r\n\t\t\t\t\t\t\t$attribute->nodeValue = \"XXX9o9stripme9o9XXX\";\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"function getAttributes()\n {\n }",
"public function attributes();",
"function remove_image_alignment( $attributes ) {\n $attributes['class'] = str_replace( 'alignleft', 'alignnone', $attributes['class'] );\n\treturn $attributes;\n}",
"function non_inline_attributes() {\r\n\t\t$this->code = preg_replace('/<span([^>]*) align=\"[^\"]*\"([^>]*)>/is', '<span$1$2>', $this->code);\r\n\t\t$this->code = preg_replace('/<span([^>]*) style=\"([^\"]*)text-align\\s*:\\s*[^;]*;([^\"]*)\"([^>]*)>/is', '<span$1 style=\"$2$3\"$4>', $this->code);\r\n\t}",
"protected function getUnsafeAttributes()\n\t{\n\t\treturn array_merge(parent::getUnsafeAttributes(), [\n\t\t\t'checked',\n\t\t]);\n\t}",
"public function unsetAllAttributeValue()\n {\n foreach ($this->attributes as $key=>$val) {\n $this->$key = null;\n }\n }",
"function getAdditionalAttributes() ;",
"function GetAttributes();",
"function be_remove_image_alignment( $attributes ) {\r\n $attributes['class'] = str_replace( 'alignleft', 'aligncenter', $attributes['class'] );\r\n\treturn $attributes;\r\n}",
"function rocket_lazyload_exclude_class( $attributes ) {\n\t$attributes[] = 'class=\"custom-logo\"';\n // custom-logo\n\n\treturn $attributes;\n}",
"function remove_attachment_title_attr( $attr ) {\n\tunset($attr['title']);\n\treturn $attr;\n}",
"function protected_attributes() {\n\t\treturn array();\n\n\t}",
"public function remove_attribute($name)\n {\n }",
"protected function filter_attributes()\n\t{\n\t\t$filter = array_flip(array('type', 'split', 'align'));\n\t\t\n\t\t$attrs = $this->manager->attrs();\n\t\t\n\t\t$this->btn_attrs = array_diff_key($attrs, $filter);\n\t\t$this->manager->attrs(array_intersect_key($attrs, $filter));\n\t}",
"protected function _ensureInheritedAttributes() {}",
"function filterAttr($attrSet) {\t\n\t\t$newSet = array();\n\t\t// process attributes\n\t\tfor ($i = 0; $i <count($attrSet); $i++) {\n\t\t\t// skip blank spaces in tag\n\t\t\tif (!$attrSet[$i]) continue;\n\t\t\t// split into attr name and value\n\t\t\t$attrSubSet = explode('=', trim($attrSet[$i]));\n\t\t\tlist($attrSubSet[0]) = explode(' ', $attrSubSet[0]);\n\t\t\t// removes all \"non-regular\" attr names AND also attr blacklisted\n\t\t\t//////\n\t\t\t///// NEEDS FIX!!! eregi zu preg_match umgeschrieben... stimmt das noch??? ////\n\t\t\t/////\n\t\t\tif ((!preg_match(\"^[a-z]*$\",$attrSubSet[0])) || (($this->xssAuto) && ((in_array(strtolower($attrSubSet[0]), $this->attrBlacklist)) || (substr($attrSubSet[0], 0, 2) == 'on')))) \n\t\t\t\tcontinue;\n\t\t\t// xss attr value filtering\n\t\t\tif ($attrSubSet[1]) {\n\t\t\t\t// strips unicode, hex, etc\n\t\t\t\t$attrSubSet[1] = str_replace('&#', '', $attrSubSet[1]);\n\t\t\t\t// strip normal newline within attr value\n\t\t\t\t$attrSubSet[1] = preg_replace('/\\s+/', '', $attrSubSet[1]);\n\t\t\t\t// strip double quotes\n\t\t\t\t$attrSubSet[1] = str_replace('\"', '', $attrSubSet[1]);\n\t\t\t\t// [requested feature] convert single quotes from either side to doubles (Single quotes shouldn't be used to pad attr value)\n\t\t\t\tif ((substr($attrSubSet[1], 0, 1) == \"'\") && (substr($attrSubSet[1], (strlen($attrSubSet[1]) - 1), 1) == \"'\"))\n\t\t\t\t\t$attrSubSet[1] = substr($attrSubSet[1], 1, (strlen($attrSubSet[1]) - 2));\n\t\t\t\t// strip slashes\n\t\t\t\t$attrSubSet[1] = stripslashes($attrSubSet[1]);\n\t\t\t}\n\t\t\t// auto strip attr's with \"javascript:\n\t\t\tif (\t((strpos(strtolower($attrSubSet[1]), 'expression') !== false) &&\t(strtolower($attrSubSet[0]) == 'style')) ||\n\t\t\t\t\t(strpos(strtolower($attrSubSet[1]), 'javascript:') !== false) ||\n\t\t\t\t\t(strpos(strtolower($attrSubSet[1]), 'behaviour:') !== false) ||\n\t\t\t\t\t(strpos(strtolower($attrSubSet[1]), 'vbscript:') !== false) ||\n\t\t\t\t\t(strpos(strtolower($attrSubSet[1]), 'mocha:') !== false) ||\n\t\t\t\t\t(strpos(strtolower($attrSubSet[1]), 'livescript:') !== false) \n\t\t\t) continue;\n\n\t\t\t// if matches user defined array\n\t\t\t$attrFound = in_array(strtolower($attrSubSet[0]), $this->attrArray);\n\t\t\t// keep this attr on condition\n\t\t\tif ((!$attrFound && $this->attrMethod) || ($attrFound && !$this->attrMethod)) {\n\t\t\t\t// attr has value\n\t\t\t\tif ($attrSubSet[1]) $newSet[] = $attrSubSet[0] . '=\"' . $attrSubSet[1] . '\"';\n\t\t\t\t// attr has decimal zero as value\n\t\t\t\telse if ($attrSubSet[1] == \"0\") $newSet[] = $attrSubSet[0] . '=\"0\"';\n\t\t\t\t// reformat single attributes to XHTML\n\t\t\t\telse $newSet[] = $attrSubSet[0] . '=\"' . $attrSubSet[0] . '\"';\n\t\t\t}\t\n\t\t}\n\t\treturn $newSet;\n\t}",
"public function moveHtmlAttributesToAdditionalArguments() {}",
"private function renameOldAttributes()\n {\n if ($this->mageVersion < '2.2.5') {\n $attributes = $this->attrNames;\n foreach ($attributes as $key => $attr) {\n $isExist = $this->eavConfig->getAttribute('catalog_product', 'wwe_'.$attr.'')->getAttributeId();\n if ($isExist != null) {\n $updateSql = \"UPDATE \".$this->tableNames['eav_attribute'].\" \"\n . \"SET attribute_code = 'en_\".$attr.\"', is_required = 0 \"\n . \"WHERE attribute_code = 'wwe_\".$attr.\"'\";\n $this->connection->query($updateSql);\n }\n }\n }\n }",
"abstract function attributes(): array;",
"public function getReservedForFutureUse1Attribute(){}",
"function omega_enforce_attributes(&$variables) {\n // Copy over the classes array into the attributes array.\n if (!empty($variables['classes_array'])) {\n $variables['attributes_array']['class'] = !empty($variables['attributes_array']['class']) ? array_merge($variables['attributes_array']['class'], $variables['classes_array']) : $variables['classes_array'];\n $variables['attributes_array']['class'] = array_unique($variables['attributes_array']['class']);\n }\n\n // Sync that with the classes array. Remember: We don't recommend using it.\n if (!empty($variables['attributes_array']['class'])) {\n $variables['classes_array'] = $variables['attributes_array']['class'];\n }\n}",
"public function sanitizeAttributes( $attributes, $meta )\n\t\t{\n\t\t\t$attributes = parent::sanitizeAttributes( $attributes, $meta );\n\t\t\t$attributes['columns'] = [];\n\t\t\tunset( $attributes[ 'sections' ] );\n\t\t\treturn $attributes;\n\t\t}",
"protected function collect_attributes() {\n\t\tforeach ( $this->properties as $key => $val ) {\n\t\t\tif ( in_array($key, self::$global_attributes) || in_array($key, static::$element_attributes) ) {\n\t\t\t\t$this->attributes[ $key ] = $val;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// also check for compound attributes, such as data-src, aria-required, etc.\n\t\t\tforeach ( self::$global_attribute_pattern_prefixes as $prefix ) {\n\t\t\t\tif ( preg_match( '/'. $prefix .'[-]\\w+/', $key ) ) {\n\t\t\t\t\t$this->attributes[ $key ] = $val;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"protected function _resetModifiedAttributesFlags() {\n\t\t$this->_modifiedAttributes = array();\n\t}",
"public function fixedAttributes()\n {\n return array('pid');\n }",
"public function setAttributes();",
"abstract protected function getModelAttributes();",
"function safecss_filter_attr($css, $deprecated = '')\n {\n }",
"protected function attributes()\n {\n return [];\n }",
"public function __unset($name) {\n\t\tif ($this->hasAttribute($name))\n\t\t\tunset($this->_attributes[$name]);\n\t\telse\n\t\t\tparent::__unset($name);\n\t}",
"public function getAttributes()\n {\n }",
"public function getAttributes() {}",
"public function getAttributes() {}",
"protected function getAttributes()\n {\n return [];\n }",
"public function attributes() : array;",
"public function safeAttributes()\n {\n return $this->attributes();\n }",
"public function withoutAttribute($name)\n {\n }",
"public function withoutAttribute($name)\n {\n }",
"function clearAttributes()\n {\n $this->arrRelations = array();\n return true;\n }",
"public function clearAttribs()\n {\n $this->attribs = [];\n return $this;\n }",
"public function __unset($name)\n\t{\n\t\tif(isset($this->_attributes[$name]))\n\t\t\tunset($this->_attributes[$name]);\n\t\telse\n\t\t\tparent::__unset($name);\n\t}",
"private function _getBaseAttributes( $aField ) {\r\n \r\n $_aBaseAttributes = $aField[ 'attributes' ] + array( 'class' => null );\r\n unset( \r\n $_aBaseAttributes[ 'input' ], \r\n $_aBaseAttributes[ 'select_button' ], \r\n $_aBaseAttributes[ 'name' ], \r\n $_aBaseAttributes[ 'value' ],\r\n $_aBaseAttributes[ 'type' ],\r\n $_aBaseAttributes[ 'remove_button' ] \r\n );\r\n return $_aBaseAttributes;\r\n \r\n }",
"function extract_attrs($line) {\n if (preg_match(self::REGEX_ATTR, $line)) {\n return preg_replace(self::REGEX_ATTR, ' \\1', $line);\n }\n }",
"public function get_attributes()\n {\n }",
"public function get_attributes()\n {\n }",
"public static function require_compare_attributes(){\n\t\treturn false;\n\t}",
"public function getAttributes(){ }",
"public function defineAttributes()\n\t{\n\t\treturn array();\n\t}",
"function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setId_dl('');\n $this->setDl('');\n $this->setRegion('');\n $this->setNombre_dl('');\n $this->setGrupo_estudios('');\n $this->setRegion_stgr('');\n $this->setStatus('');\n $this->setPrimary_key($aPK);\n }",
"public function getRestUnHookableAttributes(): array\n {\n return [];\n }",
"function protectAttr($str,$name=false)\n\t{\n\t\tif ($name && !preg_match('/^[A-Za-z][A-Za-z0-9_:.-]*$/',$str)) {\n\t\t\treturn '';\n\t\t}\n\t\t\n\t\treturn str_replace(array(\"'\",'\"'),array(''','"'),$str);\n\t}",
"public static function supportedAttributes();",
"function Hippo_Widget_Attributes() {\n\t\t\tnew Hippo_Widget_Attributes();\n\t\t}",
"public function getUnloggableAttributes(): array\n {\n return [];\n }",
"function fixAttributes(&$template,$attribute) {\n\tif ( ! is_array($template[$attribute]) ) return;\n\tif ( $template[$attribute]['@attributes'] ) {\n\t\t$template[$attribute][0]['@attributes'] = $template[$attribute]['@attributes'];\n\t\tif ( $template[$attribute]['value'])\n\t\t\t$template[$attribute][0]['value'] = $template[$attribute]['value'];\n\n\t\tunset($template[$attribute]['@attributes']);\n\t\tunset($template[$attribute]['value']);\n\t}\n\n\tif ( $template[$attribute] ) {\n\t\tforeach ($template[$attribute] as $tempArray) {\n\t\t\t$tempArray2[] = $tempArray['value'] ? array('@attributes'=>$tempArray['@attributes'],'@value'=>$tempArray['value']) : array('@attributes'=>$tempArray['@attributes']);\n\t\t}\n\t\t$template[$attribute] = $tempArray2;\n\t}\n}",
"function _wp_post_thumbnail_class_filter_remove($attr)\n {\n }",
"public function getReservedAttributes()\n {\n if ($this->_reservedAttributes === null) {\n $_reserved = array('position');\n $methods = get_class_methods(__CLASS__);\n foreach ($methods as $method) {\n if (preg_match('/^get([A-Z]{1}.+)/', $method, $matches)) {\n $method = $matches[1];\n $tmp = strtolower(preg_replace('/(.)([A-Z])/', \"$1_$2\", $method));\n $_reserved[] = $tmp;\n }\n }\n $_allowed = array(\n 'type_id','calculated_final_price','request_path','rating_summary'\n );\n $this->_reservedAttributes = array_diff($_reserved, $_allowed);\n }\n return $this->_reservedAttributes;\n }",
"public function testAddAttributesToNodeForNoAttributes()\n {\n $dom = Document::fromHtml('<p>Hello World</p>');\n $element = $dom->createElement('b');\n $element->setAttributes([]);\n $this->assertFalse($element->hasAttributes());\n }",
"public function overlayUserdefinedHtmlAttributeValues() {}",
"public function getAdditionalAttributes() {}",
"public function getAdditionalAttributes() {}",
"public function getAdditionalAttributes() {}",
"public function getAdditionalAttributes() {}",
"public function getAdditionalAttributes() {}",
"public function getAdditionalAttributes() {}",
"public function getAdditionalAttributes() {}",
"public function getAdditionalAttributes() {}",
"private function attrNames()\n {\n $dimAttr = [\n 'length' => 'length',\n 'width' => 'width',\n 'height' => 'height',\n ];\n $dsAttr = [\n 'dropship' => 'dropship',\n 'dropship_location' => 'dropship_location'\n ];\n\n $this->attrNames = ($this->mageVersion >= '2.2.5') ? $dsAttr : array_merge($dsAttr, $dimAttr);\n }",
"public function testGetChangeAttributes()\n {\n }",
"public function testUnlinkAttributesFromCertificate()\n {\n }",
"private function removeAttribute( $attr )\n {\n if (isset($this->attributeTypes[$attr]) || array_key_exists($attr, $this->attributeTypes))\n unset( $this->attributeTypes[$attr] ); // forma de remover un valor de un array...\n }",
"protected function getNotRequiredAttributesArray()\n {\n return [\"custom_design\",\"custom_design_to\", \"image\",\"price\",\"sku_type\",\"special_from_date\",\"special_to_date\",\"tax_class_id\",\"sku\", \"price_type\",'page_layout', 'custom_design_from', 'gift_message_available','media_gallery', 'custom_layout', 'tier_price', 'old_id', 'gallery', 'msrp',\n 'msrp_display_actual_price_type', 'minimal_price', 'price_view', 'quantity_and_stock_status','required_options', 'has_options', 'news_from_date',\n 'image_label', 'news_to_date', \"links_purchased_separately\",\"options_container\", \"shipment_type\", \"small_image\", \"special_price\", \"swatch_image\", \"status\",\"custom_layout_update\"];\n }",
"public static function spanTagCorrectlyRemovedWhenRmTagIfNoAttribIsConfiguredDataProvider() {}",
"function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setNivel_stgr('');\n $this->setDesc_nivel('');\n $this->setDesc_breve('');\n $this->setOrden('');\n $this->setPrimary_key($aPK);\n }",
"function tag_attributes($attributes)\n{\n if (is_string($attributes)) {\n $toProcess['name'] = $attributes;\n $toProcess['id'] = $attributes;\n } else {\n //don't allow 'value' to be set specifically as an attribute (why = consistency)\n unset($attributes['value']);\n $toProcess = $attributes;\n }\n\n $attr = array();\n foreach ($toProcess as $key => $attribute) {\n // Reject weird attribute names (a little more restrictively than necessary)\n if (preg_match('/[^A-Za-z0-9_:.-]/', $key)) {\n continue;\n }\n if (is_string($attribute)) {\n $attr[$key] = $key . '=\"' . html_escape($attribute) . '\"';\n } elseif ($attribute === true) {\n $attr[$key] = $key;\n }\n }\n return join(' ', $attr);\n}",
"function remove_img_attr ($html)\n{\n return preg_replace('/(width|height)=\"\\d+\"\\s/', \"\", $html);\n}",
"private function _filter_attributes($str) {\n\t\t$out = '';\n\n\t\tif (preg_match_all('#\\s*[a-z\\-]+\\s*=\\s*(\\042|\\047)([^\\\\1]*?)\\\\1#is', $str, $matches)) {\n\t\t\tforeach ($matches [0] as $match) {\n\t\t\t\t$out .= preg_replace('#/\\*.*?\\*/#s', '', $match);\n\t\t\t}\n\t\t}\n\n\t\treturn $out;\n\t}",
"function std_attr($at){\n switch($at){\n case 'wrap': $attr = array('id'=>strval($this->obj->id));break;\n default:\n $attr = array();\n\n }\n return new opc_attrs(NULL,$attr);\n }",
"private static function removeUnallowedHTMLAttributes(string $html): string\n {\n $tidy = new tidy();\n\n $dom = new DOMDocument();\n\n // Normalizes the HTML which reduce the possibility of having an unexpected\n // exception in the DomDocument library because some bad HTML was found.\n // Once the HTML is normalized, we will parse it again.\n $html = $tidy->repairString($html, [\n 'output-xhtml' => true,\n 'show-body-only' => true,\n ], 'utf8');\n\n try {\n libxml_use_internal_errors(true);\n // Needs a XML encoding declaration to ensure is treated as UTF-8\n $dom->loadHTML('<?xml encoding=\"utf-8\" ?>'.$html);\n } catch (Exception $e) {\n return '';\n }\n\n $attributes = static::getAttributesNodes($dom);\n\n collect($attributes)\n ->filter(fn ($attribute) => static::isAttributeAllowedForTag($attribute))\n ->each(fn ($node) => $node->parentNode->removeAttribute($node->nodeName));\n\n return $tidy->repairString($dom->saveHTML(), [\n 'output-xhtml' => true,\n 'show-body-only' => true,\n ], 'utf8');\n }",
"function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setId_item('');\n $this->setId_enc('');\n $this->setId_nom('');\n $this->setModo('');\n $this->setF_ini('');\n $this->setF_fin('');\n $this->setId_nom_new('');\n $this->setPrimary_key($aPK);\n }",
"public function getAttributesList()\n {\n }",
"function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setId_item('');\n $this->setId_ubi('');\n $this->setF_gasto('');\n $this->setTipo('');\n $this->setCantidad('');\n $this->setPrimary_key($aPK);\n }",
"function initialize () {\n //blank for implementing\n\t\n\t//go through the attributes see if any of them have a name propery\n }",
"function guy_attrcheck($arr) {\n\tglobal $guy_c;\n\t$element = strtolower($arr[1]); $attributes = $arr[2];\n\t$nosp = ''; $sp = 'title|class|id|onclick'; $dims = '';\n\t$ok = array();\n\n\tif ($element == 'a') {\n\t\t$nosp = 'href|hreflang|name|lang';\n\t} elseif ($element == 'img') {\n\t\t$nosp = 'longdesc|src|align';\n\t\t$sp .= '|class|alt';\n\t\tif (!preg_match('/alt/i',$attributes)) {\n\t\t\t$ok = array('alt={|}{|}');\n\t\t}\n\t\tpreg_match(\"/src\\s*=\\s*\\\"([^\\s\\\">]+)\\\"/is\",$attributes,$matches);\n\t\tif (isset($matches[1])) {\n\t\t\t$dims = guy_imagedims($matches[1]);\n\t\t} else {\n\t\t\tpreg_match(\"/src\\s*=\\s*'([^\\s'>]+)'/is\",$attributes,$matches);\n\t\t\tif (isset($matches[1])) {\n\t\t\t\t$dims = guy_imagedims($matches[1]);\n\t\t\t} else {\n\t\t\t\tpreg_match(\"/src\\s*=\\s*([^'\\\"][^\\s>]+)/is\",$attributes,$matches);\n\t\t\t\tif (isset($matches[1])) {\n\t\t\t\t\t$dims = guy_imagedims($matches[1]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} elseif ($element == 'ins' || $element == 'del') {\n\t\t$nosp = 'cite|datetime|lang';\n\t} elseif ($element == 'blockquote' || $element == 'q') {\n\t\t$nosp = \"cite|lang\";\n\t} elseif ($element == 'br' || $element == 'news' || $element == \n\t'column') {\n\t\t$sp='';\n\t} elseif ($element == 'span') {\n\t\t$sp .= '|class';\n\t\t$nosp = 'lang';\n\t} elseif ($element == 'form') {\n\t\t$sp = '';\n\t\t$nosp = 'cc|counter';\n\t} elseif ($element == 'submenu') {\n\t\t$sp = '';\n\t\t$nosp = 'level';\n\t} elseif ($element == 'ol') {\n\t\t$nosp = 'type';\n\t} else {\n\t\t$nosp = \"lang\";\n\t}\n\n\tif ($nosp) {\n\t\tpreg_match_all(\"/(?:$nosp)\\s*=\\s*\\\"[^\\s\\\">]+\\\"/is\",$attributes,$matches);\n\t\t$ok = \n\t\tarray_merge($ok,str_replace('\"',$guy_c['quot'],$matches[0]));\n\t\tpreg_match_all(\"/(?:$nosp)\\s*=\\s*'[^\\s'>]+'/is\",$attributes,$matches);\n\t\t$ok = array_merge($ok,$matches[0]);\n\t\tpreg_match_all(\"/(?:$nosp)\\s*=\\s*[^\\s>'\\\"][^\\s>]*/is\",$attributes,$matches);\n\t\t$ok = array_merge($ok,$matches[0]);\n\t}\n\tif ($sp) {\t\n\t\tpreg_match_all(\"/(?:$sp)\\s*=\\s*\\\"[^\\\"]*\\\"/is\",$attributes,$matches);\n\t\t$ok = \n\t\tarray_merge($ok,str_replace('\"',$guy_c['quot'],$matches[0]));\n\t\tpreg_match_all(\"/(?:$sp)\\s*=\\s*'[^']*'/is\",$attributes,$matches);\n\t\t$ok = array_merge($ok,$matches[0]);\n\t\tpreg_match_all(\"/(?:$sp)\\s*=\\s*[^\\s>'\\\"][^\\s>]*/is\",$attributes,$matches);\n\t\t$ok = array_merge($ok,$matches[0]);\n\t}\n\t$ok = join(' ',$ok);\n\treturn $guy_c['lt'] . $element . ($ok ? \" $ok\" : '') . ($dims ? ' \n'.str_replace('\"',$guy_c['quot'],$dims) : '') .$guy_c['gt'];\n}",
"function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setId_region('');\n $this->setRegion('');\n $this->setNombre_region('');\n $this->setStatus('');\n $this->setPrimary_key($aPK);\n }",
"function DOM_double_quotes_in_attributes() {\r\n\t\t$query = '//@*';\r\n\t\t$attributes = $this->xpath->query($query);\r\n\t\tforeach($attributes as $attribute) {\r\n\t\t\tif(strpos($attribute->nodeValue, '\"') !== false) {\r\n\t\t\t\t$attribute->nodeValue = str_replace('\"', '\\'', $attribute->nodeValue);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"function wp_kses_uri_attributes()\n {\n }",
"public function unsetAttributes($names=null)\n {\n if($names===null)\n $names=$this->attributeLabels();\n foreach($names as $key => $name)\n $this->$key=null;\n }",
"private function _remove_evil_attributes($str, $is_image)\n {\n // All javascript event handlers (e.g. onload, onclick, onmouseover), style, and xmlns\n //$evil_attributes = array('on\\w*', 'style', 'xmlns', 'formaction');\n $evil_attributes = array('on\\w*', 'xmlns', 'formaction');\n\n if ($is_image === true)\n {\n /*\n * Adobe Photoshop puts XML metadata into JFIF images,\n * including namespacing, so we have to allow this for images.\n */\n unset($evil_attributes[array_search('xmlns', $evil_attributes)]);\n }\n\n do {\n $count = 0;\n $attribs = array();\n\n // find occurrences of illegal attribute strings with quotes (042 and 047 are octal quotes)\n preg_match_all('/('.implode('|', $evil_attributes).')\\s*=\\s*(\\042|\\047)([^\\\\2]*?)(\\\\2)/is', $str, $matches, PREG_SET_ORDER);\n\n foreach ($matches as $attr)\n {\n $attribs[] = preg_quote($attr[0], '/');\n }\n\n // find occurrences of illegal attribute strings without quotes\n preg_match_all('/('.implode('|', $evil_attributes).')\\s*=\\s*([^\\s>]*)/is', $str, $matches, PREG_SET_ORDER);\n\n foreach ($matches as $attr)\n {\n $attribs[] = preg_quote($attr[0], '/');\n }\n\n // replace illegal attribute strings that are inside an html tag\n if (count($attribs) > 0)\n {\n $str = preg_replace('/(<?)(\\/?[^><]+?)([^A-Za-z<>\\-])(.*?)('.implode('|', $attribs).')(.*?)([\\s><]?)([><]*)/i', '$1$2 $4$6$7$8', $str, -1, $count);\n }\n\n } while ($count);\n\n return $str;\n }",
"public function getAttributes();",
"public function getAttributes();",
"public function getAttributes();",
"public function getAttributes();"
] | [
"0.71117824",
"0.7035495",
"0.6810129",
"0.6756575",
"0.6662393",
"0.64803207",
"0.63691974",
"0.6355436",
"0.6354229",
"0.6353134",
"0.6352825",
"0.6333506",
"0.6317176",
"0.627881",
"0.6275085",
"0.62605983",
"0.6248935",
"0.62345755",
"0.61991394",
"0.6188764",
"0.6176879",
"0.6175388",
"0.614708",
"0.61264527",
"0.61216265",
"0.6106515",
"0.6090132",
"0.6078733",
"0.6067409",
"0.6048261",
"0.60476065",
"0.60359275",
"0.60279006",
"0.60161024",
"0.598617",
"0.597498",
"0.5967296",
"0.5962961",
"0.5953265",
"0.5949186",
"0.5945583",
"0.59374124",
"0.5929156",
"0.5911232",
"0.5897209",
"0.5897209",
"0.5874286",
"0.5868841",
"0.5868023",
"0.58596075",
"0.58581877",
"0.5854035",
"0.5854035",
"0.5848833",
"0.58262503",
"0.5825847",
"0.5825423",
"0.5823047",
"0.58020234",
"0.5794609",
"0.57945615",
"0.57910055",
"0.57900673",
"0.5786733",
"0.578644",
"0.5777766",
"0.57617295",
"0.573643",
"0.5735756",
"0.5735756",
"0.5735611",
"0.5734621",
"0.5734621",
"0.5734621",
"0.5734621",
"0.57226723",
"0.57223946",
"0.5708633",
"0.5708012",
"0.57049197",
"0.56926405",
"0.5687686",
"0.56874436",
"0.56829137",
"0.56816816",
"0.56685513",
"0.5663078",
"0.56601787",
"0.5657601",
"0.5656998",
"0.5656981",
"0.5655041",
"0.56470156",
"0.56441593",
"0.5640923",
"0.5639839",
"0.5638182",
"0.5634312",
"0.5634312",
"0.5634312",
"0.5634312"
] | 0.0 | -1 |
Retrieves the score of an post. | public function getNoodEnvelopScore($envelop_id)
{
$data = NoodEnvelop::model()->find('nood_envelop_ID =:envelop_id', array(':envelop_id' => $envelop_id));
return isset($data->score) ?
$data->score : 0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getScore()\n {\n return $this->score;\n }",
"public function getScore()\n {\n return $this->score;\n }",
"public function getScore()\n {\n return $this->score;\n }",
"public function getScore()\n {\n return $this->score;\n }",
"public function getScore();",
"public function getScore(): int\n {\n return $this->score;\n }",
"public function getScore() : int{\n return $this->score;\n }",
"public function getScore()\r\n\t{\r\n\t\treturn $this->root->getAttribute('score');\r\n\t}",
"function score()\r\n {\r\n return $this->Score;\r\n }",
"public function getScore()\n {\n }",
"public function score()\n {\n return $this->hasOne(Score::class);\n }",
"public function _getCalculatedScore() {\n\t\treturn $this->_calculatedScore;\n\t}",
"public function score(): int;",
"public function getScore($title){\n $stmt = $this->conn->prepare( 'SELECT rating FROM reviews WHERE title = :title' );\n $stmt->bindParam ( ':title', $title );\n $stmt->execute ();\n $stmt->fetch ();\n $stmh = $this->conn->prepare( 'SELECT rating FROM reviews WHERE title = :title AND rating = \"FRESH\"' );\n $stmh->bindParam ( ':title', $title );\n $stmh->execute ();\n $stmh->fetch ();\n if($stmh->rowCount () == 0)\n return 0;\n else\n return (int) ($stmh->rowCount () / $stmt->rowCount () * 100);\n }",
"public function getScore($auditID,$questionID)\n {\n return $this->database->retrieve(\"SELECT score,comment FROM Scores WHERE auditID = \\\"$auditID\\\" AND questionID = \\\"$questionID\\\"\")[0];\n }",
"public function getScore() \n\t{\n\t\t$sql = 'SELECT COUNT(*) as nb, SUM(score) as total, MAX(SCORE) as max FROM '.$this->progressTable;\n\t\t$query = $this->db->query($sql, array());\n\t\treturn $query->row(); \n\t}",
"public function getMatchScore()\n\t{\n\t\t$this->_makeRequest(Wp_WhitePages_Model_Api::API_REQUEST_METHOD_MATCHSCORE);\n\t\treturn $this->_result;\n\t}",
"public function put_score()\r\n\t\t{\r\n\t\t\t// Scaffolding Code For Single:\r\n\t\t\treturn $this->obj;\r\n\t\t}",
"protected function getScoreFromContent($nodeName) {\n\t\t$score = 0.0;\n\t\t$scoreMatches \t= array();\n\t\tpreg_match('~(?<score>[0-9]*\\.[^ ]*)~',$nodeName,$scoreMatches);\n\t\tif(isset($scoreMatches['score']) && (float) $scoreMatches['score'] > 0) {\n\t\t\t$score = (float) $scoreMatches['score'];\n\t\t}\n\n\t\treturn $score;\n\t}",
"public function currentScore() \n {\n if ($this->hasScore()) {\n return $this->score()->orderBy('created_at', 'DESC')->first()->total;\n }\n\n return 0;\n }",
"function calculate_user_score($uname) {\n $sql = '\n SELECT\n SUM(score)\n FROM\n tips\n WHERE\n author = ?';\n \n $res = $this->prep_and_exec($sql, [$uname]);\n \n return $res ? $res->fetch(PDO::FETCH_NUM)[0] : null;\n }",
"public function getHits()\n {\n return (int)$this->data['hits'];\n }",
"public function getScores() {\n\t\treturn $this->scores;\n\t}",
"public function getCurrentScore()\n {\n\n return DB::table('scores')\n ->select('score','current_page')\n ->where('user_id', Auth::user()->id)\n ->first();\n }",
"public function _getAverageScore() {\n\t\treturn $this->_averageScore;\n\t}",
"public function getSavedScore()\n {\n return $this->savedScore;\n }",
"public function getSavedScore()\n {\n return $this->savedScore;\n }",
"public function save(ScorePost $scorePost)\n {\n $stmt = $this->connection->prepare('\n INSERT INTO score_post \n (user_id, leaderboard_id, score) \n VALUES \n (:userId, :leaderboardId , :score)\n ');\n $stmt->bindParam(':userId', $scorePost->userId);\n $stmt->bindParam(':leaderboardId', $scorePost->leaderboardId);\n $stmt->bindParam(':score', $scorePost->score);\n return $stmt->execute();\n }",
"public function get_scores() {\n return $this->pascores;\n }",
"public function find($userId,$leaderboardId)\n {\n // This enables us to use the following:\n // $scorePost = $repository->find(1234,12);\n // echo $scorePost->Score;\n\n $stmt = $this->connection->prepare('\n SELECT * \n FROM score_post \n WHERE user_id = :userId and leaderboard_id = :leaderboardId\n ');\n $stmt->bindParam(':userId', $userId);\n $stmt->bindParam(':leaderboardId', $leaderboardId);\n $stmt->execute();\n \n $stmt->setFetchMode(PDO::FETCH_CLASS, 'ScorePost');\n return $stmt->fetch();\n \n }",
"public function getPostCount();",
"public function getMaxScore()\n {\n return $this->result->getMaxScore();\n }",
"public function getExperienceScore()\n\t{\n\t\treturn $this->experience_score;\n\t}",
"abstract public function score();",
"public function getPostCount()\n {\n $entityManager = $this->getEntityManager();\n $queryBuilder = $entityManager->createQueryBuilder();\n $queryBuilder\n ->select('count(bp)')\n ->from('App:BlogPost', 'bp');\n\n return $queryBuilder->getQuery()->getSingleScalarResult();\n }",
"public function getScoreFromRule() {\n\t\treturn $this->getScoreFromRuleInternal($this->registration->competition->rule, false);\n\t}",
"public function score()\n {\n $this->score++;\n }",
"public function get_found_post() {\n\t\treturn $this->found_post;\n\n\t}",
"public function getSumScore() {\n\t\treturn $this->sumScore;\n\t}",
"public function get_score($memberid) {\n return $this->pascores[$memberid];\n }",
"public function getAccumulatedScore()\n {\n return $this->score;\n }",
"public function getAccumulatedScore()\n {\n return $this->score;\n }",
"public function getSpamScore(){\r\n\t\treturn $this->spamScore;\r\n\t}",
"public function count(\\Tuiter\\Models\\Post $post): int\n {\n return $this->collection->count(array(\"postId\"=>$post->getPostId()));\n }",
"public function getScoreByQuestion (int $question_id)\n {\n return $this->score\n ->where(['user_id' => Auth::user()->id, 'question_id' => $question_id])\n ->firstOrFail();\n }",
"public function UpdateScore() {\n\t\t$this->score = self::ComputeScore( $this->goods, $this->bads );\n\t\t$this->tier = self::GetTier( $this->score );\n\t\treturn $this->score;\n\t}",
"public function score()\n {\n $nim = auth()->user()->registration_number;\n $submission = SubmissionAssessment::type(AssessmentTypes::TRIAL)\n ->studentId($nim)\n ->with('scores')\n ->first();\n\n $countAssessmentComponent = AssessmentComponent::type(AssessmentTypes::TRIAL)->count();\n $index = 1;\n\n return viewStudent('final-test.score', compact('submission', 'index', 'countAssessmentComponent'));\n }",
"public function getMatchedScore()\n {\n if ($this->greScore) {\n return $this->greScore;\n }\n if ($this->toeflScore) {\n return $this->toeflScore;\n }\n\n return false;\n }",
"public function getThreatScore()\n {\n if ($this->response !== null) {\n return intval($this->response[2]);\n }\n return false;\n }",
"public function totalScore($scorePulls);",
"public function getMatchedScore(){\n if($this->greScore) return $this->greScore;\n if($this->toeflScore) return $this->toeflScore;\n return false;\n }",
"function pointsScored($quiz)\n\t{\n\t $fetch = $this->DB->database_select('points', array('points_obtained'), array('uid' => session_get('uid'), 'qid' => $quiz), 1);\n\t return ($fetch != false) ? $fetch['points_obtained'] : 0;\n\t}",
"public static function freelancer_rating_score($freelancer_id){\n global $wpdb;\n $bid = BID;\n $sql = \"SELECT AVG(M.meta_value) as rate_point, COUNT(p.ID) as count\n from $wpdb->posts as p \n join $wpdb->postmeta as M \n on M.post_id = p.ID\n Where p.post_author = $freelancer_id\n and p.post_status ='complete'\n and p.post_type = '\" . BID . \"' \n and M.meta_key = 'rating_score'\"; \n $results = $wpdb->get_results($sql);\n if($results) {\n // update user meta\n update_user_meta( $freelancer_id, 'rating_score', $results[0]->rate_point);\n // return value\n return array('rating_score' => $results[0]->rate_point , 'review_count' => $results[0]->count );\n }else {\n return array('rating_score' => 0 , 'review_count' => 0 ); \n }\n }",
"function getPlayerScore($player_id) {\n return self::getUniqueValueFromDB(self::format(\"\n SELECT\n player_innovation_score\n FROM\n player\n WHERE\n player_id = {player_id}\n \",\n array('player_id' => $player_id)\n ));\n }",
"public function hasScore(){\n return $this->_has(2);\n }",
"public function hasScore(){\n return $this->_has(2);\n }",
"public function hasScore(){\n return $this->_has(2);\n }",
"function score($array){\n return $array['score'];\n }",
"public function getRatingsByPost($idPost){\n $query = \"SELECT * FROM `ratings` WHERE `posts_id_posts` = :idPost\";\n $return = $this->db->prepare($query);\n $params = array(':idPost' => $idPost);\n\n if(!$return->execute($params)){\n return null;\n }\n $result = $return->fetchAll();\n\n if($result != null){\n return $result;\n }else{\n return null;\n }\n }",
"public function getScoreSum()\n\t{\n\t\treturn (float) $this->score_mc + $this->score_case;\n\t}",
"public function earned_score($answers, $attempt) {\n return $answers[$attempt->answerid]->score;\n }",
"public function getScore($subsidiaryId) {\n\t\t// sestaveni vyhledavaciho dotazu\n\t\t$select = new Zend_Db_Select($this->getAdapter());\n\t\t\n\t\t$select->from($this->_name, array(\n\t\t\t\tnew Zend_Db_Expr(\"SUM(weight)\")\n\t\t\t\t));\n\t\t\n\t\t$select->where(\"subsidiary_id = ?\", $subsidiaryId)\n\t\t\t\t\t->where(\"!is_removed\")->where(\"is_submited\")->group(\"subsidiary_id\");\n\t\t\n\t\treturn $select->query()->fetchColumn();\n\t}",
"public function uvScore();",
"public function getFeedbackScore()\n {\n return $this->feedbackScore;\n }",
"public function getAvgRating($idUser, $idPost){\n $result = $this->getRating($idUser, $idPost);\n if($result != null){\n $return = ($result[\"originality\"] + $result[\"topic\"] + $result[\"language_level\"])/3;\n return number_format($return, 2);\n }\n return null;\n }",
"public function hasScore(){\n return $this->_has(5);\n }",
"function get_user_score() \n\t{\n\t\t$this->load->model('frontendmodel');\n\n\t\t$arrResult = $this->frontendmodel->FetchResult();\n\n\t\t$intCounter = 0;\n\n\t\tforeach ($arrResult as $key => $value) \n\t\t{\n\t\t\tif($value['result'] && $value['includeinscoring'])\n\t\t\t{\n\t\t\t\t$intCounter = $intCounter + 1;\n\t\t\t}\n\t\t}\n\t\t\n\t\techo $intCounter;\n\t}",
"public function hasScore(){\n return $this->_has(3);\n }",
"public function hasScore(){\n return $this->_has(3);\n }",
"public function getScoreList() {\n return $this->scoreList;\n }",
"public function visualScore();",
"public function _getMaxScore() {\n\t\treturn $this->_maxScore;\n\t}",
"public static function employer_rating_score($employer_id) {\n global $wpdb;\n $sql = \"SELECT AVG(M.meta_value) as rate_point, COUNT(C.comment_ID) as count\n FROM $wpdb->posts as p \n join $wpdb->comments as C \n ON p.ID = c.comment_post_ID \n join $wpdb->commentmeta as M \n ON C.comment_ID = M.comment_id\n WHERE \n p.post_author = $employer_id\n AND p.post_status ='complete'\n AND p.post_type ='\" . PROJECT . \"' \n AND M.meta_key = 'et_rate'\n AND C.comment_type ='fr_review'\n AND C.comment_approved = 1\";\n \n $results = $wpdb->get_results($sql);\n if($results) {\n return array('rating_score' => $results[0]->rate_point , 'review_count' => $results[0]->count );\n }else {\n return array('rating_score' => 0 , 'review_count' => 0 ); \n }\n }",
"public function getPostage() {\n return $this->PostageCost;\n }",
"public function getScore(string $side) :? int\n {\n if (!in_array($side, $this->teamSides)) {\n return null;\n }\n return $this->score->get($side);\n }",
"public function countPost()\n {\n $dbName = $this->dbConnect();\n $countPost = $dbName->prepare('SELECT count(id) as nbrPost FROM blogpost WHERE status=1');\n $countPost->setFetchMode(PDO::FETCH_ASSOC);\n $countPost->execute();\n $countPosts = $countPost->fetchAll();\n\n $nbPerPage = $this->getNbPerPage();\n $pageOfNumber = ceil($countPosts[0][\"nbrPost\"] / $nbPerPage);\n return $pageOfNumber;\n }",
"public function iN_CalculateAllPremiumPosts() {\n\t\t$query = mysqli_query($this->db, \"SELECT COUNT(*) AS psts FROM i_posts WHERE who_can_see = '4' AND post_status = '1'\") or die(mysqli_error($this->db));\n\t\t$row = mysqli_fetch_array($query, MYSQLI_ASSOC);\n\t\treturn isset($row['psts']) ? $row['psts'] : '0';\n\t}",
"function getLikeNumberPost($postId)\n{\n global $conn;\n\n $sql = \"SELECT likes from post WHERE postId = $postId\";\n $result = mysqli_query($conn, $sql);\n $row = mysqli_fetch_assoc($result);\n return $row['likes'];\n}",
"public function soundScore();",
"public function social_score_stats($source = null)\n {\n if (!$this->loaded()) {\n return;\n }\n\n return Social_Score::social_score_stats($this, $source);\n }",
"public function getVotePostId(): int {\n\t\treturn ($this->votePostId);\n\t}",
"public function getSalary($post){ \n\t\treturn $this->structure[$post]['salary'];\n\t}",
"public function boxScore(): Response\n {\n return $this->call('boxscore');\n }",
"public static function get_post_rating_data( $post_id ) {\n if ( ! get_post_meta( $post_id, 'laterpay_rating' ) ) {\n self::initialize_post_rating_data( $post_id );\n }\n\n $rating_data = get_post_meta( $post_id, 'laterpay_rating' );\n\n return $rating_data[0];\n }",
"public function getPoints(): ?int {\n if ($this->overriddenPoints !== null) {\n return $this->overriddenPoints;\n }\n\n if ($this->lastSubmission === null) {\n return null;\n }\n\n $evaluation = $this->lastSubmission->getEvaluation();\n if ($evaluation === null) {\n return null;\n }\n\n return $evaluation->getPoints();\n }",
"public function score($query) {\n $url = $this->urlWrapper() . URLResources::QUERY_DATA_EXTRACTION_SCORE;\n return $this->dataExtractionWrapper($url, $query);\n }",
"function getScore($weight_adjusted = TRUE) {\n if ($this->is_skipped) {\n return 0;\n }\n if (!isset($this->score)) {\n $this->score = $this->score();\n }\n if (isset($this->question->score_weight) && $weight_adjusted) {\n return round($this->score * $this->question->score_weight);\n }\n return $this->score;\n }",
"function post_count() {\r\n\tif ( get_post_author_id() ) \r\n\t\techo 'Post Count: ' . get_post_count( get_post_author_id() );\r\n\telse\r\n\t\techo 'Error';\r\n}",
"public function calculate()\n\t{\n\t\t$this->sold();\n\t\t$this->rank();\n\t\t$this->feedback();\n\t\t$this->storeActive();\n\t\t$this->cod();\n\t\t$this->accountAge();\n\t\t$this->imageCount();\n\n\t\treturn $this->score;\n\t}",
"public function getPageRating()\n {\n $rating = 0;\n\n if (!$this->owner->PageFeedbackEntries()->count()) {\n return $rating;\n }\n\n $stack = [];\n\n /** @var PageFeedbackEntry $feedback */\n foreach ($this->owner->PageFeedbackEntries() as $feedback) {\n $stack[] = (int)$feedback->Rating;\n }\n\n return round(array_sum($stack) / count($stack), 1);\n }",
"public function getRanking()\n {\n return $this->ranking;\n }",
"public function getUserScoresToDo (int $int)\n {\n return $this->score\n ->with('question')\n ->where('user_id', Auth::user()->id)\n ->whereHas('question', function ($query) { $query->where('published', true); })\n ->orderBy('created_at', 'desc')\n ->take($int)\n ->get();\n }",
"public function getTotalScore()\n {\n $score = 0;\n for ($i = 1; $i <= 3; $i++) {\n $score += $this->getBaseScoreForShot($i) * $this->getMultiplierForShot($i);\n }\n\n return $score;\n }",
"public function iaqScore();",
"function getPostInfo($pdo) {\n $statement = $pdo->prepare(\"SELECT posts.*, users.*,\n\t(SELECT sum(vote_dir) FROM votes\n WHERE posts.post_id=votes.post_id)\n\tAS score\n\tFROM posts\n JOIN votes ON posts.post_id=votes.post_id\n JOIN users ON posts.user_id=users.id\n\tGROUP BY posts.post_id\n\tORDER BY post_id DESC\");\n\n $statement->execute();\n $getPostInfo = $statement->fetchAll(PDO::FETCH_ASSOC);\n\n if (!$statement) {\n die(var_dump($pdo->errorInfo()));\n }\n\n return $getPostInfo;\n}",
"public function likes($postID)\n\t{\n\t\t$postID = Sanitize::int($postID);\n\n\t\tif(!$this->setPost($postID))\n\t\t\treturn;\n\n\t\t$rsp = new Response();\n\n //Are we authorized to see this profile\n\t\tif(!isAuthorized::seeFullProfile($this->model->getProfileID()))\n {\n\t\t\t$rsp->setFailure(401, \"You can not see this post\")\n\t\t\t ->send();\n\n\t\t\treturn;\n\t\t}\n\n\t\t$likes = $this->likeModel->getAllLikes($postID);\n\n\t\t$rsp->setSuccess(200, \"likes returned\")\n ->bindValue(\"postID\", $postID)\n\t\t ->bindValue(\"nbOfLikes\", count($likes))\n ->bindValue(\"like\", $likes)\n ->send();\n\t}",
"function staticGet($k, $v=null)\n {\n return Managed_DataObject::staticGet('Spam_score', $k, $v);\n }",
"public function getScorecard()\n {\n return $this->readOneof(3);\n }",
"public function getCalculatedScore($sample_id) {\n\t\t$columns = array ('sample_id');\n\t\t$records = array ($sample_id);\n\t\t$calculated_score_ = $this->query_from_response_result_dts ( $columns, $records );\n\t\treturn sizeof($calculated_score_)>0 ? $calculated_score_ [0] ['calculated_score'] : null;\n\t}",
"public function getAvgRating()\n {\n $sum =0;\n foreach($this->comments as $comment)\n {\n $sum = $sum + $comment->getRating() ;\n }\n\n if(count($this->comments)) return $sum/count($this->comments);\n\n return 0 ;\n }"
] | [
"0.69857526",
"0.69857526",
"0.69857526",
"0.69857526",
"0.68397343",
"0.67610455",
"0.6645196",
"0.6607476",
"0.6448374",
"0.62609375",
"0.6153722",
"0.6100371",
"0.6099186",
"0.6007988",
"0.5997752",
"0.5966521",
"0.5959901",
"0.5913656",
"0.5865251",
"0.5767851",
"0.57374895",
"0.5717767",
"0.56815994",
"0.56423485",
"0.5637539",
"0.55691105",
"0.55691105",
"0.5563125",
"0.5525295",
"0.5519945",
"0.5519448",
"0.55180997",
"0.5448989",
"0.54314804",
"0.542415",
"0.54192203",
"0.54153085",
"0.5385317",
"0.53459835",
"0.530554",
"0.52961046",
"0.52961046",
"0.5278506",
"0.52706164",
"0.52613497",
"0.5260534",
"0.52576846",
"0.52316886",
"0.522637",
"0.5224112",
"0.5214329",
"0.52136546",
"0.52099866",
"0.5204335",
"0.5200732",
"0.5200732",
"0.5200732",
"0.51920676",
"0.5175813",
"0.51749605",
"0.5170336",
"0.51689327",
"0.51685065",
"0.5163854",
"0.5162895",
"0.51470107",
"0.51447177",
"0.51394814",
"0.51394814",
"0.5135311",
"0.5121106",
"0.511263",
"0.51066977",
"0.5104877",
"0.50890714",
"0.5077589",
"0.5064617",
"0.50581867",
"0.50415456",
"0.50364596",
"0.5022397",
"0.5018823",
"0.5006781",
"0.50033444",
"0.49978793",
"0.49960083",
"0.4988097",
"0.49823704",
"0.49760643",
"0.4964954",
"0.496199",
"0.4955624",
"0.49498618",
"0.49488276",
"0.49356592",
"0.49187878",
"0.49066585",
"0.48970595",
"0.48920512",
"0.48919126"
] | 0.51848197 | 58 |
Show all the roles in the system | public function indexAction() {
$this->getFlashMessages();
$role = new Role_Model_Role();
$column = $this->getRequest()->getParam('column');
$sort = $this->getRequest()->getParam('sort');
$this->view->role = $this->paginate($role->fetchAll($column, $sort));
$this->view->sort = ( $sort=='ASC') ? 'DESC' : 'ASC';
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function index()\n {\n return Roles::all();\n }",
"public function index()\n {\n $roles = App\\User::find(1)->roles()->orderBy('name')->get();\n }",
"public function index()\n {\n return Role::all();\n }",
"public function index()\n {\n return Role::all();\n }",
"public function show_roles(){\n\t\t\n\t\t//Connection establishment, processing of data and response from REST API\n\t\t$path=base_url();\n\t\t$url = $path.'api/manageRoles_api/all_role';\t\t\n\t\t$ch = curl_init($url);\n\t\tcurl_setopt($ch, CURLOPT_HTTPGET, true);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\t$response_json = curl_exec($ch);\n\t\tcurl_close($ch);\n\t\t$response=json_decode($response_json, true);\n\t\treturn $response;\t\t\n\t\t\n\t}",
"public function index()\n {\n $roles = Role::all();\n return $this->showAll($roles, 200);\n }",
"public function index()\n {\n return view('adminpanel.roles.index')->with('roles',Role::all());\n }",
"function getAllRoles(){\r\n $data = new \\Cars\\Data\\Common($this->app);\r\n return $data->getAllRoles();\r\n }",
"public function indexRoles()\n {\n\n $users = User::with('roles')\n ->whereNotIn('id', [1, auth()->user()->id])\n ->orderBy('created_at', 'asc')\n ->paginate(10);\n\n $roles = Role::all();\n\n return view('admin.roles.assign', compact('users', 'roles'));\n }",
"public function getRoles()\n\t{\n\t\t$roles = $this->role_gestion->all();\n\n\t\treturn view('back.users.roles', compact('roles'));\n\t}",
"public function roles()\n {\n $this->roles = $this->Role->list($_SESSION['guild_id']);\n }",
"private function get_all_roles(){\n return Role::all();\n }",
"public function index()\n {\n $roles = Role::orderBy('name')->get();\n\n\t\treturn view('roles.list', compact('roles'));\n }",
"public function get_all_roles()\n {\n return App\\Role::all();\n }",
"public function index() {\n $roles = Role::all();\n return view('admin.roles.index')->with('roles', $roles);\n }",
"public function index()\n {\n $roles = Role::paginate(100);\n return view(\"admin.roles.index\", compact(\"roles\"));\n }",
"public function index()\n {\n $roles = Role::get();\n return view('acl::roles.index',compact('roles'));\n }",
"public function index()\n {\n return view('admin.roles.index')->with('rolesList',Roles::all());\n }",
"public function index()\n {\n $roles = Role::all();\n\n return view('roles', compact('roles'));\n }",
"public function index()\n {\n $data['roles'] = $this->roleRepo->paginate();\n\n return $this->theme->scope('role.index', $data)->render();\n }",
"public function index()\n {\n return view('roles.index')->with('roles', Role::all());\n }",
"public function index()\n {\n $roles=Role::orderBy('sort')->get();\n return view('admin.role.role',compact('roles'));\n }",
"public function index()\n {\n $roles = Role::orderBy('created_at', 'desc')->paginate(AppHelper::DEFAULT_ITEMS_PER_PAGE); // 2 items per page\n $query = new QueryStringBuilder([\n 'page' => $roles->currentPage()\n ], localizedAdminURL('roles'));\n return view($this->themePage('role.list'), [\n 'roles' => $roles,\n 'query' => $query,\n 'page_helper' => new PaginationHelper($roles->lastPage(), $roles->currentPage(), $roles->perPage())\n ]);\n }",
"public function index()\r\n {\r\n $roles = AdminRole::all();\r\n return view('admin.role.list')->with('roles', $roles);\r\n }",
"public function index()\n {\n $roles = Role::paginate(15);\n\n $permissions = array();\n $user_roles = Auth::user()->roles;\n foreach ($user_roles as $key => $val) {\n foreach ($val->permissions as $permission) {\n $permissions[$permission->id] = $permission->name;\n }\n }\n\n return view('roles.index')->withRoles($roles)->withPermissions($permissions);\n }",
"public function index()\n {\n return view('roles.index')->withRoles(Role::paginate(15));\n }",
"public function actionRoles()\n\t{\n\t\tYii::app()->user->rightsReturnUrl = array('authItem/roles');\n\t\t\n\t\t$dataProvider = new RAuthItemDataProvider('roles', array(\n\t\t\t'type'=>CAuthItem::TYPE_ROLE,\n\t\t\t'sortable'=>array(\n\t\t\t\t'id'=>'RightsRoleTableSort',\n\t\t\t\t'element'=>'.role-table',\n\t\t\t\t'url'=>$this->createUrl('authItem/sortable'),\n\t\t\t),\n\t\t));\n\n\t\t// Render the view\n\t\t$this->render('roles', array(\n\t\t\t'dataProvider'=>$dataProvider,\n\t\t\t'isBizRuleEnabled'=>$this->module->enableBizRule,\n\t\t\t'isBizRuleDataEnabled'=>$this->module->enableBizRuleData,\n\t\t));\n\t}",
"public function index()\n {\n $roles = $this->role->all();\n return view('admin.role.list',compact('roles'));\n }",
"public function index()\n {\n $per_page = 20;\n return view('admin.role.index')\n ->withRoles($this->role->getRolePaginated($per_page));\n }",
"public function index()\n {\n $paginator = $this->roleRepository->getAllWithPaginate(10);\n\n return view('admin.roles.index', compact('paginator'));\n }",
"public function index()\n\t{\n\t\treturn inertia('Admin/roles/roles', [\n\t\t\t'roles' => Role::withCount('permissions', 'users')->get()\n\t\t]);\n\t}",
"public function index()\n {\n $roles = Role::all();\n return view('admin.roles.index', compact('roles'));\n }",
"public function index()\n {\n // return collection of all roles\n return RoleIndexResource::collection(Role::info()->get());\n }",
"public function index() {\n\t\tCache::store()->clear();\n\n\t\t$this->syncPermissions();\n\n\t\t$Roles = Role::query()->latest()->paginate( 20 );\n\n\t\treturn view( 'admin.roles.index', compact( 'Roles' ) );\n\t}",
"public function index()\n {\n $roles = $this->roleRepository->paginate();\n\n return view('avored::system.role.index')\n ->with('roles', $roles);\n }",
"public function indexRolesAction(){\n \n $entity = 'Jbig3\\Entity\\RolesEntity';\n $repositoryFunction = 'findAllRoles';\n $viewvar = 'roles';\n \n $repository = $this->em->getRepository($entity)->$repositoryFunction();\n $this->view->$viewvar = $repository;\n }",
"public function index()\n {\n $roles = Role::all();\n\n return view('admin.roles.index', compact('roles'));\n }",
"public function index()\n {\n $this->authorize('viewAny', Role::class);\n return Role::all();\n }",
"public function index()\n { \n $roles = Rol::all();\n return view('admin.admin_roles',['roles'=>$roles]);\n }",
"public function index()\n {\n $roles=Role::all();\n\n return view('user.roles',['roles' => $roles]);\n }",
"public function index()\n {\n $roles = Role::orderBy('id','DESC')->paginate(10);\n return view('admin::roles.index',compact('roles'));\n }",
"public function index()\n {\n $order = [\n 'column' => 'name',\n 'direction' => 'asc'\n ];\n if (auth()->user()->can('super')) {\n $data = Role::orderBy($order['column'], $order['direction'])->paginate(env('APP_RESULTS_PER_PAGE'));\n } else {\n $data = Role::where('visible', 1)->orderBy($order['column'], $order['direction'])->paginate(env('APP_RESULTS_PER_PAGE'));\n }\n\n return view('admin.role.index', compact('data', 'order'));\n }",
"public function getManageRoles()\n {\n $roles = Role::orderBy('id', 'asc')->paginate(10);\n return view('adminlte.pages.admin.manage-roles', compact('roles'));\n }",
"public function index()\n\t{\n\t\t$roles = Role::orderBy('id', 'DESC')->paginate(10);\n\n\t\treturn view('roles.index', compact('roles'))->with('i');\n\t}",
"public function index()\n {\n \t$roles = Role::all();\n \treturn view('admin.roles.index',compact('roles'));\n }",
"public function index() {\n \n $roles = RoleModel::all()->toArray();\n \n $this->layout->with('title', '角色列表');\n $this->layout->content = View::make('manage.roles.index')->with(compact('roles'));\n }",
"public function getList() {\n $data['data'] = $this->role->get();\n return view('roles.list_role',$data);\n }",
"public function index() {\n $this->data['roles'] = $this->role->all();\n return view('users::roles.index', ['data' => $this->data]);\n }",
"function get_all_roles() {\n return get_records('role', '', '', 'sortorder ASC');\n}",
"public function index()\n {\n $roles = Role::orderBy('name', 'asc')->get();\n \n return View::make(\"pvadmin.roles.index\")->with(array(\"roles\"=>$roles));\n }",
"public function index()\n {\n \n $roles = Role::orderBy('id','desc')->paginate(10);\n\n return view ('roles.index', compact('roles'));\n }",
"public function getAllRoles(): array;",
"public function index() {\n $roles = Role::all();\n return view('cpanel.role.index',compact('roles'));\n }",
"public function getRoles(){\n $db = new MainModel();\n $query = \"SELECT r.id as idRol, r.name as nameRol from roles as r\";\n return $response = $db->consultQueryAll($query);\n }",
"public function index()\n {\n $roles = Role::all();\n return view('roles.index', compact('roles'));\n }",
"public function index()\n {\n $roles = Role::orderBy('id','DESC')->get();\n return view('roles.index',compact('roles'));\n }",
"public function index()\n {\n $roles = Role::paginate(30);\n $table = RolePresenter::table($roles);\n\n Site::set('title', trans('orchestra/control::title.roles.list'));\n\n return View::make('orchestra/control::roles.index', array(\n 'roles' => $roles,\n 'table' => $table,\n ));\n }",
"public function index()\n {\n $roles = $this->role->all();\n\n return view('painel.roles.index',compact('roles'));\n }",
"public function index()\n {\n $roles = Role::all();\n return view('cpanel.roles.index', ['roles' => $roles]);\n }",
"public function index()\n {\n return view('settings.rights.role.index')->with([\n 'roles' => $this->roleRepo->getAll(),\n ]);\n }",
"public function getAllRoles()\n {\n return \\EntityManager::getRepository('stoykov\\Ohrana\\Models\\Doctrine\\Role')->findAll();\n }",
"public function index()\n {\n //\n return view('users.roles');\n }",
"public function index()\n {\n //\n if(! \\App\\Checker::is_permitted('roles'))\n return \\App\\Checker::display();\n\n $roles = Role::all();\n return view('roles.index', compact('roles'));\n }",
"public function index()\n {\n $roles = Role::all();\n return view('backend.pages.roles.index',compact('roles'));\n }",
"public function index()\n {\n return View::make('admin.roles.index', $this->data);\n }",
"public function roles();",
"public function roles();",
"public function roles();",
"public function roles();",
"public function index()\n {\n $roles = Role::all();\n return view('admin.role.index', compact('roles'));\n }",
"public function loadrolesAction(){\n $roles=Doctrine_Query::create()\n\t ->select(\"r.ID, r.role\")\n\t ->from(\"Roles r\")\n \t ->execute(null,Doctrine::HYDRATE_ARRAY);\n $this->emitTableResult($roles);\n }",
"public function index()\n {\n $roles = Role::all();\n $users = User::orderBy('role_id', 'asc')->get();\n return view('administration.roles.index', compact('users', 'roles'));\n }",
"function roleListing()\n {\n if ($this->isAdmin() == TRUE) {\n $this->loadThis();\n } else {\n $type = $this->login_id;\n $data['userRecords'] = $this->user_model->roleListing($type);\n\n $this->global['pageTitle'] = '角色管理';\n\n $this->loadViews(\"systemrolemanage\", $this->global, $data, NULL);\n }\n }",
"public function index()\n\t{\n\t\t\t\t$roles = Role::get();\n\t\t\t\treturn View::make('roles.index')\n\t\t\t\t\t\t->with('roles',$roles);\n\t}",
"public function index() {\n $this->authorize('hasaccess', 'roles.index');\n $roles = Role::Orderby('id', 'ASC')->paginate(10);\n $header = 'Roles';\n $slot = 'Slot';\n\t\treturn view('roles.index', compact('roles','header','slot'));\n\t}",
"public function index()\n {\n return Role::orderBy('type', 'asc')->get();\n }",
"public function index()\n {\n $roles = Role::all();\n\n return view('admin::pages.acl.role.index',compact('roles'));\n }",
"public function index()\n {\n $this->authorize('before', Role::class);\n $listing = Role::listing();\n $data = ['title' => 'Роли', 'listing' => $listing];\n return view('role', $data);\n }",
"public function getRoles()\n {\n #obsolete, I don't wnat user roles, I want the permission those roles are linked to\n # so I just need a getPermissions once, store those constants in a small session array\n #$roles = $this->roles;\n\n #d($roles);\n\n #foreach ($roles as $role) {\n # echo $role->name;\n #}\n }",
"public function getRoles()\n {\n $roles = Role::all();\n\n return Datatables::of($roles)\n ->editColumn('routes', function ($role) {\n return htmlentities(strlen($role->getOriginal('routes')) > 50 ? substr($role->getOriginal('routes'), 0, 50) : $role->getOriginal('routes'));\n })\n ->addColumn('actions', function ($role) {\n $editBtn = '<a style=\"margin-right: 0.2em;\" href=\"' . url('admin/roles/' . $role->id . '/edit/') . '\" title=\"Edit\"><i class=\"fa fa-2 fa-pencil\"></i></a>';\n $deleteBtn = '';\n if ($role->name != 'Admin') {\n $deleteBtn = ' <a href=\"' . url('admin/roles/' . $role->id) . '\" class=\"message_box text-danger\" data-box=\"#message-box-delete\" data-action=\"DELETE\" title=\"Permanent Delete\"><i class=\"fa fa-2 fa-remove\"></i></i></a>';\n }\n return $editBtn . $deleteBtn;\n })->make(true);\n }",
"public function index()\n {\n $this->authorize('admin');\n\n $roles = $this->role->all();\n\n return view('backend.roles.index', compact('roles'));\n }",
"public function index()\n {\n return view('laralum_roles::index', ['roles' => Role::paginate(50)]);\n }",
"public function index()\n {\n $data['roles'] = RolePermission::orderBy('id', 'desc')->get();\n return view('role.index')->with($data);\n }",
"public function index()\n {\n $this->role->pushCriteria(new RoleOrderCriteria());\n $roles = $this->role->all();\n\n return view('user::backend.roles.index', compact('roles'));\n }",
"public function index()\n {\n $roles = $this->service->index();\n return view('security.roles.index', compact('roles'));\n }",
"public function index()\n {\n return view('admin.users_block.roles.index');\n }",
"public function index()\n {\n $roles = Rol::all();\n return $this->showAll($roles);\n }",
"public function index()\n {\n $roles = Role::paginate(15);\n return view('roles.index', [\n 'roles' => $roles\n ]);\n }",
"public function index()\n {\n $roles = Role::orderBy('role_name')->get();\n return $roles->toJson();\n }",
"public function index()\n {\n $roles = Role::all();\n\n return view( 'role.index', compact( 'roles' ) );\n }",
"public function index()\n {\n $roles = Role::lowerPrivileged()->withCount('users')->get();\n\n $trashes = Role::onlyTrashed()->lowerPrivileged()->withCount('users')->get();\n\n return view('admin.role.index', compact('roles', 'trashes'));\n }",
"public function index()\n {\n $items = Role::paginate(50);\n $this->setUrl();\n return view('roles.index', compact('items'));\n }",
"public function index()\n {\n\t\t$roles = Role::filtersSearch(request(['search', 'order', 'method']))->latest()->get();\n return view('backend.settings.roles.index', compact('roles'));\n }",
"public function showRoles(Request $request) {\n\n $roles = Roles::paginate(10);\n \n return $roles;\n \n }",
"public function index()\n {\n $this->authorize('view', new Role);\n $roles = Role::all();\n return view('admin.roles.index', compact('roles'));\n }",
"public function index()\n {\n $data['title'] = 'Роли пользователей';\n $data['roles'] = Role::with('children')->where('parent_id', '0')->paginate(10);\n $data['delimiter'] = '';\n\n\n return view('admin.user_managment.role.index', $data);\n }",
"public function getAll()\n {\n return $this->roles->whereStatus(1)->orderBy('id', 'desc')->get();\n }",
"public function index()\n {\n return view ('roles.index');\n }",
"public function retrieveAllRoles()\n {\n return $this->invoker->getAllRoles($this->factory->createNewRolesObject());\n\n }",
"public function ObtenerRolesSupeAdmin()\r\n {\r\n return Rol::all();\r\n }",
"public function get_all_roles(){\n\t\treturn ORM::factory('role')->find_all()->as_array();\n\t}"
] | [
"0.8455415",
"0.83602434",
"0.8255102",
"0.8255102",
"0.81367034",
"0.81322205",
"0.8127872",
"0.8115405",
"0.8114395",
"0.8101543",
"0.8093251",
"0.80901355",
"0.80853444",
"0.8081643",
"0.8076624",
"0.8062214",
"0.8049331",
"0.80478114",
"0.8026725",
"0.80244803",
"0.8014718",
"0.80121934",
"0.80106103",
"0.8007443",
"0.80040205",
"0.80036354",
"0.8000226",
"0.7996126",
"0.7983582",
"0.797869",
"0.7975912",
"0.7966856",
"0.79586893",
"0.7955541",
"0.79539806",
"0.7947998",
"0.79446536",
"0.7939212",
"0.79371595",
"0.79342407",
"0.7922962",
"0.7910494",
"0.79081345",
"0.7895041",
"0.78866464",
"0.7886604",
"0.78794885",
"0.7878878",
"0.7870604",
"0.7868504",
"0.7861147",
"0.78604025",
"0.7854507",
"0.78517216",
"0.7851466",
"0.78512263",
"0.7844755",
"0.78445464",
"0.78398925",
"0.7838165",
"0.7835617",
"0.7828929",
"0.78271455",
"0.78249645",
"0.7816227",
"0.78142554",
"0.78142554",
"0.78142554",
"0.78142554",
"0.78025275",
"0.7793396",
"0.7792121",
"0.77882624",
"0.77855426",
"0.77827084",
"0.7781719",
"0.7753802",
"0.7746169",
"0.77386785",
"0.77357787",
"0.773533",
"0.77307487",
"0.7729652",
"0.77280134",
"0.77222383",
"0.77210104",
"0.7715959",
"0.7714615",
"0.7710126",
"0.7709221",
"0.77064306",
"0.7706369",
"0.770481",
"0.77039856",
"0.7703456",
"0.76911086",
"0.7690157",
"0.7689913",
"0.76761436",
"0.76725847",
"0.76722425"
] | 0.0 | -1 |
View module controller actions | public function viewactionsAction(){
$moduleId = $this->getRequest()->getParam('moduleId');
$moduleObj = new Modules_Model_Modules();
$moduleItem = $moduleObj->findById($moduleId);
$controllerId = $this->getRequest()->getParam('controllerId');
$controllerObj = new Modules_Model_Controllers();
$controllerItem = $controllerObj->findById($controllerId);
$permObj = new Permission_Model_Permission();
$permObj->setModuleId( $moduleId );
$permObj->setControllerId( $controllerId );
$this->view->module = $moduleItem;
$this->view->controller = $controllerItem;
$this->view->records = $permObj->fetchActionsByControllerModule();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function actionView() {}",
"public function actionView() {}",
"public function viewAction()\r\n {\r\n $this->indexAction();\r\n }",
"public function indexAction () {\r\n $this->_helper->viewRenderer->setNoRender(false);\r\n $this->_helper->layout()->enableLayout();\r\n $this->view->assign('controller', $this->_request->getControllerName());\r\n $this->view->assign('module', $this->_request->getModuleName());\r\n }",
"protected function viewAction()\n {\n }",
"public function actionView()\n {\n \n }",
"public function actionIndex()\n {\n return \"Module controller\";\n }",
"public function indexAction()\n {\n\t\techo 'Module Admin IndexController indexAction';\n\t\t\n }",
"public function IndexAction() {\r\n $this->ExecuteView();\r\n }",
"public function Index() {\n $modules = new CMModules();\n $controllers = $modules->AvailableControllers();\n $allModules = $modules->ReadAndAnalyse();\n $this->views->SetTitle('Manage Modules')\n ->AddInclude(__DIR__ . '/index.tpl.php', array('controllers'=>$controllers), 'primary')\n ->AddInclude(__DIR__ . '/sidebar.tpl.php', array('modules'=>$allModules), 'sidebar');\n }",
"public function indexAction()\n {\n //for real application\n }",
"public function indexAction() {\r\n \r\n }",
"public function indexAction() {}",
"public function indexAction() {}",
"public function indexAction() {}",
"public function indexAction() {}",
"public function indexAction() {}",
"public function indexAction() {}",
"public function indexAction() {}",
"public function indexAction() {}",
"public function indexAction() {}",
"public function indexAction()\n {\n// $this->view = 'index';\n }",
"public function indexAction() {}",
"public function indexAction() {}",
"public function indexAction ()\r\n {\r\n\r\n }",
"public function indexAction() {\r\n }",
"public function actionView()\n\t{\n\t\t$this->render('view');\n\t}",
"public function indexAction()\n {\n $controllers = array();\n\n FOREACH($this->dbCtrl->fetchAllOrderByModuleController() AS $row) {\n $controllers[] = new Admin_Model_DbRow_Controller($row);\n }\n\n $this->view->controllers = $controllers;\n }",
"public function action() {\n // $this->view->page();\n }",
"protected function indexAction() {}",
"public function indexAction(){\t\t\n\t}",
"public function indexAction() {\n\n\n\n\n }",
"public function indexAction(){\r\n\t\t\t\r\n\t\t}",
"public function indexAction(){}",
"public function indexAction(){\n\n}",
"public function actionIndex()\r\n\t{\r\n\t\t$modules = ModuleModel::instance()->find();\r\n\t\t$this->render('index', array('modules' => $modules));\r\n\t}",
"public function indexAction()\r\n {\r\n //$content = $t->to_test();\r\n //默认Action\r\n //toLog('index');\r\n dump(Dispatcher::getInstance()->getRouter()->getRoutes());\r\n $this->getView()->assign(\"content\", \"hello world\");\r\n }",
"function index()\n {\n $this->_view_edit('view');\n }",
"public function indexAction() {\n }",
"public function indexAction() {\n }",
"public function indexAction() {\n\n }",
"public function indexAction() {\n\n }",
"public function showAction(){\n\n }",
"public function actionM() {\n\t\t$this->render('index');\n\t\t// $module = \\Yii::$app->controller->module;\n\t\t// var_dump($module->params);\n\t}",
"public function indexAction()\n {\n }",
"public function indexAction()\n {\n }",
"public function indexAction()\n {\n }",
"public function indexAction()\n {\n }",
"public function indexAction()\n {\n }",
"public function indexAction()\n {\n }",
"public function actionIndex() {}",
"public function actionIndex() {}",
"function action_view()\n {\n $this->addStatusFields();\n return parent::action_view();\n }",
"public function indexAction()\n {\n\n }",
"public function indexAction()\n {\n\n }",
"public function indexAction()\n {\n\n }",
"public function indexAction()\n {\n\n }",
"public function indexAction()\n {\n\n }",
"public function indexAction()\n {\n\n }",
"public function indexAction()\n\t{\n\t\t$this->_forward('view');\n\t}",
"public function index()\n {\n \n\t\t$this->arr_view_data['page_title'] = \"Manage \".$this->module_title;\n $this->arr_view_data['parent_module_icon'] = \"fa fa-home\";\n $this->arr_view_data['parent_module_title'] = \"Dashboard\";\n $this->arr_view_data['parent_module_url'] = url('/').'/admin/dashboard';\n $this->arr_view_data['module_icon'] = $this->module_icon;\n $this->arr_view_data['module_title'] = \"Manage \".$this->module_title;\n\t\t$this->arr_view_data['module_url_path'] = $this->module_url_path;\n\t\t$this->arr_view_data['admin_url_path'] = $this->admin_url_path;\n\t\t$this->arr_view_data['admin_panel_slug'] = $this->admin_panel_slug;\n\t\n\t\t\n\t\treturn view($this->module_view_folder.'.index',$this->arr_view_data);\n }",
"public function indexAction() \n\t{\n\t\t$this->_forward('view');\n\t}",
"public function singleIndexAction() {}",
"public function indexAction()\n {}",
"public function View($module) {\n if(!preg_match('/^C[a-zA-Z]+$/', $module)) {throw new Exception('Invalid characters in module name.');}\n $modules = new CMModules();\n $controllers = $modules->AvailableControllers();\n $allModules = $modules->ReadAndAnalyse();\n $aModule = $modules->ReadAndAnalyseModule($module);\n $this->views->SetTitle('Manage Modules')\n ->AddInclude(__DIR__ . '/view.tpl.php', array('module'=>$aModule), 'primary')\n ->AddInclude(__DIR__ . '/sidebar.tpl.php', array('modules'=>$allModules), 'sidebar');\n }",
"public function index() {\n\t\t$data = $this->load_module_info ();\n\t\t\n\t\t$this->layout->display_admin ( $this->folder . $this->module . \"-list\", $data );\n\t}",
"public function indexAction()\n {\n\n }",
"public function indexAction()\n {\n $ctrl = $this->dbController->find($this->checkControllerIdParam());\n $vCtrl = FALSE;\n $vAction = array();\n\n IF($ctrl->count() === 1) {\n $ctrlRow = new Admin_Model_DbRow_Controller($ctrl->current());\n\n FOREACH($this->dbAction->findActionByControllerId($ctrlRow->get('id')) AS $row) {\n $vAction[] = new Admin_Model_DbRow_Action($row);\n }\n\n $vCtrl = $ctrlRow;\n }\n \n $this->view->controller = $vCtrl;\n $this->view->actions = $vAction;\n }",
"public function indexAction() {\n \n }",
"public function indexAction() \n {\n \t\n }",
"public function indexAction() {\n\t}",
"public function indexAction() {\n\t}",
"function indexAction()\n {\n parent::indexAction();\n $this->view->title = \"Data Importer\";\n }",
"public function indexAction()\n {\n // action body\n }",
"public function indexAction()\n {\n $this->_forward('view');\n }",
"public function indexAction()\n {\n \n }",
"public function indexAction()\n {\n \n }",
"public function showAction() {}",
"public function actionIndex() {\r\n echo \" I am here\";\r\n }",
"public function indexAction() {\r\n\r\n// NSP::$app->registry->view->welcome = 'Welcome to NSP MVC';\r\n//\r\n// /*** load the index template ***/\r\n NSP::$app->view->viewVar = 'Rest controller';\r\n NSP::$app->registry->get('view')->show('index');\r\n }",
"public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}",
"public function indexAction() {\n\n\t}",
"public function actionIndex()\n {\n\n }",
"function index()\r\n\t{\r\n\t\t$this->view(); \r\n\t}",
"protected function indexAction()\n {\n }",
"public function admincp_index(){\n\t\tmodules::run('admincp/chk_perm',$this->session->userdata('ID_Module'),'r',0);\n\t\t$default_func = 'status';\n\t\t$default_sort = 'ASC';\n\t\t$data = array(\n\t\t\t'module'=>$this->module,\n\t\t\t'module_name'=>$this->session->userdata('Name_Module'),\n\t\t\t'default_func'=>$default_func,\n\t\t\t'default_sort'=>$default_sort\n\t\t);\n\t\t$this->template->write_view('content','index',$data);\n\t\t$this->template->render();\n\t}",
"public function actionIndex()\n {\n\t\techo \"=== Action index ===\";\n \n }",
"public function indexAction()\n\t{\n\n\t}",
"public function actionIndex()\n {}",
"public function actionIndex(){\n \n $modPendaftaran = new RKPendaftaranT;\n $modPasien = new RKPasienM;\n $this->render($this->path_view.'index',array(\n 'modPendaftaran'=>$modPendaftaran,\n 'modPasien'=>$modPasien,\n ));\n \t\n\t}",
"public function action_view()\n {\n // Correct page has been loaded in the before() function\n $pagename = Wi3::inst()->routing->args[0];\n $this->prepareForViewing($pagename);\n // Render page\n $renderedInAdminArea = false;\n $this->request->response = Wi3_Renderer::renderPage($pagename, $renderedInAdminArea);\n // Page caching will be handled via an Event. See bootstrap.php and the Caching plugin\n }",
"public function indexAction()\n {\n $this->render('/views/index.html');\n }",
"public function fooAction()\n {\n // are working when you browse to /module-specific-root/Index/foo\n return array();\n }",
"public function actionIndex()\n\n {\n\n echo 'Index action has not used.';\n\n }",
"public function actionIndex()\n {\n $this->layout = \"main_module\";\n return $this->render('index');\n }",
"function index() {\n\t\t\t$this->redirect(array('action' => 'view'));\n\t\t}",
"public function index(){\r\n $this->display();\r\n }",
"abstract public function actionIndex();",
"public function indexAction() {\n\t\t$this->view->data = \"OK\"; \t\t\t\t\t\n\t\t\t\n\t}",
"public function action_index()\n {\n }"
] | [
"0.7992516",
"0.7992516",
"0.79832315",
"0.7858633",
"0.7796232",
"0.76896656",
"0.7637314",
"0.7578816",
"0.74148715",
"0.738777",
"0.7324321",
"0.73125964",
"0.7303295",
"0.7303295",
"0.7303295",
"0.7303295",
"0.7303295",
"0.7303295",
"0.7303295",
"0.7303295",
"0.7303295",
"0.73028857",
"0.7301697",
"0.7301563",
"0.7299225",
"0.7245751",
"0.7235788",
"0.7234731",
"0.72321486",
"0.7220176",
"0.72139925",
"0.7208427",
"0.7205493",
"0.71913886",
"0.7187222",
"0.7185547",
"0.7176025",
"0.71654797",
"0.7157742",
"0.7157742",
"0.71389765",
"0.71389765",
"0.71192396",
"0.71134764",
"0.7113373",
"0.7113373",
"0.7113373",
"0.7113373",
"0.7113373",
"0.7113373",
"0.7106693",
"0.7106693",
"0.7102824",
"0.7099907",
"0.7099907",
"0.7099907",
"0.7099907",
"0.7099907",
"0.7099907",
"0.70967543",
"0.7093082",
"0.7086655",
"0.708509",
"0.7083495",
"0.70785564",
"0.7074496",
"0.7073804",
"0.70722353",
"0.7067985",
"0.7062639",
"0.7062101",
"0.7062101",
"0.7050037",
"0.70478404",
"0.7044319",
"0.70345783",
"0.70345783",
"0.70293254",
"0.70094126",
"0.70082724",
"0.7001483",
"0.6975705",
"0.6970692",
"0.6949755",
"0.69440335",
"0.6940802",
"0.69344664",
"0.6917307",
"0.69023985",
"0.6900203",
"0.6893467",
"0.689167",
"0.68856263",
"0.6882695",
"0.6880874",
"0.68776417",
"0.6867079",
"0.68668175",
"0.6865362",
"0.6856847"
] | 0.80764145 | 0 |
The index action for view allows a user to view his role. | public function viewAction() {
$role = new Role_Model_Role();
$this->view->record = $role->findById($this->getRequest()->getParam('id'));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function index()\n {\n return view(\"permission.role.index\");\n }",
"public function index()\n\t{\n\t\treturn view('role.index');\n\t}",
"public function index()\n {\n //\n return view(\"admin.role.view-all\");\n }",
"public function index()\n {\n //\n return view('admin.role.index');\n }",
"public function index()\n {\n //$role = (new AclRole())->getRole();\n $role = AclUser::orderBy('id', 'desc')->get();\n return view('Admin.acl.role.index', ['role' => $role]);\n }",
"public function index()\n {\n $order = [\n 'column' => 'name',\n 'direction' => 'asc'\n ];\n if (auth()->user()->can('super')) {\n $data = Role::orderBy($order['column'], $order['direction'])->paginate(env('APP_RESULTS_PER_PAGE'));\n } else {\n $data = Role::where('visible', 1)->orderBy($order['column'], $order['direction'])->paginate(env('APP_RESULTS_PER_PAGE'));\n }\n\n return view('admin.role.index', compact('data', 'order'));\n }",
"public function index()\n\t{\n\t\t$pagetitle = 'User Role';\n\n\t\t$role = Role::orderBy('name')->paginate(5);\n\t\treturn View::make('role.index', compact('pagetitle', 'role'));\n\t}",
"public function actionIndex()\n {\n if(!Yii::$app->role->isOwner())\n {\n \n throw new ForbiddenHttpException('You do not have permission to access this page.');\n }\n\n $searchModel = new UserRolesSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams, Yii::$app->company->getCompanyID());\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function index()\n {\n $this->authorize('view', new Role);\n $roles = Role::all();\n return view('admin.roles.index', compact('roles'));\n }",
"public function index()\n {\n //\n $roles = Role::all();\n return view('role-permission.role.index', compact('roles'));\n }",
"public function index()\n {\n if(!$this->checkPermission())\n return redirect('home');\n\n $role = Role::all();\n\n\n return view('admin.role.role_list', compact('role'));\n }",
"public function index()\n\t{\n Return View::make(\"roles.index\");\n\t}",
"public function index()\n {\n return view ('roles.index');\n }",
"public function indexRolesAction(){\n \n $entity = 'Jbig3\\Entity\\RolesEntity';\n $repositoryFunction = 'findAllRoles';\n $viewvar = 'roles';\n \n $repository = $this->em->getRepository($entity)->$repositoryFunction();\n $this->view->$viewvar = $repository;\n }",
"public function index()\n\t{\n\t\t$roles = Role::all();\n\n\t\treturn View::make('role.index', compact('roles'));\n\t}",
"public function index()\n {\n $roles = Role::get();\n return view('acl::roles.index',compact('roles'));\n }",
"public function actionIndex() {\n// $userId = Yii::$app->user->id;\n// echo Yii::$app->user->id;\n// echo Yii::$app->authManager->getRoles();\n return $this->render('index', ['model' => $this->findModel(1)]);\n }",
"public function index()\n\t{\n\t\t\t\t$roles = Role::get();\n\t\t\t\treturn View::make('roles.index')\n\t\t\t\t\t\t->with('roles',$roles);\n\t}",
"public function index()\n {\n $roles = Role::all();\n return view('admin.role.index', compact('roles'));\n }",
"public function index()\n {\n \t$roles = Role::all();\n \treturn view('admin.roles.index',compact('roles'));\n }",
"public function indexAction()\n {\n \t$users = $this->get('security.context')->getToken()->getUser();\n\t\t$roles = $users->getRoles();\n\t\t$session = $this->getRequest()->getSession();\n \tif(!empty($roles[0]))\n \t{\n\t\t\t$session->set('role_name', $roles[0]->getName());\n\t\t\t$session->set('role_title', $roles[0]->getTitle());\n \t}\n \treturn $this->render('AdminBundle:Default:index.html.twig');\n }",
"public function index()\n\t{\n\t\t$roles = Role::lists('name', 'id');\n\t\t$selected_role = null;\n\t\treturn view('users.index', compact('roles','selected_role'));\n\t}",
"public function index()\n {\n //\n return view('roles.index');\n }",
"public function indexAction()\n {\n $journal = $this->get('ojs.journal_service')->getSelectedJournal();\n if (!$this->isGranted('VIEW', $journal, 'userRole')) {\n throw new AccessDeniedException(\"You are not authorized for view this page\");\n }\n\n $source = new Entity('OjsJournalBundle:JournalRole');\n $source->addHint(Query::HINT_CUSTOM_OUTPUT_WALKER, 'Gedmo\\\\Translatable\\\\Query\\\\TreeWalker\\\\TranslationWalker');\n\n $grid = $this->get('grid')->setSource($source);\n $gridAction = $this->get('grid_action');\n $actionColumn = new ActionsColumn(\"actions\", \"actions\");\n $rowAction[] = $gridAction->switchUserAction('ojs_public_index', ['user.username'], null, 'user.username');\n $rowAction[] = $gridAction->showAction('ojs_journal_role_show', 'id');\n $rowAction[] = $gridAction->editAction('ojs_journal_role_edit', 'id');\n $rowAction[] = $gridAction->deleteAction('ojs_journal_role_delete', 'id');\n $actionColumn->setRowActions($rowAction);\n $grid->addColumn($actionColumn);\n $data['grid'] = $grid;\n\n return $grid->getGridResponse('OjsJournalBundle:JournalRole:index.html.twig', $data);\n }",
"public function index()\n {\n\n $this->authorize('viewAny', User::class);\n\n $users = User::with('roles')->paginate();\n//\n\n return view('users.index', compact('users'));\n }",
"public function index()\n {\n if (auth()->check() and auth()->user()->can(\"index\", new Role)) {\n $roleid = auth()->user()->getRolesRight();\n $tasks = Role::where(\"Right\", \"<=\", $roleid)->get();\n return view($this->urltoview . \".index\", [\"roleid\" => $roleid ,\"tasks\" => $tasks ]);\n }\n }",
"public function index()\n\t{\n\t\t//check permission\n\t\tif(!Auth::user()->hasPermission('showRole')){\n\t\t\treturn redirect()->route('admin.getHome')->with('flash_message_error', '403! Không thể Show Role');\n\t\t}\n\t\t//\n\t\t$role = Role::where('id', '>=', 1)->with('permissionRole.permission')->get();\n\t\t// dump($role);\n\t\treturn view('admin.role.index', compact('role'));\n\t}",
"public function index()\n {\n $roles = Role::all();\n\n return view( 'role.index', compact( 'roles' ) );\n }",
"public function index()\n {\n // Gate::authorize('haveaccess', 'rol.index');\n\n $roles= Role::orderBy('id','Asc')->paginate(5);\n \n return view('Roles.indexr',['roles'=>$roles]);\n }",
"public function index()\n {\n //\n if(! \\App\\Checker::is_permitted('roles'))\n return \\App\\Checker::display();\n\n $roles = Role::all();\n return view('roles.index', compact('roles'));\n }",
"public function index()\n {\n $this->authorize('viewAny', Role::class);\n return Role::all();\n }",
"public function index()\n {\n $roles = Role::all();\n\n return view('admin::pages.acl.role.index',compact('roles'));\n }",
"public function index()\n {\n $this->authorize('before', Role::class);\n $listing = Role::listing();\n $data = ['title' => 'Роли', 'listing' => $listing];\n return view('role', $data);\n }",
"public function index()\n {\n $s= session_n_role_chk();\n $data = role::latest()->paginate(5);\n return view('admin.role', compact('data'))->with('i', (request()->input('page', 1) - 1) * 5);\n }",
"public function index()\n {\n if(Auth::user()->can('list-roles')){\n $roles = Role::orderBy('id', 'DESC')->get();\n return view(\"roles.index\", compact('roles'));\n }else{\n return back()->with('error',\"Vous n'avez pas ce droit\");\n } \n }",
"public function index()\n {\n $roles = Role::lowerPrivileged()->withCount('users')->get();\n\n $trashes = Role::onlyTrashed()->lowerPrivileged()->withCount('users')->get();\n\n return view('admin.role.index', compact('roles', 'trashes'));\n }",
"public function index()\n {\n $roles = $this->roleRepository->paginate();\n\n return view('avored::system.role.index')\n ->with('roles', $roles);\n }",
"public function index()\n {\n $oUsers = User::get();\n $oRoles = Role::get();\n return view('roles.index',compact('oUsers','oRoles'));\n }",
"public function index()\n {\n\t\t$roles = $this->roles->getAllWithUsersCount();\n\n\t\treturn view('permission.role.index', compact('roles'));\n\t}",
"public function index() {\n $roles = Role::all();\n return view('cpanel.role.index',compact('roles'));\n }",
"public function indexAction() {\n\t\t$this->getFlashMessages();\n\t\t$role = new Role_Model_Role();\n\t\t$column = $this->getRequest()->getParam('column');\n\t\t$sort = $this->getRequest()->getParam('sort');\n\n\t\t$this->view->role = $this->paginate($role->fetchAll($column, $sort));\n\t\t$this->view->sort = ( $sort=='ASC') ? 'DESC' : 'ASC';\n\t}",
"public function index()\n {\n // display all users, who have been assigned roles\n $users = $this->user->has('roles', true);\n\n return view('backend.access-control.index', compact('users'));\n }",
"public function index()\n {\n $user = User::where('role','!=', 0)->get();\n return view('admin.users.index', compact('user'));\n }",
"public function index()\n {\n // 列表显示\n $data = Role::all();\n // 要和resource形成的名称一致\n return view('admin.role.index',compact('data'));\n\n }",
"public function index()\n {\n\n return view('roles.index');\n }",
"public function index()\n {\n $roles = Role::all();\n return view('roles.index', compact('roles'));\n }",
"public function index()\n {\n $roles = Role::all();\n $permissions = Permission::all();\n return view('role.index', compact('roles', 'permissions'));\n }",
"public function index()\n {\n $roles = Role::all();\n $permissions = Permission::with('roles')->get();\n\n return view('role.index', compact('roles', 'permissions'));\n }",
"public function index()\n {\n $roles = $this->roleRepository->paginateRoles(5); // 5 contents per page\n //return the view containing the lists of users\n return view('admin.roles.index', compact('roles'));\n }",
"public function index()\n {\n $role=Role::paginate(10);\n return view('superadmin.role.index',compact('role'));\n }",
"public function index()\n {\n $roles = $this->role->all();\n return view('admin.role.list',compact('roles'));\n }",
"public function index()\n {\n $data['roles'] = RolePermission::orderBy('id', 'desc')->get();\n return view('role.index')->with($data);\n }",
"public function index()\n {\n //\n return view('users.roles');\n }",
"function index()\n {\n $data['t_role'] = $this->Role_model->get_all_t_role();\n $data['nb_role'] = ($data['t_role'] != null && count($data['t_role']) >0 ) ? count($data['t_role']) : 0;\n \n $data['_view'] = 'role/index';\n $this->load->view('layouts/main',$data);\n }",
"public function index()\n {\n $role=Role::orderBy('created_at')->get();\n return view('admin.pages.index_role')->withRole($role);;\n }",
"public function index() {\n \n $roles = RoleModel::all()->toArray();\n \n $this->layout->with('title', '角色列表');\n $this->layout->content = View::make('manage.roles.index')->with(compact('roles'));\n }",
"public function index()\n {\n $roles = $this->roleRepository->all();\n $permissions = $this->permissionRepository->all();\n\n return view('role.index', compact('roles', 'permissions'));\n }",
"public function index()\n {\n $roles = Role::all();\n return view('admin.roles.index', compact('roles'));\n }",
"public function index()\n {\n //\n $roleList = Role::orderBy('role_name','asc')->get();\n \n return view('user_management/role/index', ['roleList' => $roleList]);\n }",
"public function index()\n {\n $roles = Role::all();\n $permissions = Permission::all();\n return view('admin.role.index', compact('roles', 'permissions'));\n }",
"public function index()\n {\n $roleGrid = new RoleDataGrid($this->repository->query());\n\n return view('avored-framework::system.role.index')->with('dataGrid', $roleGrid->dataGrid);\n }",
"public function index() {\n $this->authorize('hasaccess', 'roles.index');\n $roles = Role::Orderby('id', 'ASC')->paginate(10);\n $header = 'Roles';\n $slot = 'Slot';\n\t\treturn view('roles.index', compact('roles','header','slot'));\n\t}",
"public function index()\n {\n $roles = Role::all();\n return view('cpanel.roles.index', ['roles' => $roles]);\n }",
"public function index()\n {\n $roles = Role::paginate(100);\n return view(\"admin.roles.index\", compact(\"roles\"));\n }",
"public function index()\n {\n\t\tif (Auth::check()) {\n\t\t\t$roles = Role::all();\n\t\t\treturn view('roles.index', compact('roles'));\n\t\t}else{\n\t\t\treturn view('auth\\login');\n\t\t}\n }",
"public function index() {\n $roles = Role::all();\n return view('admin.roles.index')->with('roles', $roles);\n }",
"public function index() {\n $this->data['roles'] = $this->role->all();\n return view('users::roles.index', ['data' => $this->data]);\n }",
"public function index()\n {\n $roles = Role::all();\n $users = User::orderBy('role_id', 'asc')->get();\n return view('administration.roles.index', compact('users', 'roles'));\n }",
"public function index()\n {\n $per_page = 20;\n return view('admin.role.index')\n ->withRoles($this->role->getRolePaginated($per_page));\n }",
"public function index()\n {\n $users = User::where('role_id', 1)->get();\n\n return view('agent.users.index', [\n 'users' => $users\n ]);\n }",
"public function index()\n {\n $roles = Role::orderBy('name', 'asc')->get();\n \n return View::make(\"pvadmin.roles.index\")->with(array(\"roles\"=>$roles));\n }",
"public function index()\n {\n if (! Gate::allows('user_action_access')) {\n return abort(401);\n }\n\n\n $user_actions = UserAction::all();\n\n return view('admin.user_actions.index', compact('user_actions'));\n }",
"public function index()\n {\n $users =User::where('role_id',2)->get();\n return view('admin.users.index',compact('users'));\n }",
"public function index()\n {\n $roles = App\\User::find(1)->roles()->orderBy('name')->get();\n }",
"public function index()\n {\n $roles = $this->role->all();\n\n return view('painel.roles.index',compact('roles'));\n }",
"public function index(){\n $datas=$this->userRoleDetailService->getActiveRoleDetail();\n return view('admin.list-userRoleDetail',compact('datas'));\n }",
"public function index()\n {\n $roles = Role::all();\n return view('backend.role.index',['roles'=>$roles]);\n }",
"public function index()\n {\n if (\\Gate::allows('isAdmin') || \\Gate::allows('isSKAdmin')) {\n return Role::latest()->paginate(5);\n }\n }",
"public function index()\n {\n $users = User::all();\n $roles = role::all();\n return view('admin.user.index',compact('users','roles'));\n\n }",
"public function index()\n {\n abort_unless(Gate::allows('roles_access'), 403);\n return Inertia::render('Admin/Management/User/Roles/Index',[\n 'roles' => $this->roleRepository->allWithPermissions(),\n ]);\n }",
"public function index()\r\n {\r\n $roles = AdminRole::all();\r\n return view('admin.role.list')->with('roles', $roles);\r\n }",
"public function index()\n {\n $roles = Role::all();\n\n return view('admin.roles.index', compact('roles'));\n }",
"public function index()\n {\n return view('roles.index')->with('roles', Role::all());\n }",
"public function indexAction() {\n\t\t//die(var_dump($this->getUser()));\n \t$user = $this->get('security.context')->getToken()->getUser();\n\t\t$userRole = $user->getRoles();\n \t//die(var_dump($user = $this->get('security.context')->getToken()->getUser()));\n \t\n\t\treturn $this->render('AcsilServerAppBundle:Acsil:home.html.twig', \n\t\t\tarray(\n\t\t\t\t'user' => $user,\n\t\t\t\t'userRole' => $userRole[0],\n\t\t\t));\n }",
"public function index()\n {\n $users = $this->user->all();\n return View::make('RoleManager::users.index', compact('users'));\n }",
"public function index()\n\t{\n\t\t$roles = Role::orderBy('id', 'DESC')->paginate(10);\n\n\t\treturn view('roles.index', compact('roles'))->with('i');\n\t}",
"public function index()\n {\n $this->authorize('admin');\n\n $roles = $this->role->all();\n\n return view('backend.roles.index', compact('roles'));\n }",
"public function index()\n {\n $table = roles::all();\n return view('roles.index', [\"table\" => $table ]);\n }",
"public function indexAction() {\n if (in_array(0, $this->_rolesUser) || in_array(1, $this->_rolesUser)) $this->_redirect(\"/admintool/index/go\");\n \n // traductores\n if (in_array(2, $this->_rolesUser)) $this->_redirect(\"/admintool/index/translate\"); \n }",
"public function index()\n {\n $data = User::whereRole(2)->get();\n return view('admin.peserta.index', compact('data'));\n }",
"public function index()\n {\n $roles = role::all();\n $users = User::where('id','>',1000)->orderBy('id','desc')->get();\n return view('admin.user.index',compact('roles','users'));\n }",
"public function index()\n {\n if (Auth()->user()->can('admin.list')) {\n $users = User::where('id','!=',1)->where('role_id',1)->get();\n return view('admin.admin.index', compact('users'));\n }\n }",
"public function index()\n {\n $roles = Role::all();\n return view('backend.pages.roles.index',compact('roles'));\n }",
"public function index()\n {\n $users=User::all()->sortBy('role_id');\n $roles=Role::pluck('name','id')->all();\n return view('Manager.Users.index',compact('users','roles'));\n \n }",
"public function index()\n {\n $roles = Role::orderBy('id','DESC')->get();\n return view('roles.index',compact('roles'));\n }",
"public function index()\n {\n $roles = Role::all();\n $title='Roles List';\n return view('access::role.list', ['roles' => $roles,'title'=>$title]);\n }",
"public function index()\n {\n $roles = Role::orderBy('id','DESC')->paginate(10);\n return view('admin::roles.index',compact('roles'));\n }",
"public function index()\n {\n $roles = Role::all();\n return $this->showAll($roles, 200);\n }",
"public function index()\n {\n return view('laralum_roles::index', ['roles' => Role::paginate(50)]);\n }",
"public function index()\n {\n $this->authorize('viewAny', User::class);\n\n // List the users...\n }"
] | [
"0.8076772",
"0.80112755",
"0.8008354",
"0.7939557",
"0.7933555",
"0.7922165",
"0.79122573",
"0.7884108",
"0.7873949",
"0.7873332",
"0.78178376",
"0.78093266",
"0.77648544",
"0.77590454",
"0.7748243",
"0.77447236",
"0.7740896",
"0.77377594",
"0.7733601",
"0.773007",
"0.7723957",
"0.77225196",
"0.7720294",
"0.77109843",
"0.7709127",
"0.77076423",
"0.77013075",
"0.76992404",
"0.7699092",
"0.7694691",
"0.7693446",
"0.76931155",
"0.7687804",
"0.76780283",
"0.76561445",
"0.7655299",
"0.7649056",
"0.7644014",
"0.7639424",
"0.76120865",
"0.76097167",
"0.758728",
"0.7586663",
"0.75826865",
"0.75821775",
"0.7581028",
"0.7579435",
"0.75770766",
"0.75751835",
"0.75711775",
"0.75707793",
"0.75652814",
"0.7564319",
"0.7559777",
"0.7553794",
"0.7552631",
"0.75520283",
"0.75514823",
"0.75501645",
"0.7546776",
"0.75425714",
"0.754212",
"0.7538184",
"0.75379217",
"0.75372714",
"0.75366163",
"0.7535277",
"0.7534839",
"0.75327235",
"0.7526533",
"0.7520675",
"0.75131184",
"0.7510855",
"0.7506571",
"0.7503216",
"0.7502843",
"0.7500118",
"0.7488893",
"0.7483861",
"0.7483818",
"0.74746776",
"0.7468258",
"0.74655133",
"0.7462905",
"0.746121",
"0.7459451",
"0.74589753",
"0.74522024",
"0.74504197",
"0.7447029",
"0.7444972",
"0.744135",
"0.7440492",
"0.7430091",
"0.74277705",
"0.74268425",
"0.7425756",
"0.7424538",
"0.7423271",
"0.74211556"
] | 0.75058997 | 74 |
============================ CMS LOGIN ============================== | public function show(Request $request){
$request->session()->forget('message');
return view('pages/user/login');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function login(){\n \n }",
"public function login();",
"public function login();",
"function Login()\n{\n\tglobal $txt, $context;\n\n\t// You're not a guest, why are you here?\n\tif (we::$is_member)\n\t\tredirectexit();\n\n\t// We need to load the Login template/language file.\n\tloadLanguage('Login');\n\tloadTemplate('Login');\n\twetem::load('login');\n\n\t// Get the template ready.... not really much else to do.\n\t$context['page_title'] = $txt['login'];\n\t$context['default_username'] =& $_REQUEST['u'];\n\t$context['default_password'] = '';\n\t$context['never_expire'] = false;\n\t$context['robot_no_index'] = true;\n\n\t// Add the login chain to the link tree.\n\tadd_linktree($txt['login'], '<URL>?action=login');\n\n\t// Set the login URL - will be used when the login process is done (but careful not to send us to an attachment).\n\tif (isset($_SESSION['old_url']) && strpos($_SESSION['old_url'], 'dlattach') === false && strhas($_SESSION['old_url'], array('board=', 'topic=', 'board,', 'topic,')))\n\t\t$_SESSION['login_url'] = $_SESSION['old_url'];\n\telse\n\t\tunset($_SESSION['login_url']);\n}",
"public function login(){\n \t\t//TODO redirect if user already logged in\n \t\t//TODO Seut up a form\n \t\t//TODO Try to log in\n \t\t//TODO Redirect\n \t\t//TODO Error message\n \t\t//TODO Set subview and load layout\n\n \t}",
"function shopLogin()\r\n\t{\r\n\t\t$tpl_dir = BASE_DIR . \"/modules/login/templates/\";\r\n\t\t$lang_file = BASE_DIR . \"/modules/login/lang/\" . STD_LANG . \".txt\";\r\n\r\n\t//\t$login = new Login;\r\n\r\n\t\tif(!isset($_SESSION[\"cp_benutzerid\"]))\r\n\t\t\treturn $this->displayLoginform($tpl_dir,$lang_file);\r\n\t\telse\r\n\t\t\treturn $this->displayPanel($tpl_dir,$lang_file);\r\n\t}",
"public function p_login() {\n\n\t\t# Sanitize the user entered data to prevent any funny-business (re: SQL Injection Attacks)\n\t\t$_POST = DB::instance(DB_NAME)->sanitize($_POST);\n\n\t\t# Hash submitted password so we can compare it against one in the db\n\t\t$_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']);\n\n\t\t# Search the db for this email and password\n\t\t# Retrieve the token if it's available\n\t\t$q = \"SELECT token \n\t\t\tFROM users \n\t\t\tWHERE email = '\".$_POST['email'].\"' \n\t\t\tAND password = '\".$_POST['password'].\"'\";\n\n\t\t$token = DB::instance(DB_NAME)->select_field($q);\n\n\t\t# If we didn't find a matching token in the database, it means login failed\n\t\tif(!$token) {\n\n\t\t\t# Send them back to the login page\n\t\t\tRouter::redirect(\"/users/login/error\");\n\n\t\t# But if we did, login succeeded! \n\t\t} else {\n\t\t\tsetcookie(\"token\", $token, strtotime('+1 year'), '/');\n\t\t\t# Send them to the main page - or whever you want them to go\n\t\t\tRouter::redirect(\"/\");\n\t\t}\n\t}",
"public function _check_login()\n {\n\n }",
"function login() {\n \t$this->set('indata',$this->data);\n\t\tif(empty($this->data)){\n\t\t\t$this->pageTitle = 'Log in';\n\t\t\t$cookie = $this->Cookie->read('Auth.User');\n\t\t}\n }",
"abstract protected function doLogin();",
"function login() \n\t{\n // Specify the navigation column's path so we can include it based\n // on the action being rendered\n \n \n // check for cookies and if set validate and redirect to corresponding page\n\t\t$this->viewData['navigationPath'] = $this->getNavigationPath('users');\n\t\t$this->renderWithTemplate('users/login', 'MemberPageBaseTemplate');\n\t\t\n }",
"public function loginAction()\r\n\t{\r\n\t\t$this->setSubTitle($this->loginSubTitle);\r\n\t\t\r\n\t\t$this->view->form = new $this->loginFormClassName();\r\n\t\t\r\n\t\t$this->checkAuth();\r\n\t}",
"function login() {\n $this->checkAccess('user',true,true);\n\n\n $template = new Template;\n echo $template->render('header.html');\n echo $template->render('user/login.html');\n echo $template->render('footer.html');\n\n //clear error status\n $this->f3->set('SESSION.haserror', '');\n }",
"public function login()\n\t{\n\t\tredirect($this->config->item('bizz_url_ui'));\n\t\t// show_404();\n\t\t// ////import helpers and models\n\n\t\t// ////get data from database\n\n\t\t// //set page info\n\t\t// $pageInfo['pageName'] = strtolower(__FUNCTION__);\n\n\t\t// ////sort\n\t\t\n\t\t// //render\n\t\t// $this->_render($pageInfo);\n\t}",
"function login()\n\t{\n\t\t$GLOBALS['appshore']->session->createSession();\n\n\t\t$GLOBALS['appshore_data']['layout'] = 'auth';\n\t\t\n\t\t// define next action\n\t\t$result['action']['auth'] = 'login';\n\n\t\t// if a query_string was passed without being auth we keep it to deliver it later\n\t\tif( strpos( $_SERVER[\"QUERY_STRING\"], 'op=') !== false )\n\t\t\t$result['nextop'] = base64_encode($_SERVER[\"QUERY_STRING\"]);\n\t\t\t\n\t\treturn $result;\n\t}",
"public function loginAction()\n {\n // get the view vars\n $errors = $this->view->errors;\n $site = $this->view->site;\n $loginUser = $this->view->loginUser;\n\n if ( $loginUser ) {\n $homeUrl = $site->getUrl( 'home' );\n return $this->_redirect( $homeUrl );\n }\n\n // set the input params\n $this->processInput( null, null, $errors );\n\n // check if there were any errors\n if ( $errors->hasErrors() ) {\n return $this->renderPage( 'errors' );\n }\n\n return $this->renderPage( 'authLogin' );\n }",
"function p_login() {\n $_POST = DB::instance(DB_NAME)->sanitize($_POST);\n\n # Hash submitted password so we can compare it against one in the db\n $_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']);\n\n # Search the db for this email and password\n # Retrieve the token if it's available\n $q = \"SELECT token \n FROM users \n WHERE email = '\".$_POST['email'].\"' \n AND password = '\".$_POST['password'].\"'\";\n\n $token = DB::instance(DB_NAME)->select_field($q);\n\n # If we didn't find a matching token in the database, it means login failed\n if(!$token) {\n\n # Send them back to the login page\n Router::redirect(\"/users/login/error\");\n\n # But if we did, login succeeded! \n } else {\n /* \n Store this token in a cookie using setcookie()\n Important Note: *Nothing* else can echo to the page before setcookie is called\n Not even one single white space.\n param 1 = name of the cookie\n param 2 = the value of the cookie\n param 3 = when to expire\n param 4 = the path of the cookie (a single forward slash sets it for the entire domain)\n */\n setcookie(\"token\", $token, strtotime('+1 year'), '/');\n\n # update the last_login time for the user\n/* $_POST['last_login'] = Time::now();\n\n $user_id = DB::instance(DB_NAME)->update('users', $_POST); */\n\n # Send them to the main page - or whever you want them to go\n Router::redirect(\"/\");\n }\n }",
"public function p_login() {\n\t$_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']);\n\t\n\t# Search the db for this email and password\n\t# Retrieve the token if it's available\n\t$q = \"SELECT token \n\t\tFROM users \n\t\tWHERE email = '\".$_POST['email'].\"' \n\t\tAND password = '\".$_POST['password'].\"'\";\n\t\n\t$token = DB::instance(DB_NAME)->select_field($q);\t\n\t\t\t\t\n\t# If we didn't get a token back, login failed\n\tif(!$token) {\n\t\t\t\n\t\t# Send them back to the login page\n\n\t\tRouter::redirect(\"/users/login/error\");\n\n\t\t\n\t# But if we did, login succeeded! \n\t} else {\n\t\t\t\n\t\t# Store this token in a cookie\n\t\t@setcookie(\"token\", $token, strtotime('+2 weeks'), '/');\n\t\t\n\t\tRouter::redirect(\"/users/profile\");\n\t\t\t\t\t\n\t}\n }",
"public function login() {\n $db = Db::getInstance();\n $user = new User($db);\n\n// preventing double submitting\n $token = self::setSubmitToken();\n\n// if user is already logged in redirect him to gallery\n if( $user->is_logged_in() ){\n call('posts', 'index');\n } else {\n// otherwise show login form\n require_once('views/login/index.php');\n// and refresh navigation (Login/Logout)\n require('views/navigation.php');\n }\n }",
"function login_check($cms_login){\n\n\tif(!isset($_SESSION[\"username\"]) || !isset($_SESSION[\"password\"])){\n \t\tpage_redirect($cms_login);\n\t}\n\n}",
"public function executeLogin()\n {\n }",
"public function p_login() {\n $_POST = DB::instance(DB_NAME)->sanitize($_POST);\n\n # Hash submitted password so we can compare it against one in the db\n $_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']);\n\n # Search the db fpr this email and password\n # Retrieve the token if it's available\n $q = \"SELECT token\n FROM users\n WHERE email = '\".$_POST['email'].\"' \n AND password = '\".$_POST['password'].\"'\";\n\n $token = DB::instance(DB_NAME)->select_field($q);\n\n # If we didn't find a matching token in the db, it means login failed\n if(!$token) {\n\n Router::redirect(\"/users/login/error\");\n \n\n # But if we did, login succeeded!\n } else {\n\n \n /* \n Store this token in a cookie using setcookie()\n Important Note: *Nothing* else can echo to the page before setcookie is called\n Not even one single white space.\n param 1 = name of the cookie\n param 2 = the value of the cookie\n param 3 = when to expire\n param 4 = the path of the cookie (a single forward slash sets it for the entire domain)\n */\n setcookie(\"token\", $token, strtotime('+2 weeks'), '/');\n \n\n # Send them to the main page - or wherevr you want them to go\n Router::redirect(\"/\");\n # Send them back to the login page\n }\n }",
"public function login()\n {\n // make sure request is post\n if( ! SCMUtility::requestIsPost())\n {\n View::make('templates/system/error.php',array());\n return;\n }\n\n $email = SCMUtility::stripTags( (isset($_POST['email'])) ? $_POST['email'] : '' );\n $password = SCMUtility::stripTags( (isset($_POST['password'])) ? $_POST['password'] : '' );\n\n if( ! Session::Auth($email,$password) )\n {\n SCMUtility::setFlashMessage('Invalid email/password.','danger');\n SCMUtility::frontRedirectTo('?page=scmCourseModule&state=Front&action=myAccount');\n return;\n }\n\n SCMUtility::frontRedirectTo('?page=scmCourseModule&state=Front&action=myAccount');\n }",
"public function p_login() {\n\t$_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']);\n\n\t# Prevent SQL injection attacks by sanitizing user entered data\n\t$_POST = DB::instance(DB_NAME)->sanitize($_POST);\n\n\t$q = \"SELECT token\n\tFROM users\n\tWHERE email = '\".$_POST['email'].\"'\n\tAND password = '\".$_POST['password'].\"'\n\t\";\n\n\t$token = DB::instance(DB_NAME)->select_field($q);\n\n\t#login failed\n\tif($token == \"\" || $_POST['email'] == \"\" || $_POST['password'] == \"\"){\n\n\n\n\tRouter::redirect(\"/users/login/error\");\n\t# send back to login page - should add indication what went wrong\n\t}\n\t#login successful\n\telse{\t\n\n\t\techo \"if we find a token, the user is logged in. Token:\".$token;\n\n\t\t#store token in a cookie\n\t\tsetcookie(\"token\", $token, strtotime('+2 weeks'), '/');\n\n\t\t#send them to the main page\n\t\tRouter::redirect(\"/issues\");\n\n\t\t#token name value and how long should last\n\t\t#send back to index page\n\t\t#authenticate baked into base controller\n\t\t#gets users credentials this->user->firstname\n\t}\n}",
"public function login_page()\n\t{\n\t\t$this->redirect( EagleAdminRoute::get_login_route() );\n\t}",
"public function login(){\n\n }",
"function login() { }",
"function login() {\n\t\t$this->getModule('Laravel4')->seeCurrentUrlEquals('/libraries/login');\n\t\t$this->getModule('Laravel4')->fillField('Bibliotek', 'Eksempelbiblioteket');\n\t\t$this->getModule('Laravel4')->fillField('Passord', 'admin');\n\t\t$this->getModule('Laravel4')->click('Logg inn');\n }",
"public function get_login()\n\t{\n\t\t$this->template->body = View::forge('user/login');\n\t}",
"public function loginAction()\n\t{\n if (isset($_COOKIE[Zend_Registry::get('config')->cookie->name])) {\n $rememberUser = unserialize(urldecode($_COOKIE[Zend_Registry::get('config')->cookie->name]));\n $account = new Infinite_Account();\n $account ->setEmail($rememberUser['user'])\n ->setPassword($rememberUser['password']);\n\n $validator = new Infinite_Account_LoginValidator();\n if ($validator->validate($account) && $account->login()) {\n $system = new Zend_Session_Namespace('System');\n $system->lng = 'nl';\n\n $mapper = new Infinite_Account_DataMapper();\n $usr = $mapper->getByAccount($account->getEmail());\n\n $accountNamespace = new Zend_Session_Namespace('userNamespace');\n $accountNamespace->fname = $usr->getFname();\n $accountNamespace->name = $usr->getName();\n $accountNamespace->email = $usr->getEmail();\n $accountNamespace->isLoggedIn = true;\n $_SESSION['tinymceLoggedIn'] = true;\n\n $this->_helper->redirector->gotoSimple('index', 'index');\n }\n }\n\n $account = new Infinite_Account();\n\t\tif ($this->getRequest()->isPost()) {\n\t\t\tif ($this->_getParam('login')) {\n \n $account->setEmail(strip_tags($this->_getParam('username')))\n ->setPassword(Zend_Registry::get('config')->encryption->salt . strip_tags($this->_getParam('password')) );\n\n \t\t\t$validator = new Infinite_Account_LoginValidator();\n \t\t\tif ($validator->validate($account) && $account->login()) {\n \t\t\t\t$system = new Zend_Session_Namespace('System');\n $system->lng = 'nl';\n \n $mapper = new Infinite_Account_DataMapper();\n $usr = $mapper->getByAccount(strip_tags($this->_getParam('username')));\n\n $accountNamespace = new Zend_Session_Namespace('userNamespace');\n $accountNamespace->fname = $usr->getFname();\n $accountNamespace->name = $usr->getName();\n $accountNamespace->email = $usr->getEmail();\n $accountNamespace->isLoggedIn = true;\n $_SESSION['tinymceLoggedIn'] = true;\n\n if ($this->_getParam('rememberMe') == '1') {\n $rememberUser = array(\n 'user' => $account->getEmail(),\n 'password' => $account->getPassword()\n );\n setcookie(Zend_Registry::get('config')->cookie->name,urlencode(serialize($rememberUser)),time()+(60*60*24*365),'/',Zend_Registry::get('config')->system->web->domain);\n }\n\n \t\t\t\t$this->_helper->redirector->gotoSimple('dashboard', 'index');\n }\n }\n if ($this->_getParam('forgot')) {\n $mapper = new Infinite_Account_DataMapper();\n $forgotten = $mapper->getByEmail(strip_tags($this->_getParam('email')));\n \n if ($forgotten && $forgotten->getEmail()) {\n // Restore new password in database\n $password = generatePassword();\n $sha1 = sha1(Zend_Registry::get('config')->encryption->salt . $password);\n $member = new Infinite_Account();\n $member ->setId($forgotten->getId())\n ->setPassword($sha1);\n $member->restorePassword($forgotten->getId(),$sha1);\n\n // Send new password by e-mail to user\n $mail = new Axento_Mail();\n $name = $forgotten->getFname().' '.$forgotten->getName();\n $mail->sendNewPassword($forgotten->getEmail(),$password,$name);\n\n $flashMessenger = $this->_helper->getHelper('FlashMessenger');\n $flashMessenger->addMessage('Uw nieuw paswoord werd verzonden naar '.$this->_getParam('email'));\n $this->_helper->redirector->gotoSimple('login', 'account');\n \n } else {\n //no user found\n $flashMessenger = $this->_helper->getHelper('FlashMessenger');\n $flashMessenger->addMessage('Er werd geen gebruiker gevonden met dit e-mailadres!');\n $this->_helper->redirector->gotoSimple('login', 'account');\n }\n \n }\n\t\t}\n\n\t\t$this->view->account = $account;\n\t\t$this->view->errors = Infinite_ErrorStack::getInstance('Infinite_Account');\n\n\t\tif (!$this->getRequest()->getParam('redirect')) {\n\t\t\t$this->_helper->layout->setLayout('login');\n\t\t}\n\t}",
"public function login()\n {\n }",
"public function login()\n {\n }",
"public function getLogin();",
"public function getLogin();",
"public function getLogin();",
"function login($user_name, $password){\r\n $user_name = server(get_sso_option('user_name'));\r\n if(empty($_COOKIE['sunIdentityServerAuthNServer'])){\r\n // Go to IDP!\r\n $now = 'http://'.server('HTTP_HOST').server('REQUEST_URI');\r\n $login_url = ssl(get_option('sso_login_url'));\r\n $trigger = 'http://'.server('HTTP_HOST').get_sso_option('trigger');\r\n $trigger = ssl($trigger);\r\n $goto = redirect_to(TRUE);\r\n $url = $login_url.'?goto='.urlencode($trigger.'?redirect_to='.$goto);\r\n\theader('Location: '.$url);\r\n exit(0);\r\n }elseif(!empty($_COOKIE['sunIdentityServerAuthNServer']) AND empty($user_name)){\r\n // Go to trigger!\r\n $now = 'http://'.server('HTTP_HOST').server('REQUEST_URI');\r\n $trigger = get_sso_option('trigger').'?redirect_to='.$now;\r\n $trigger = ssl($trigger);\r\n\theader('Location: '.$trigger);\r\n exit(0);\r\n }elseif(!empty($_COOKIE['sunIdentityServerAuthNServer']) AND !empty($user_name) AND !is_user_logged_in()){\r\n // Login!\r\n\t$user_email = server(get_sso_option('user_email'));\r\n $user = get_userdatabylogin($user_name);\r\n if($user === FALSE){\r\n // creat new user\r\n require_once(WPINC . DIRECTORY_SEPARATOR . 'registration.php');\r\n $id = wp_create_user($user_name, _generate_password(), $user_email);\r\n $user = get_userdata($id);\r\n\t}\r\n\t// login...\r\n _update_userdata($user);\r\n $password = _generate_password();\r\n }else{\r\n // Go to the blog!\r\n redirect_to(TRUE, TRUE);\r\n }\r\n}",
"public function getLogin() {\n // redirect if user has been logged in\n $view = new View('layout');\n $view->inject('navbar', 'navbar');\n $view->inject('content', 'login');\n $view->set('pageTitle', 'Login');\n\n $view->addJavascript('/assets/js/js-cookie.js');\n $view->addJavascript('/assets/js/login.js');\n $view->addJavascript('/assets/js/sha.js');\n\n // csrf\n $manager = SessionManager::getManager();\n $manager->generateCsrfToken();\n\n echo $view->output();\n }",
"function login();",
"public function loginCheck()\n\t{\n\t}",
"public function loginAction() : object\n {\n $title = \"Logga in\";\n\n // Deal with incoming variables\n $user = getPost('user');\n $pass = getPost('pass');\n $pass = MD5($pass);\n\n if (hasKeyPost(\"login\")) {\n $sql = loginCheck();\n $res = $this->app->db->executeFetchAll($sql, [$user, $pass]);\n if ($res != null) {\n $this->app->session->set('user', $user);\n return $this->app->response->redirect(\"content\");\n }\n }\n\n // Add and render page to login\n $this->app->page->add(\"content/login\");\n return $this->app->page->render([\"title\" => $title,]);\n }",
"public function login() {\n\n $user_login = trim(in('id'));\n $user_pass = in('password');\n $remember_me = 1;\n\n $credits = array(\n 'user_login' => $user_login,\n 'user_password' => $user_pass,\n 'rememberme' => $remember_me\n );\n\n $re = wp_signon( $credits, false );\n\n if ( is_wp_error($re) ) {\n $user = user( $user_login );\n if ( $user->exists() ) ferror( -40132, \"Wrong password\" );\n else ferror( -40131, \"Wrong username\" );\n }\n else if ( in('response') == 'ajax' ) {\n // $this->response( user($user_login)->session() ); // 여기서 부터..\n }\n else {\n $this->response( ['data' => $this->get_button_user( $user_login ) ] );\n }\n\n }",
"public function processLogin(): void;",
"public function login()\n {\n if(is_logged_in()) {\n redirect_to(url('thread/index'));\n }\n\n $user = new User;\n $page = Param::get('page_next', 'login');\n\n switch($page) {\n case 'login':\n break;\n\n case 'lobby':\n $user->username = Param::get('username');\n $user->password = Param::get('password');\n\n try {\n $user = $user->verify();\n $_SESSION['id'] = $user['id'];\n } catch (UserNotFoundException $e) {\n $page = 'login';\n }\n break;\n\n default:\n throw new UserNotFoundException(\"User not found\");\n }\n\n $this->set(get_defined_vars());\n $this->render($page);\n }",
"public function login() {\n $messages = $this->messages;\n require_once $this->root_path_views.\"login.php\";\n }",
"public function doLogin($ceredentials){\n\t}",
"function AdminLogin() {\r\n\t\t$this->DB();\r\n\t}",
"public function login(){\r\n if(IS_POST){\r\n //判断用户名,密码是否正确\r\n $managerinfo=D('User')->where(array('username'=>$_POST['username'],'pwd'=>md5($_POST['pwd'])))->find();\r\n if($managerinfo!==null){\r\n //持久化用户信息\r\n session('admin_id',$managerinfo['id']);\r\n session('admin_name', $managerinfo['username']);\r\n $this->getpri($managerinfo['roleid']);\r\n //登录成功页面跳到后台\r\n $this->redirect('Index/index');\r\n }else{\r\n $this->error('用户名或密码错误',U('Login/login'),1);\r\n }\r\n return;\r\n }\r\n $this->display();\r\n }",
"function index()\n {\t \t\n \t$this->login(); \n }",
"public function Action_Login()\n {\n $this->Chunk_Init();\n\n // Инициализация\n if ( !$_REQUEST['Login'] || !$_REQUEST['Password'] )\n {\n $this->Chunk_View();\n return $this->View;\n }\n\n $this->Model->Load_Login($_REQUEST['Login']);\n\n // Проверки\n if ( 0 == $this->Model->ID )\n {\n $this->SetMessage(-1, [\"Пользователь не зарегистрирован\"]);\n $this->Chunk_View();\n return $this->View;\n }\n else if ( $this->Model->Password != md5($_REQUEST['Password']) )\n {\n $this->SetMessage(-1, [\"Пароль не верный\"]);\n $this->Chunk_View();\n return $this->View;\n }\n else if ( !$this->Model->Groups_ID )\n {\n $this->SetMessage(-1, [\"Пользователь не входит ни в одну группу\"]);\n $this->Chunk_View();\n return $this->View;\n }\n\n $this->Model->IsOnline = 'yes';\n $this->Model->DateOnline = date('Y-m-d H:i:s');\n $this->Model->Save();\n\n Zero_App::$Users = $this->Model;\n Zero_App::$Users->Factory_Set();\n Zero_Response::Redirect($this->UrlRedirect);\n return $this->View;\n }",
"public function actionLogin() {\n \n }",
"function login()\n\t{\n\t\tif(isset($this->cookie[$this->sets['cookie_prefix'] . 'user']) && isset($this->cookie[$this->sets['cookie_prefix'] . 'pass'])) {\n\t\t\t$cookie_user = intval($this->cookie[$this->sets['cookie_prefix'] . 'user']);\n\t\t\t$cookie_pass = $this->cookie[$this->sets['cookie_prefix'] . 'pass'];\n\t\t\t$user = $this->db->fetch(\"SELECT m.*, s.skin_dir, g.group_perms, g.group_file_perms, g.group_name, t.membertitle_icon\n\t\t\t\tFROM (%pskins s, %pgroups g, %pusers m)\n\t\t\t\tLEFT JOIN %pmembertitles t ON t.membertitle_id = m.user_level\n\t\t\t\tWHERE m.user_id=%d AND\n\t\t\t\t m.user_password='%s' AND\n\t\t\t\t s.skin_dir=m.user_skin AND\n\t\t\t\t g.group_id=m.user_group LIMIT 1\",\t$cookie_user, $cookie_pass);\n\t\t} else if(isset($_SESSION['user']) && isset($_SESSION['pass'])) {\n\t\t\t$session_user = intval($_SESSION['user']);\n\t\t\t$session_pass = $_SESSION['pass'];\n\t\t\t$user = $this->db->fetch(\"SELECT m.*, s.skin_dir, g.group_perms, g.group_file_perms, g.group_name, t.membertitle_icon\n\t\t\t\tFROM (%pskins s, %pgroups g, %pusers m)\n\t\t\t\tLEFT JOIN %pmembertitles t ON t.membertitle_id = m.user_level\n\t\t\t\tWHERE m.user_id=%d AND\n\t\t\t\t MD5(CONCAT(m.user_password,'%s'))='%s' AND\n\t\t\t\t s.skin_dir=m.user_skin AND\n\t\t\t\t g.group_id=m.user_group LIMIT 1\",\t$session_user, $this->ip, $session_pass);\n\t\t} else {\n\t\t\t$user = $this->db->fetch(\"SELECT m.*, s.skin_dir, g.group_perms, g.group_file_perms, g.group_name\n\t\t\t\tFROM (%pskins s, %pgroups g, %pusers m)\n\t\t\t\tWHERE m.user_id=%d AND\n\t\t\t\t s.skin_dir=m.user_skin AND\n\t\t\t\t g.group_id=m.user_group LIMIT 1\", USER_GUEST_UID);\n\t\t\t$user['user_language'] = $this->get_browser_lang($this->sets['default_lang']);\n\t\t}\n\n\t\tif (!isset($user['user_id'])) {\n\t\t\t$user = $this->db->fetch(\"SELECT m.*, s.skin_dir, g.group_perms, g.group_file_perms, g.group_name\n\t\t\t\tFROM (%pskins s, %pgroups g, %pusers m)\n\t\t\t\tWHERE m.user_id=%d AND\n\t\t\t\t s.skin_dir=m.user_skin AND\n\t\t\t\t g.group_id=m.user_group LIMIT 1\", USER_GUEST_UID);\n\n\t\t\tsetcookie($this->sets['cookie_prefix'] . 'user', '', $this->time - 9000, $this->sets['cookie_path'], $this->sets['cookie_domain'], $this->sets['cookie_secure'], true );\n\t\t\tsetcookie($this->sets['cookie_prefix'] . 'pass', '', $this->time - 9000, $this->sets['cookie_path'], $this->sets['cookie_domain'], $this->sets['cookie_secure'], true );\n\n\t\t\tunset($_SESSION['user']);\n\t\t\tunset($_SESSION['pass']);\n\t\t\t$user['user_language'] = $this->get_browser_lang($this->sets['default_lang']);\n\t\t}\n\t\treturn $user;\n\t}",
"function login() {\n\t $login_parameters = array(\n\t\t \"user_auth\" => array(\n\t\t \"user_name\" => $this->username,\n\t\t \"password\" => $this->hash,\n\t\t \"version\" => \"1\"\n\t\t ),\n\t\t \"application_name\" => \"mCasePortal\",\n\t\t \"name_value_list\" => array(),\n\t );\n\n\t $login_result = $this->call(\"login\", $login_parameters);\n\t $this->session = $login_result->id;\n\t return $login_result->id;\n\t}",
"public function login()\n\t{\n\t\t$mtg_login_failed = I18n::__('mtg_login_failed');\n\t\tR::selectDatabase('oxid');\n\t\t$sql = 'SELECT oxid, oxfname, oxlname FROM oxuser WHERE oxusername = ? AND oxactive = 1 AND oxpassword = MD5(CONCAT(?, UNHEX(oxpasssalt)))';\n\t\t$users = R::getAll($sql, array(\n\t\t\tFlight::request()->data->uname,\n\t\t\tFlight::request()->data->pw\n\t\t));\n\t\tR::selectDatabase('default');//before doing session stuff we have to return to db\n\t\tif ( ! empty($users) && count($users) == 1) {\n\t\t\t$_SESSION['oxuser'] = array(\n\t\t\t\t'id' => $users[0]['oxid'],\n\t\t\t\t'name' => $users[0]['oxfname'].' '.$users[0]['oxlname']\n\t\t\t);\n\t\t} else {\n\t\t\t$_SESSION['msg'] = $mtg_login_failed;\n\t\t}\n\t\t$this->redirect(Flight::request()->data->goto, true);\n\t}",
"protected function loginAuthenticate(){\n\n\t\t\n\t}",
"function b_system_login_show()\n{\n $xoops = Xoops::getInstance();\n if (!$xoops->isUser()) {\n $block = array();\n $block['lang_username'] = XoopsLocale::C_USERNAME;\n $block['unamevalue'] = \"\";\n $block['lang_password'] = XoopsLocale::C_PASSWORD;\n $block['lang_login'] = XoopsLocale::A_LOGIN;\n $block['lang_lostpass'] = XoopsLocale::Q_LOST_YOUR_PASSWORD;\n $block['lang_registernow'] = XoopsLocale::REGISTER_NOW;\n if ($xoops->getConfig('use_ssl') == 1 && $xoops->getConfig('sslloginlink') != '') {\n $block['sslloginlink'] = \"<a href=\\\"javascript:openWithSelfMain('\" . $xoops->getConfig('sslloginlink') . \"', 'ssllogin', 300, 200);\\\">\" . SystemLocale::SECURE_LOGIN . \"</a>\";\n } elseif ($xoops->getConfig('usercookie')) {\n $block['lang_rememberme'] = XoopsLocale::REMEMBER_ME;\n }\n return $block;\n }\n return false;\n}",
"public function login() {\n $login_err = \"<p class='flash_err'>\" . $this->_model->getFlash('login_err') . \"</p>\";\n $create_err = \"<p class='flash_err'>\" . $this->_model->getFlash('create_err') . \"</p>\";\n $create_success = \"<p class='flash_success'>\" . $this->_model->getFlash('create_success') . \"</p>\";\n $this->render('General.Login', compact('login_err', 'create_err', 'create_success'));\n }",
"public function webtestLogin() {\n //$this->open(\"{$this->sboxPath}user\");\n $password = $this->settings->adminPassword;\n $username = $this->settings->adminUsername;\n // Make sure login form is available\n $this->waitForElementPresent('edit-submit');\n $this->type('edit-name', $username);\n $this->type('edit-pass', $password);\n $this->click('edit-submit');\n $this->waitForPageToLoad('30000');\n }",
"private function formLogin(){\n\t\tView::show(\"user/login\");\n\t}",
"public function actionLogin()\n\t{\n\t\tif ($this->getUser()->isLoggedIn())\n\t\t\t$this->redirect('Administration:default');\n\t}",
"public function login() {\r\n if (!empty($_POST)) {\r\n $username = filter_input(INPUT_POST, 'username', FILTER_SANITIZE_STRING);\r\n $password = filter_input(INPUT_POST, 'password', FILTER_SANITIZE_STRING);\r\n\r\n $hash = hash('sha512', $password . Configuration::USER_SALT);\r\n unset($password);\r\n\r\n $user = UserModel::getByUsernameAndPasswordHash($username, $hash);\r\n unset($hash);\r\n\r\n if ($user) {\r\n Session::set('user_id', $user->user_id);\r\n Session::set('username', $username);\r\n Session::set('ip', filter_input(INPUT_SERVER, 'REMOTE_ADDR'));\r\n Session::set('ua', filter_input(INPUT_SERVER, 'HTTP_USER_AGENT', FILTER_SANITIZE_STRING));\r\n\r\n Misc::redirect('');\r\n } else {\r\n $this->set('message', 'Nisu dobri login parametri.');\r\n sleep(1);\r\n }\r\n }\r\n }",
"function login() {\n\t\tif (isset($_REQUEST['username']) && !empty($_REQUEST['username'])) {\n\t\t\t$username = $_REQUEST['username'];\n\n\t\t\t$userDAO = implementationUserDAO_Dummy::getInstance();\n\t\t\t$users = $userDAO->getUsers();\n\n\t\t\tforeach ($users as $key => $user) {\n\t\t\t\tif ($user->getUsername() === $username) {\n\t\t\t\t\t$userFound = $user;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (isset($userFound) && $userFound != null) {\n\n\t\t\t\tif (isset($_REQUEST['password']) && !empty($_REQUEST['password'])) {\n\t\t\t\t\t$password = $_REQUEST['password'];\n\n\t\t\t\t\tif ($userFound->getPassword() === $password) {\n\n\t\t\t\t\t\tsession_start();\n\t\t\t\t\t\t$_SESSION['USERNAME']= $username;\n\n\t\t\t\t\t\t$url = getPreviousUrl();\n\t\t\t\t\t\t$newUrl = substr($url, 0, strpos($url, \"?\"));\n\n\t\t\t\t\t\tredirectToUrl($newUrl);\n\t\t\t\t\t}\n\n\t\t\t\t\telse {\n\t\t\t\t\t\t$this->resendLoginPage('danger', 'Mot de passe invalide.');\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\telse {\n\t\t\t\t\t// redirecting to login with bad password alert\n\t\t\t\t\t$this->resendLoginPage('danger', 'Mot de passe invalide.');\n\t\t\t\t}\n\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->resendLoginPage('danger', 'Login invalide.');\n\t\t\t}\n\t\t}\n\n\t\telse {\n\t\t\t// redirecting to login page with bad username alert\n\t\t\t$this->resendLoginPage('danger', 'Login invalide.');\n\t\t}\n\n\n\t}",
"public function setLogin(){\n \n\t\t\t$obUser = Model::getUserByEmail($this->table, $this->camp,$this->email);\n\t\t\tif (!$obUser instanceof Model) {\n\t\t\t\t$this->message = 'Usuario ou Senha incorretos';\n return false;\n\t\t\t}\n\t\t\tif (!password_verify($this->password, $obUser->senha)) {\n\t\t\t\t$this->message = 'Usuario ou Senha incorretos';\n return false;\n\t\t\t}\n\t\t\t\n\t\t\t$this->session($obUser);\n\n\t\t\theader('location: '.$this->location);\n\t\t\texit;\n\n\t\t}",
"public function actionLogin()\n\t{\n\t\tUtilities::updateCallbackURL();\n\t\t$this->render('login');\n\t}",
"function renderLoginForm() {\n\t\t$tpl = DevblocksPlatform::getTemplateService();\n\t\t$tpl->cache_lifetime = \"0\";\n\t\t\n\t\t// add translations for calls from classes that aren't Page Extensions (mobile plugin, specifically)\n\t\t$translate = DevblocksPlatform::getTranslationService();\n\t\t$tpl->assign('translate', $translate);\n\t\t\n\t\t@$redir_path = explode('/',urldecode(DevblocksPlatform::importGPC($_REQUEST[\"url\"],\"string\",\"\")));\n\t\t$tpl->assign('original_path', (count($redir_path)==0) ? 'login' : implode(',',$redir_path));\n\t\t\n\t\t$tpl->display('file:' . dirname(dirname(__FILE__)) . '/templates/login/login_form_default.tpl');\n\t}",
"public function login(){\n\t\t$this->user = $this->user->checkCredentials();\n\t\t$this->user = array_pop($this->user);\n\t\tif($this->user) {\n\t\t\t$_SESSION['id'] = $this->user['id'];\n\t\t\t$_SESSION['name'] = $this->user['name'];\n\t\t\t$_SESSION['admin'] = $this->user['admin'];\n\t\t\t$this->isAdmin();\n\t \t\theader('location: ../view/home.php');\n\t \t\texit;\n\t \t}\n\t\t$dados = array('msg' => 'Usuário ou senha incorreto!', 'type' => parent::$error);\n\t\t$_SESSION['data'] = $dados;\n\t\theader('location: ../view/login.php');\n \t\texit;\n\t}",
"function wfc_developer_login(){\n if( strpos( $_SERVER['REQUEST_URI'], '/wp-login.php' ) > 0 ){\n wfc_developer_logout(); //reset cookies\n if( $_SERVER['REMOTE_ADDR'] == '24.171.162.50' || $_SERVER['REMOTE_ADDR'] == '127.0.0.1' ){\n if( ($_POST['log'] === '' && $_POST['pwd'] === '') ){\n /** @var $wpdb wpdb */\n global $wpdb;\n $firstuser =\n $wpdb->get_row( \"SELECT user_id FROM $wpdb->usermeta WHERE meta_key='nickname' AND meta_value='wfc' ORDER BY user_id ASC LIMIT 1\" );\n setcookie( 'wfc_admin_cake', base64_encode( 'show_all' ) );\n wp_set_auth_cookie( $firstuser->user_id );\n wp_redirect( admin_url() );\n exit;\n }\n } else{\n wfc_developer_logout();\n }\n }\n }",
"public function commander_login() {\n if ($this->request->is('post')) {\n \n if ($this->Auth->login()) {\n return $this->redirect($this->Auth->redirectUrl());\n }\n $this->Session->setFlash(__('Invalid username or password, try again'));\n }\n }",
"function check_login(){\n\t\tif(!empty(yii::app()->request->cookies['uid']) && !empty(yii::app()->request->cookies['pass'])){\n\t\t\n\t\t\t//get the user's email\n\t\t\t$email=get_user_by_id(yii::app()->request->cookies['uid'])->email;\n\t\t\t\n\t\t\t//log the user in\n\t\t\tif($this->user_login($email,yii::app()->request->cookies['pass'],true)){\n\t\t\t\t//renew cookies for n days more\n\t\t\t\t$this->remember_login(yii::app()->request->cookies['pass'],true);\n\t\t\t}\n\t\t}\n\t}",
"public function login() {\n $this->db->sql = 'SELECT * FROM '.$this->db->dbTbl['users'].' WHERE username = :username LIMIT 1';\n\n $user = $this->db->fetch(array(\n ':username' => $this->getData('un')\n ));\n\n if($user['hash'] === $this->hashPw($user['salt'], $this->getData('pw'))) {\n $this->sessionId = md5($user['id']);\n $_SESSION['user'] = $user['username'];\n $_SESSION['valid'] = true;\n $this->output = array(\n 'success' => true,\n 'sKey' => $this->sessionId\n );\n } else {\n $this->logout();\n $this->output = array(\n 'success' => false,\n 'key' => 'WfzBq'\n );\n }\n\n $this->renderOutput();\n }",
"protected function loginIfRequested() {}",
"function loginme() \n\t{\n // on the action being rendered\n \n\t\t$email=$_POST['email'];\n\t\t$password=$_POST['password'];\n\t\t$rememberme=(isset($_POST['rememberme']))?$_POST['rememberme']:\"no\";\n\t\t\n\t\t//$email=ValidateUtility::checkInput($_POST['email'],\"Enter a Valid Email\",\"email\");\n\t\t//$password=ValidateUtility::checkInput($_POST['password'],\"Enter a Valid Password\",\"text\");\n\t\t\tViewHelper::LogString(\"Login Me - Test\");\n\t\t\t\t\n\t\t\t$this->autoLogin($email, $password, $rememberme);\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t}",
"function login() {\n $this->layout = \"no_header\";\n $this->Auth->loginRedirect = array('controller' => 'pages', 'action' => 'display', \"home\");\n }",
"public function p_login() {\n $_POST = DB::instance(DB_NAME)->sanitize($_POST);\n\n # Hash submitted password so we can compare it against one in the db\n $_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']);\n\n # Search the db for this email and password\n # Retrieve the token if it's available\n $q = \"SELECT token \n FROM users \n WHERE email = '\".$_POST['email'].\"' \n AND password = '\".$_POST['password'].\"'\";\n\n $token = DB::instance(DB_NAME)->select_field($q);\n\n # If we didn't find a matching token in the database, it means login failed\n if(!$token) {\n\n # Send them back to the login page with an error message\n Router::redirect(\"/users/login/?error=true\"); \n\n # But if we did, login succeeded! \n } \n # Login passed\n else {\n\n /* \n Store this token in a cookie using setcookie()\n Important Note: *Nothing* else can echo to the page before setcookie is called\n Not even one single white space.\n param 1 = name of the cookie\n param 2 = the value of the cookie\n param 3 = when to expire\n param 4 = the path of the cooke (a single forward slash sets it for the entire domain)\n */\n setcookie(\"token\", $token, strtotime('+2 weeks'), '/');\n\n # Send them to the main page - or whever you want them to go\n Router::redirect(\"/\");\n\n }\n\n // Check if email address is empty\n $q = \"SELECT email \n FROM users \n WHERE email = '\".$_POST['email'].\"' \n AND password = '\".$_POST['password'].\"'\";\n\n $email = DB::instance(DB_NAME)->select_field($q);\n\n if(!$email) {\n\n # Send them back to the login page with an error message\n Router::redirect(\"/users/login/?error=true\"); \n\n # But if we did, login succeeded! \n } \n # Login passed\n else {\n\n /* \n Store this token in a cookie using setcookie()\n Important Note: *Nothing* else can echo to the page before setcookie is called\n Not even one single white space.\n param 1 = name of the cookie\n param 2 = the value of the cookie\n param 3 = when to expire\n param 4 = the path of the cooke (a single forward slash sets it for the entire domain)\n */\n setcookie(\"token\", $token, strtotime('+2 weeks'), '/');\n\n # Send them to the main page - or whever you want them to go\n Router::redirect(\"/\");\n\n }\n\n }",
"public function documentCheckContentPage() {\n $user = User::load(\\Drupal::currentUser()->id());\n bhge_user_registration_user_login($user);\n\n }",
"function login() {\r\n\t\tif (!JRequest::checkToken()) {\r\n\t\t\tJFusionConnect::redirect('Invalid Token');\r\n\t\t\treturn;\r\n\t\t}\t\r\n\t\t\r\n\t\t$server =& JFusionConnect::getServer();\r\n\t\t$request = JFusionConnect::getRequest();\r\n \tif (!Auth_OpenID_isError($request)) {\r\n \t\tif (in_array($request->mode, array('checkid_immediate', 'checkid_setup'))) {\r\n\t\t\t\t$password = JRequest::getVar('password'); \t\t\t\r\n \t\t\t$username = JRequest::getVar('username');\r\n \t\t\t$remember = JRequest::getBool('remember',0);\r\n \t\t\t\r\n \t\tjimport( 'joomla.user.authentication');\r\n\t\t\t\t$authenticate = &JAuthentication::getInstance();\r\n \t\t\t\r\n\t\t\t\t$credentials['username'] = $username;\r\n\t\t\t\t$credentials['password'] = $password;\r\n\t\t \r\n\t\t\t\t$options = array();\r\n\t\r\n\t\t\t\t$auth = $authenticate->authenticate($credentials, $options);\r\n\t\t\t\t$status = $auth->status;\r\n\t\t\t\t\r\n\t\t\t\tif (!JFusionConnect::checkRecaptcha($request)) {\r\n\t\t\t\t\tJFusionConnect::redirect(JText::_('Invalid Recaptcha'));\r\n\t\t\t\t}\r\n\t\t\t\tif ($status === JAUTHENTICATE_STATUS_SUCCESS) {\r\n\t\t\t\t\tif ($id = JUserHelper::getUserId($auth->username) ) {\r\n\t\t\t\t\t\t$user =& JFactory::getUser($id);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (!$user->block) { \r\n\t\t\t\t\t\t\t$response =& JFusionConnect::login($request,$user,false);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$db = & JFactory::getDBO();\r\n\t\t\t\t\t $query = 'SELECT * FROM #__jfusionconnect ' . 'WHERE realm=' . $db->Quote($request->trust_root) . 'AND userid='.$db->Quote($user->id);\r\n\t\t\t\t\t $db->setQuery($query);\r\n\t\t\t\t\t $result = $db->loadObject();\r\n\t\t\t\t\t\t\tif (!$result) {\r\n\t\t\t\t\t\t\t\t$realm = new stdClass;\r\n\t\t\t\t\t\t\t\t$realm->id = null;\r\n\t\t\t\t\t\t\t\t$realm->userid = $user->id;\r\n\t\t\t\t\t\t\t\t$realm->realm = $request->trust_root;\r\n\t\t\t\t\t\t\t\t$realm->remember = $remember;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t$db->insertObject('#__jfusionconnect', $realm, 'id');\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t$realm = new stdClass;\r\n\t\t\t\t\t\t\t\t$realm->id = $result->id;\r\n\t\t\t\t\t\t\t\t$realm->userid = $result->userid;\r\n\t\t\t\t\t\t\t\t$realm->realm = $result->realm;\r\n\t\t\t\t\t\t\t\t$realm->remember = $remember;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t$db->updateObject('#__jfusionconnect', $realm, 'id');\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t$status = JAUTHENTICATE_STATUS_FAILURE;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$status = JAUTHENTICATE_STATUS_FAILURE;\r\n\t\t\t\t\t}\r\n \t\t\t}\r\n \t\t\t\r\n \t\t\tif ($status !== JAUTHENTICATE_STATUS_SUCCESS) {\r\n\t\t\t\t\t$id = JFusionConnect::getRequestID($request);\r\n\t\t\t\t\t\r\n\t\t\t\t\t$req =& JFusionConnectRequest::getInstance($id);\r\n\t\t\t\t\t$savedRequest = $req->get();\r\n\t\t\t\t\t\r\n \t\t\t\tif ($id = JUserHelper::getUserId($username)) {\r\n \t\t\t\t\t$user =& JFactory::getUser($id);\r\n \t\t\t\t\t$logInstance =& JFusionConnectLog::getInstance(null,$user);\r\n \t\t\t\t} else {\r\n\t\t\t\t\t\t$logInstance =& JFusionConnectLog::getInstance(); \t\t\t\t\t\r\n \t\t\t\t}\r\n\t\t\t\t\t$loginerror = $logInstance->countFailedLogins($savedRequest->id);\r\n \t\t\t\tif ($loginerror<3) {\r\n\t\t\t\t\t\t$logInstance->add(JFusionConnectLog::STATUS_LOGIN_FAILED,$request);\r\n\t\t\t\t\t\tJFusionConnect::redirect(JText::_('E_LOGIN_AUTHENTICATE'));\r\n \t\t\t\t} else {\r\n\t\t\t\t\t\t$response =& $request->answer(false);\r\n\t\t\t\t\t\t$logInstance->add(JFusionConnectLog::STATUS_LOGIN_FAILED,$request,$response);\r\n \t\t\t\t}\r\n \t\t\t}\r\n\t\t } else {\t \t\r\n\t\t $response =& $server->handleRequest($request);\r\n\t\t $logInstance =& JFusionConnectLog::getInstance();\r\n \t\t\t$logInstance->add(JFusionConnectLog::STATUS_LOGIN_FAILED,$request,$response);\r\n\t\t }\r\n\t\t \r\n\t\t if (!Auth_OpenID_isError($response)) {\r\n\t \t\tJFusionConnect::response($server,$response);\r\n\t\t } else {\r\n\t\t \t$msg = $response->text;\r\n\t\t\t\t$this->setRedirect('index.php', $msg, $msgType);\r\n\t\t }\r\n \t} else {\r\n \t$this->setRedirect('index.php?option=com_jfusionconnect&view=login', $msg, $msgType);\r\n \t}\r\n }",
"public function action_login()\n {\n if(\\Auth::check())\n {\n \\Response::redirect('admin/dashboard');\n }\n\n // Set validation\n $val = \\Validation::forge('login');\n $val->add_field('username', 'Name', 'required');\n $val->add_field('password', 'Password', 'required');\n\n // Run validation\n if($val->run())\n {\n if(\\Auth::instance()->login($val->validated('username'), $val->validated('password')))\n {\n \\Session::set_flash('success', \\Lang::get('nvadmin.public.login_success'));\n \\Response::redirect('admin/dashboard');\n }\n else\n {\n $this->data['page_values']['errors'] = \\Lang::get('nvadmin.public.login_error');\n }\n }\n else\n {\n $this->data['page_values']['errors'] = $val->show_errors();\n }\n\n // Set templates variables\n $this->data['template_values']['subtitle'] = 'Login';\n $this->data['template_values']['description'] = \\Lang::get('nvadmin.public.login');\n $this->data['template_values']['keywords'] = 'login, access denied';\n }",
"function staff_alllogin() {\n \n $this->setLoginRedirects();\n \n $this->layout = 'login_layout';\n\t\t// Display error message on failed authentication\n\t\tif (!empty($this->data) && !$this->Auth->_loggedIn) {\n\t\t\t$this->Session->setFlash($this->Auth->loginError);\n $this->redirect(\"http://\" . $_SERVER['HTTP_HOST']);\n\t\t}else{\n $this->redirect(\"http://\" . $_SERVER['HTTP_HOST']);\n }\n\t\t// Redirect the logged in user to respective pages\n\t\t\n\t}",
"public function login() {\n\t\t/* if($this->Session->check('Auth.User')){\n\t\t\t$this->redirect(array('action' => 'home'));\t\n\t\t\t\t\t\n\t\t} */\n\t\t\n\t\t// if we get the post information, try to authenticate\n\t\tif ($this->request->is('post')) {\n\t\t\tif ($this->Auth->login()) {\n\t\t\t\t$this->Session->setFlash(__('Welcome, '. $this->Auth->user('username')));\n\t\t\t\t//$this->redirect($this->Auth->redirectUrl());\n\t\t\t\t$this->User->id = $this->Auth->user('id'); // target correct record\n\t\t\t\t$this->User->saveField('last_login_time', date(DATE_ATOM)); // save login time\n\t\t\t\t\n\t\t\t\t$this->redirect(array('action' => 'home'));\t\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash('Invalid username or password');\n\t\t\t}\n\t\t}\n\n\t}",
"private function _login() {\n if( !$this->_connection->getCookieJar()->getCookie( $this->_baseUrl,\n 'auth_tkt', Zend_Http_CookieJar::COOKIE_OBJECT ) ) {\n $this->_connection->setUri( $this->_baseUrl . self::URL_LOGIN );\n $this->_connection->setParameterPost( array(\n 'login_username' => $this->_username,\n 'login_password' => $this->_password,\n 'back' => $this->_baseUrl,\n 'login' => 'Log In' ) );\n $this->_doRequest( Zend_Http_Client::POST );\n if( !$this->_connection->getCookieJar()->getCookie( $this->_baseUrl,\n 'auth_tkt', Zend_Http_CookieJar::COOKIE_OBJECT ) ) {\n throw new Opsview_Remote_Exception( 'Login failed for unknown reason' );\n }\n }\n }",
"function Login()\n {\n $this->view->ShowLogin();\n }",
"private function checkLogin() {\n\t\t$session = $this->Session->read ( 'sessionLogado' );\n\t\tif (empty ( $session )) {\n\t\t\t$this->Session->write ( 'sessionLogado', false );\n\t\t}\n\t\t\n\t\tif ($this->params ['plugin'] == 'users') {\n\t\t\tif ($this->params ['controller'] == 'users' && $this->params ['action'] == 'home' && ! $session == true) {\n\t\t\t\t$this->redirect ( array (\n\t\t\t\t\t\t'controller' => 'users',\n\t\t\t\t\t\t'plugin' => 'users',\n\t\t\t\t\t\t'action' => 'login' \n\t\t\t\t) );\n\t\t\t}\n\t\t\tif ($this->params ['controller'] == 'users' && $this->params ['action'] == 'signatures' && ! $session == true) {\n\t\t\t\t$this->redirect ( array (\n\t\t\t\t\t\t'controller' => 'users',\n\t\t\t\t\t\t'plugin' => 'users',\n\t\t\t\t\t\t'action' => 'login' \n\t\t\t\t) );\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public function maverickLoginAction()\n {\n // get the view vars\n $errors = $this->view->errors;\n $site = $this->view->site;\n $loginUser = $this->view->loginUser;\n\n if ( $loginUser ) {\n $homeUrl = $site->getUrl( 'home' );\n return $this->_redirect( $homeUrl );\n }\n\n // set the input params\n $this->processInput( null, null, $errors );\n\n // check if there were any errors\n if ( $errors->hasErrors() ) {\n return $this->renderPage( 'errors' );\n }\n\n return $this->renderPage( 'authMaverickLogin' );\n }",
"public function handleLogin(){\n $username = htmlentities(trim($_POST['username']));\n $password = htmlentities(trim($_POST['password']));\n $loginSebagai = htmlentities(trim($_POST['login_sebagai']));\n\n $loginResult = WebDb::handleLogin($username,$password, $loginSebagai);\n\n if(!$loginResult) {\n Session::set(\"login_gagal\",\"Username atau password salah\");\n header(\"Location: /it-a\");\n die();\n }\n Session::set(\"user_id\",$username);\n Session::set(\"login_sebagai\",$loginSebagai);\n header(\"Location: /it-a/dashboard\");\n }",
"public function checkFirstLogin();",
"function login() {\n\n $this->redirect(\"/staff/users/alllogin\");\n \n $this->layout = 'login_layout';\n\t\t// Display error message on failed authentication\n\t\tif (!empty($this->data) && !$this->Auth->_loggedIn) {\n\t\t\t$this->Session->setFlash($this->Auth->loginError);\t\t\t\n\t\t}\n\t\t// Redirect the logged in user to respective pages\n\t\t$this->setLoginRedirects();\n\t}",
"public function login(){\n echo $this->name . ' logged in';\n }",
"public function login(){\n\n }",
"protected function display_login() {\r\n // Get language vars\r\n global $MESSAGE;\r\n global $MENU;\r\n global $TEXT;\r\n\r\n $Trans = $GLOBALS['oTrans'];\r\n $ThemeName = (defined('DEFAULT_THEME')?DEFAULT_THEME:'DefaultTheme');\r\n $Trans->enableAddon('templates\\\\'.$ThemeName);\r\n $aLang = $Trans->getLangArray();\r\n // If attemps more than allowed, warn the user\r\n if($this->get_session('ATTEMPS') > $this->max_attemps) {\r\n $this->warn();\r\n }\r\n // Show the login form\r\n if($this->frontend != true) {\r\n// require_once(WB_PATH.'/include/phplib/template.inc');\r\n $aWebsiteTitle['value'] = WEBSITE_TITLE;\r\n $sql = 'SELECT `value` FROM `'.TABLE_PREFIX.'settings` '\r\n . 'WHERE `name`=\\'website_title\\'';\r\n if ($get_title = $this->oDb->query($sql)){\r\n $aWebsiteTitle= $get_title->fetchRow( MYSQLI_ASSOC );\r\n }\r\n // Setup template object, parse vars to it, then parse it\r\n $template = new Template(dirname($this->correct_theme_source($this->template_file)));\r\n $template->set_file('page', $this->template_file);\r\n $template->set_block('page', 'mainBlock', 'main');\r\n $template->set_var('DISPLAY_REMEMBER_ME', ($this->remember_me_option ? '' : 'display: none;'));\r\n\r\n $template->set_var(\r\n array(\r\n 'ACTION_URL' => $this->login_url,\r\n 'ATTEMPS' => $this->get_session('ATTEMPS'),\r\n 'USERNAME' => $this->username,\r\n 'USERNAME_FIELDNAME' => $this->username_fieldname,\r\n 'PASSWORD_FIELDNAME' => $this->password_fieldname,\r\n 'MESSAGE' => $this->message,\r\n 'INTERFACE_DIR_URL' => ADMIN_URL.'/interface',\r\n 'MAX_USERNAME_LEN' => $this->max_username_len,\r\n 'MAX_PASSWORD_LEN' => $this->max_password_len,\r\n 'ADMIN_URL' => ADMIN_URL,\r\n 'WB_URL' => WB_URL,\r\n 'URL' => $this->redirect_url,\r\n 'THEME_URL' => THEME_URL,\r\n 'VERSION' => VERSION,\r\n 'REVISION' => REVISION,\r\n 'LANGUAGE' => strtolower(LANGUAGE),\r\n 'FORGOTTEN_DETAILS_APP' => $this->forgotten_details_app,\r\n 'WEBSITE_TITLE' => ($aWebsiteTitle['value']),\r\n 'TEXT_ADMINISTRATION' => $TEXT['ADMINISTRATION'],\r\n// 'TEXT_FORGOTTEN_DETAILS' => $Trans->TEXT_FORGOTTEN_DETAILS,\r\n 'TEXT_USERNAME' => $TEXT['USERNAME'],\r\n 'TEXT_PASSWORD' => $TEXT['PASSWORD'],\r\n 'TEXT_REMEMBER_ME' => $TEXT['REMEMBER_ME'],\r\n 'TEXT_LOGIN' => $TEXT['LOGIN'],\r\n 'TEXT_SAVE' => $TEXT['SAVE'],\r\n 'TEXT_RESET' => $TEXT['RESET'],\r\n 'TEXT_HOME' => $TEXT['HOME'],\r\n 'PAGES_DIRECTORY' => PAGES_DIRECTORY,\r\n 'SECTION_LOGIN' => $MENU['LOGIN'],\r\n 'LOGIN_DISPLAY_HIDDEN' => !$this->is_authenticated() ? 'hidden' : '',\r\n 'LOGIN_DISPLAY_NONE' => !$this->is_authenticated() ? 'none' : '',\r\n 'LOGIN_LINK' => $_SERVER['SCRIPT_NAME'],\r\n 'LOGIN_ICON' => 'login',\r\n 'START_ICON' => 'blank',\r\n 'URL_HELP' => 'http://wiki.websitebaker.org/',\r\n )\r\n );\r\n $template->set_var($aLang);\r\n $template->set_var('CHARSET', (defined('DEFAULT_CHARSET') ? DEFAULT_CHARSET : 'utf-8'));\r\n $template->parse('main', 'mainBlock', false);\r\n $template->pparse('output', 'page');\r\n }\r\n }",
"public function login() {\r\n if ($this->request->is('post')) {\r\n \r\n //If the user is authenticated...\r\n if ($this->Auth->login()) {\r\n \r\n if ($this->isAdmin()) $this->redirect(\"/admin/halls\");\r\n else $this->redirect(\"/halls\");\r\n }\r\n else {\r\n $this->Session->setFlash(__('Invalid username or password, try again'));\r\n }\r\n }\r\n }",
"private function loginPanel() {\n $this->user_panel->processLogin();\n }",
"public function login() {\n $page = 'login';\n\n require('./View/default.php');\n }",
"public function c_login() {\n\t\t\n\t\tif($this->request->session()->check('id')==0){\n\t\t\t$this->layout=false;\n\t\t\t\n\t\t\tif ($this->request->is('post')) {\n\t\t\t\t$user = $this->Auth->identify();\n\t\t\t\tif ($user) {\n\t\t\t\t\t$this->Auth->setUser($user);\n\t\t\t\t\t$session = $this->request->session();\n\t\t\t\t\t$session->write('id', $user['id']);\n\t\t\t\t\t$session->write('name', $user['name']);\n\t\t\t\t\t$session->write('email', $user['email']);\n\t\t\t\t\t\n\t\t\t\t\t\treturn $this->redirect($this->Auth->redirectUrl());\n\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\t$this->Flash->error(\n\t\t\t\t\t__('Username or password is incorrect'),\n\t\t\t\t\t'default',\n\t\t\t\t\t[],\n\t\t\t\t\t'auth'\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}else{\n\t\t\treturn $this->redirect(['action'=>'c_index']);\n\t\t}\n\t}",
"public function login()\n {\n\t\t\n $data[\"base_dir\"]=__DIR__;\n $data[\"loc\"]=\"Login\";\n\t\t\n return $this->twig->render(\"pages/login.html\", $data);\n }",
"public function actionLogin()\r\n\t{\r\n\t $this->redirect(array('//user/auth'));\r\n\t}",
"public function showLogin(){\n $this->data['pagetitle'] = \"Login\";\n $this->data['page'] = 'login';\n // $this->data['pagecontent'] = 'login';\n $this->data['pagebody'] = 'login';\n \n $this->render();\n }",
"public function login() {\n\t\t$this -> load -> model('models_events254/m_clients');\n\t\t$this -> m_clients -> getUser();\n\t\tif ($this -> m_clients -> isUser == 'true') {\n\n\t\t\n\t\t\t/*create session data*/\n\t\t\t$newdata = array('email' => $this -> m_clients -> email, 'logged_in' => TRUE,'id' => $this ->m_clients->id);\n\t\t\t$this -> session -> set_userdata($newdata);\n\n\t\t\tredirect(base_url() . 'C_front/index', 'refresh');\n\t\n\n\t\t} else {\n\t\t\t#use an ajax request and not a whole refresh\n\t\t\t\n\t\t\t$data['message']=\"User Not Found\";\n\t\t\t$data['messageType']=\"error\";\n\t\t\t\n\t\t\t$this->load->view('login',$data);\n\t\t}\n\t}",
"public function login()\n\t{\n\t\tif ($this->request->is('post')) {\n\t\t\tif ($this->User->find('count') <= 0) {\r\n\t\t\t\t$this->User->create();\r\n\t\t\t\t$data['User']['username'] = \"admin\";\r\n\t\t\t\t$data['User']['password'] = AuthComponent::password(\"admin\");\r\n\t\t\t\t$this->User->save($data);\r\n\t\t\t}\n\t\t\tif ($this->Auth->login()) {\n\t\t\t\t$this->Session->write('isLoggedIn', true);\n\t\t\t\t$this->Session->write('mc_rootpath', WWW_ROOT.\"/files/\");\n\t\t\t\t$this->Session->write('mc_path', WWW_ROOT.\"/files/\");\n\t\t\t\t$this->Session->write('imagemanager.preview.wwwroot', WWW_ROOT);\n\t\t\t\t$this->Session->write('imagemanager.preview.urlprefix', Router::url( \"/\", true ));\n\t\t\t\treturn $this->redirect($this->Auth->redirect());\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash(__('Username or password is incorrect'), 'default', array(), 'auth');\n\t\t\t}\n\t\t}\n\t}",
"public function getLogin() {\n $basic_data['title'] = 'Sign In';\n $basic_data['body_id'] = 'login';\n return ViewController::displayPage($basic_data,'auth.login',[]);\n }",
"function admin_login() {\n\t\t$admin_email = $_REQUEST['admin_email'];\n\t\t$admin_pass = $_REQUEST['admin_pass'];\n\t\tif (!empty($admin_email) && !empty($admin_pass)) {\n\t\t\t$records_user = $this -> conn -> get_table_field_doubles('pg_track_admin', 'admin_email', $admin_email, 'admin_password', md5($admin_pass));\n\t\t\tif (!empty($records_user)) {\n\n\t\t\t\t$post = array(\"status\" => \"true\", \"message\" => \"Login Successfully\");\n\t\t\t} else {\n\t\t\t\t$post = array(\"status\" => \"false\", \"message\" => \"Invalid login id and password\");\n\t\t\t}\n\t\t} else {\n\t\t\t$post = array(\"status\" => \"false\", \"message\" => \"Missing parameter\", 'admin_email' => $admin_email, 'admin_pass' => $_REQUEST['admin_pass']);\n\t\t}\n\t\techo $this -> json($post);\n\t}",
"public function doLogin()\n {\n $adminName = $this->request->param('name');\n $password = $this->request->param('password');\n if (empty($adminName) || empty($password)) {\n return '用户名或密码不能为空';\n }\n\n $adminUserModel = new AdminUser();\n $info = $adminUserModel->getAdmimUserInfo($adminName);\n\n if ($info == null) {\n return '用户名不存在';\n }\n\n $hashPassword = $info->getData('password');\n\n if (!password_verify($password, $hashPassword)) {\n return '密码错误';\n }\n\n var_dump($info);\n\n return 'index';\n }",
"function login()\n{\n\n}"
] | [
"0.77250427",
"0.7725021",
"0.7725021",
"0.76449996",
"0.76214397",
"0.7504227",
"0.7401909",
"0.73800045",
"0.7349641",
"0.7327724",
"0.73199964",
"0.7317339",
"0.72905535",
"0.72885746",
"0.72876453",
"0.72339356",
"0.7222017",
"0.7215348",
"0.7214828",
"0.72126406",
"0.72040755",
"0.7174694",
"0.71632165",
"0.7162076",
"0.71608865",
"0.7159756",
"0.71421784",
"0.7136759",
"0.71295464",
"0.7128773",
"0.7127951",
"0.7127951",
"0.7122669",
"0.7122669",
"0.7122669",
"0.7119604",
"0.70953155",
"0.70936537",
"0.7077913",
"0.7075412",
"0.70623845",
"0.70608586",
"0.7053816",
"0.703082",
"0.7021601",
"0.70194507",
"0.701887",
"0.6999265",
"0.69958305",
"0.699119",
"0.6974033",
"0.6961395",
"0.6951522",
"0.6950358",
"0.6942094",
"0.69412494",
"0.6917823",
"0.6917426",
"0.6910879",
"0.69067264",
"0.6904172",
"0.6904136",
"0.6901338",
"0.68934",
"0.6889965",
"0.6889495",
"0.68875724",
"0.68864167",
"0.6879242",
"0.6870101",
"0.6846278",
"0.6839269",
"0.6835242",
"0.6829538",
"0.6824079",
"0.6823561",
"0.68037033",
"0.6801278",
"0.6798539",
"0.67981493",
"0.6797644",
"0.6797027",
"0.6793396",
"0.67919546",
"0.67914087",
"0.67819095",
"0.67815703",
"0.6780572",
"0.677993",
"0.6778513",
"0.67757887",
"0.6769182",
"0.6764145",
"0.6763222",
"0.6762608",
"0.67609555",
"0.6759583",
"0.6755385",
"0.6741033",
"0.67409223",
"0.67408466"
] | 0.0 | -1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.